1/* Box sizing rules */
2*,
3*::before,
4*::after {
5 box-sizing: border-box;
6}
7
8/* Prevent font size inflation */
9html {
10 -moz-text-size-adjust: none;
11 -webkit-text-size-adjust: none;
12 text-size-adjust: none;
13}
14
15/* Remove default margin in favour of better control in authored CSS */
16body, h1, h2, h3, h4, p,
17figure, blockquote, dl, dd {
18 margin-block-end: 0;
19}
20
21/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
22ul[role='list'],
23ol[role='list'] {
24 list-style: none;
25}
26
27/* Set core body defaults */
28body {
29 line-height: 1.5;
30}
31
32/* Set shorter line heights on headings and interactive elements */
33h1, h2, h3, h4,
34button, input, label {
35 line-height: 1.1;
36}
37
38/* Balance text wrapping on headings */
39h1, h2,
40h3, h4 {
41 text-wrap: balance;
42}
43
44/* A elements that don't have a class get default styles */
45a:not([class]) {
46 text-decoration-skip-ink: auto;
47}
48
49/* Make images easier to work with */
50img,
51picture {
52 max-width: 100%;
53 display: block;
54}
55
56/* Inherit fonts for inputs and buttons */
57input, button,
58textarea, select {
59 font: inherit;
60}
61
62/* Make sure textareas without a rows attribute are not tiny */
63textarea:not([rows]) {
64 min-height: 10em;
65}
66
67/* Anything that has been anchored to should have extra scroll margin */
68:target {
69 scroll-margin-block: 5ex;
70}