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