|
1 | | -@mixin generate-normalize { |
| 1 | +@mixin generate-reset { |
2 | 2 |
|
3 | | - /* Document |
4 | | - ========================================================================== */ |
5 | | - |
6 | | - /** |
7 | | - * 1. Correct the line height in all browsers. |
8 | | - * 2. Prevent adjustments of font size after orientation changes in iOS. |
9 | | - */ |
10 | | - |
11 | | - html { |
12 | | - line-height: 1.15; /* 1 */ |
13 | | - -webkit-text-size-adjust: 100%; /* 2 */ |
| 3 | + * { |
| 4 | + box-sizing: border-box; |
| 5 | + position: relative; |
| 6 | + min-width: 0; |
14 | 7 | } |
15 | 8 |
|
16 | | - /* Sections |
17 | | - ========================================================================== */ |
18 | | - |
19 | | - /** |
20 | | - * Remove the margin in all browsers. |
21 | | - */ |
22 | | - |
23 | 9 | body { |
| 10 | + min-height: 100dvh; |
24 | 11 | margin: 0; |
25 | 12 | } |
26 | 13 |
|
27 | | - /** |
28 | | - * Render the `main` element consistently in IE. |
29 | | - */ |
30 | | - |
31 | | - main { |
32 | | - display: block; |
| 14 | + h1, h2, h3, h4, h5, h6 { |
| 15 | + text-wrap: balance; |
33 | 16 | } |
34 | 17 |
|
35 | | - /** |
36 | | - * Correct the font size and margin on `h1` elements within `section` and |
37 | | - * `article` contexts in Chrome, Firefox, and Safari. |
38 | | - */ |
39 | | - |
40 | | - h1 { |
41 | | - font-size: 2em; |
42 | | - margin: 0.67em 0; |
| 18 | + p { |
| 19 | + text-wrap: pretty; |
43 | 20 | } |
44 | 21 |
|
45 | | - /* Grouping content |
| 22 | + /* Document |
46 | 23 | ========================================================================== */ |
47 | 24 |
|
48 | 25 | /** |
49 | | - * 1. Add the correct box sizing in Firefox. |
50 | | - * 2. Show the overflow in Edge and IE. |
| 26 | + * 1. Correct the line height in all browsers. |
| 27 | + * 2. Prevent adjustments of font size after orientation changes in iOS. |
51 | 28 | */ |
52 | 29 |
|
53 | | - hr { |
54 | | - box-sizing: content-box; /* 1 */ |
55 | | - block-size: 0; /* 1 */ |
56 | | - overflow: visible; /* 2 */ |
| 30 | + html { |
| 31 | + line-height: 1.15; /* 1 */ |
| 32 | + -webkit-text-size-adjust: 100%; /* 2 */ |
57 | 33 | } |
58 | 34 |
|
| 35 | + /* Sections |
| 36 | + ========================================================================== */ |
| 37 | + |
59 | 38 | /** |
60 | 39 | * 1. Correct the inheritance and scaling of font size in all browsers. |
61 | 40 | * 2. Correct the odd `em` font sizing in all browsers. |
|
66 | 45 | font-size: 1em; /* 2 */ |
67 | 46 | } |
68 | 47 |
|
69 | | - /* Text-level semantics |
70 | | - ========================================================================== */ |
71 | | - |
72 | | - /** |
73 | | - * Remove the gray background on active links in IE 10. |
74 | | - */ |
75 | | - |
76 | | - a { |
77 | | - background-color: transparent; |
78 | | - } |
79 | | - |
80 | 48 | /** |
81 | 49 | * 1. Remove the bottom border in Chrome 57- |
82 | 50 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. |
|
117 | 85 | font-size: 80%; |
118 | 86 | } |
119 | 87 |
|
120 | | - /** |
121 | | - * Prevent `sub` and `sup` elements from affecting the line height in |
122 | | - * all browsers. |
123 | | - */ |
124 | | - |
125 | | - sub, |
126 | | - sup { |
127 | | - font-size: 75%; |
128 | | - line-height: 0; |
129 | | - position: relative; |
130 | | - vertical-align: baseline; |
131 | | - } |
132 | | - |
133 | | - sub { |
134 | | - bottom: -0.25em; |
135 | | - } |
136 | | - |
137 | | - sup { |
138 | | - top: -0.5em; |
139 | | - } |
140 | | - |
141 | | - /* Embedded content |
142 | | - ========================================================================== */ |
143 | | - |
144 | | - /** |
145 | | - * Remove the border on images inside links in IE 10. |
146 | | - */ |
147 | | - |
148 | | - img { |
149 | | - border-style: none; |
150 | | - } |
151 | | - |
152 | 88 | /* Forms |
153 | 89 | ========================================================================== */ |
154 | 90 |
|
|
243 | 179 | vertical-align: baseline; |
244 | 180 | } |
245 | 181 |
|
246 | | - /** |
247 | | - * Remove the default vertical scrollbar in IE 10+. |
248 | | - */ |
249 | | - |
250 | | - textarea { |
251 | | - overflow: auto; |
252 | | - } |
253 | | - |
254 | | - /** |
255 | | - * 1. Add the correct box sizing in IE 10. |
256 | | - * 2. Remove the padding in IE 10. |
257 | | - */ |
258 | | - |
259 | | - [type="checkbox"], |
260 | | - [type="radio"] { |
261 | | - box-sizing: border-box; /* 1 */ |
262 | | - padding: 0; /* 2 */ |
263 | | - } |
264 | | - |
265 | 182 | /** |
266 | 183 | * Correct the cursor style of increment and decrement buttons in Chrome. |
267 | 184 | */ |
|
290 | 207 | display: list-item; |
291 | 208 | cursor: pointer; |
292 | 209 | } |
293 | | - |
294 | | - /* Misc |
295 | | - ========================================================================== */ |
296 | | - |
297 | | - /** |
298 | | - * Add the correct display in IE 10+. |
299 | | - */ |
300 | | - |
301 | | - template { |
302 | | - display: none; |
303 | | - } |
304 | | - |
305 | | - /** |
306 | | - * Add the correct display in IE 10. |
307 | | - */ |
308 | | - |
309 | | - [hidden] { |
310 | | - display: none; |
311 | | - } |
312 | 210 | } |
0 commit comments