The (very WIP) home of the next versions of my web presences
1/* This is a combination of two “resets”:
2
3 - Josh Comeau’s reset (https://www.joshwcomeau.com/css/custom-css-reset/).
4 - normalize.css (github.com/necolas/normalize.css
5
6 In addition, I have a number of my own opinions layered in!
7 */
8/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
9
10/* 1. Use a more-intuitive box-sizing model */
11/* TODO: enable after checking it doesn’t mess up any of the existing styles, or (better)
12 figuring out what it changes and *fixing* it. */
13/*
14*,
15*::before,
16*::after {
17 box-sizing: border-box;
18}
19*/
20
21/* 2. Remove default margin */
22* {
23 margin: 0;
24}
25
26/**
27 * 1. Standardize the line height in all browsers.
28 * 2. Prevent adjustments of font size after orientation changes in iOS.
29 */
30
31html {
32 line-height: 1; /* 1 */
33 -webkit-text-size-adjust: 100%; /* 2 */
34}
35
36body {
37 -webkit-font-smoothing: antialiased;
38}
39
40/* 5. Improve media defaults */
41img,
42picture,
43video,
44canvas,
45svg {
46 display: block;
47 max-width: 100%;
48}
49
50img,
51picture,
52video {
53 aspect-ratio: auto;
54}
55
56figure {
57 margin: 0;
58}
59
60/* 7. Avoid text overflows */
61p,
62h1,
63h2,
64h3,
65h4,
66h5,
67h6 {
68 overflow-wrap: break-word;
69}
70
71/* 8. Improve line wrapping */
72p {
73 text-wrap: pretty;
74}
75
76h1,
77h2,
78h3,
79h4,
80h5,
81h6 {
82 text-wrap: balance;
83 font-size: 1rem;
84 line-height: 1;
85}
86
87/* Grouping content
88 ========================================================================== */
89
90/**
91 * 1. Add the correct box sizing in Firefox.
92 */
93
94hr {
95 box-sizing: content-box; /* 1 */
96 height: 0; /* 1 */
97}
98
99/**
100 * 1. Correct the inheritance and scaling of font size in all browsers.
101 * 2. Correct the odd `em` font sizing in all browsers.
102 */
103
104pre {
105 font-family: monospace, monospace; /* 1 */
106 font-size: 1em; /* 2 */
107}
108
109/**
110 * Add the correct font weight in Chrome, Edge, and Safari.
111 */
112
113b,
114strong {
115 font-weight: bolder;
116}
117
118/**
119 * 1. Correct the inheritance and scaling of font size in all browsers.
120 * 2. Correct the odd `em` font sizing in all browsers.
121 */
122
123code,
124kbd,
125samp {
126 font-family: monospace, monospace; /* 1 */
127 font-size: 1em; /* 2 */
128}
129
130/**
131 * Prevent `sub` and `sup` elements from affecting the line height in
132 * all browsers.
133 */
134
135sub,
136sup {
137 font-size: 75%;
138 line-height: 0;
139 position: relative;
140 vertical-align: baseline;
141}
142
143sub {
144 bottom: -0.25em;
145}
146
147sup {
148 top: -0.5em;
149}
150
151/* Forms
152 ========================================================================== */
153
154/* 6. Inherit fonts for form controls */
155input,
156button,
157optgroup,
158select,
159textarea {
160 font: inherit;
161}
162
163/**
164 * Remove the inheritance of text transform in Firefox.
165 */
166
167button,
168select {
169 text-transform: none;
170}
171
172/**
173 * Correct the inability to style clickable types in iOS and Safari.
174 */
175
176button,
177[type='button'],
178[type='reset'],
179[type='submit'] {
180 -webkit-appearance: button;
181}
182
183/**
184 * Remove the inner border and padding in Firefox.
185 */
186
187button::-moz-focus-inner,
188[type='button']::-moz-focus-inner,
189[type='reset']::-moz-focus-inner,
190[type='submit']::-moz-focus-inner {
191 border-style: none;
192 padding: 0;
193}
194
195/**
196 * Restore the focus styles unset by the previous rule.
197 */
198
199button:-moz-focusring,
200[type='button']:-moz-focusring,
201[type='reset']:-moz-focusring,
202[type='submit']:-moz-focusring {
203 outline: 1px dotted ButtonText;
204}
205
206/**
207 * Correct the padding in Firefox.
208 */
209
210fieldset {
211 padding: 0.35em 0.75em 0.625em;
212}
213
214/**
215 * Remove the padding so developers are not caught out when they zero out
216 * `fieldset` elements in all browsers.
217 */
218
219legend {
220 padding: 0;
221}
222
223/**
224 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
225 */
226
227progress {
228 vertical-align: baseline;
229}
230
231/**
232 * Correct the cursor style of increment and decrement buttons in Chrome.
233 */
234
235[type='number']::-webkit-inner-spin-button,
236[type='number']::-webkit-outer-spin-button {
237 height: auto;
238}
239
240/**
241 * 1. Correct the odd appearance in Chrome and Safari.
242 * 2. Correct the outline style in Safari.
243 */
244
245[type='search'] {
246 -webkit-appearance: textfield; /* 1 */
247 outline-offset: -2px; /* 2 */
248}
249
250/**
251 * Remove the inner padding in Chrome and Safari on macOS.
252 */
253
254[type='search']::-webkit-search-decoration {
255 -webkit-appearance: none;
256}
257
258/**
259 * 1. Correct the inability to style clickable types in iOS and Safari.
260 * 2. Change font properties to `inherit` in Safari.
261 */
262
263::-webkit-file-upload-button {
264 -webkit-appearance: button; /* 1 */
265 font: inherit; /* 2 */
266}
267
268/* Interactive
269 ========================================================================== */
270
271/*
272 * Add the correct display in Edge, IE 10+, and Firefox.
273 */
274
275details {
276 display: block;
277}
278
279/*
280 * Add the correct display in all browsers.
281 */
282
283summary {
284 display: list-item;
285}