|
| 1 | +/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ |
| 2 | + |
| 3 | +/* |
| 4 | +Document |
| 5 | +======== |
| 6 | +*/ |
| 7 | + |
| 8 | +/** |
| 9 | +Use a better box model (opinionated). |
| 10 | +*/ |
| 11 | + |
| 12 | +*, |
| 13 | +*::before, |
| 14 | +*::after { |
| 15 | + box-sizing: border-box; |
| 16 | +} |
| 17 | + |
| 18 | +/** |
| 19 | +Use a more readable tab size (opinionated). |
| 20 | +*/ |
| 21 | + |
| 22 | +:root { |
| 23 | + -moz-tab-size: 4; |
| 24 | + tab-size: 4; |
| 25 | +} |
| 26 | + |
| 27 | +/** |
| 28 | +1. Correct the line height in all browsers. |
| 29 | +2. Prevent adjustments of font size after orientation changes in iOS. |
| 30 | +*/ |
| 31 | + |
| 32 | +html { |
| 33 | + line-height: 1.15; /* 1 */ |
| 34 | + -webkit-text-size-adjust: 100%; /* 2 */ |
| 35 | +} |
| 36 | + |
| 37 | +/* |
| 38 | +Sections |
| 39 | +======== |
| 40 | +*/ |
| 41 | + |
| 42 | +/** |
| 43 | +Remove the margin in all browsers. |
| 44 | +*/ |
| 45 | + |
| 46 | +body { |
| 47 | + margin: 0; |
| 48 | +} |
| 49 | + |
| 50 | +/** |
| 51 | +Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) |
| 52 | +*/ |
| 53 | + |
| 54 | +body { |
| 55 | + font-family: |
| 56 | + system-ui, |
| 57 | + -apple-system, /* Firefox supports this but not yet `system-ui` */ |
| 58 | + 'Segoe UI', |
| 59 | + Roboto, |
| 60 | + Helvetica, |
| 61 | + Arial, |
| 62 | + sans-serif, |
| 63 | + 'Apple Color Emoji', |
| 64 | + 'Segoe UI Emoji'; |
| 65 | +} |
| 66 | + |
| 67 | +/* |
| 68 | +Grouping content |
| 69 | +================ |
| 70 | +*/ |
| 71 | + |
| 72 | +/** |
| 73 | +1. Add the correct height in Firefox. |
| 74 | +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) |
| 75 | +*/ |
| 76 | + |
| 77 | +hr { |
| 78 | + height: 0; /* 1 */ |
| 79 | + color: inherit; /* 2 */ |
| 80 | +} |
| 81 | + |
| 82 | +/* |
| 83 | +Text-level semantics |
| 84 | +==================== |
| 85 | +*/ |
| 86 | + |
| 87 | +/** |
| 88 | +Add the correct text decoration in Chrome, Edge, and Safari. |
| 89 | +*/ |
| 90 | + |
| 91 | +abbr[title] { |
| 92 | + text-decoration: underline dotted; |
| 93 | +} |
| 94 | + |
| 95 | +/** |
| 96 | +Add the correct font weight in Edge and Safari. |
| 97 | +*/ |
| 98 | + |
| 99 | +b, |
| 100 | +strong { |
| 101 | + font-weight: bolder; |
| 102 | +} |
| 103 | + |
| 104 | +/** |
| 105 | +1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) |
| 106 | +2. Correct the odd 'em' font sizing in all browsers. |
| 107 | +*/ |
| 108 | + |
| 109 | +code, |
| 110 | +kbd, |
| 111 | +samp, |
| 112 | +pre { |
| 113 | + font-family: |
| 114 | + ui-monospace, |
| 115 | + SFMono-Regular, |
| 116 | + Consolas, |
| 117 | + 'Liberation Mono', |
| 118 | + Menlo, |
| 119 | + monospace; /* 1 */ |
| 120 | + font-size: 1em; /* 2 */ |
| 121 | +} |
| 122 | + |
| 123 | +/** |
| 124 | +Add the correct font size in all browsers. |
| 125 | +*/ |
| 126 | + |
| 127 | +small { |
| 128 | + font-size: 80%; |
| 129 | +} |
| 130 | + |
| 131 | +/** |
| 132 | +Prevent 'sub' and 'sup' elements from affecting the line height in all browsers. |
| 133 | +*/ |
| 134 | + |
| 135 | +sub, |
| 136 | +sup { |
| 137 | + font-size: 75%; |
| 138 | + line-height: 0; |
| 139 | + position: relative; |
| 140 | + vertical-align: baseline; |
| 141 | +} |
| 142 | + |
| 143 | +sub { |
| 144 | + bottom: -0.25em; |
| 145 | +} |
| 146 | + |
| 147 | +sup { |
| 148 | + top: -0.5em; |
| 149 | +} |
| 150 | + |
| 151 | +/* |
| 152 | +Tabular data |
| 153 | +============ |
| 154 | +*/ |
| 155 | + |
| 156 | +/** |
| 157 | +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) |
| 158 | +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) |
| 159 | +*/ |
| 160 | + |
| 161 | +table { |
| 162 | + text-indent: 0; /* 1 */ |
| 163 | + border-color: inherit; /* 2 */ |
| 164 | +} |
| 165 | + |
| 166 | +/* |
| 167 | +Forms |
| 168 | +===== |
| 169 | +*/ |
| 170 | + |
| 171 | +/** |
| 172 | +1. Change the font styles in all browsers. |
| 173 | +2. Remove the margin in Firefox and Safari. |
| 174 | +*/ |
| 175 | + |
| 176 | +button, |
| 177 | +input, |
| 178 | +optgroup, |
| 179 | +select, |
| 180 | +textarea { |
| 181 | + font-family: inherit; /* 1 */ |
| 182 | + font-size: 100%; /* 1 */ |
| 183 | + line-height: 1.15; /* 1 */ |
| 184 | + margin: 0; /* 2 */ |
| 185 | +} |
| 186 | + |
| 187 | +/** |
| 188 | +Remove the inheritance of text transform in Edge and Firefox. |
| 189 | +1. Remove the inheritance of text transform in Firefox. |
| 190 | +*/ |
| 191 | + |
| 192 | +button, |
| 193 | +select { /* 1 */ |
| 194 | + text-transform: none; |
| 195 | +} |
| 196 | + |
| 197 | +/** |
| 198 | +Correct the inability to style clickable types in iOS and Safari. |
| 199 | +*/ |
| 200 | + |
| 201 | +button, |
| 202 | +[type='button'], |
| 203 | +[type='reset'], |
| 204 | +[type='submit'] { |
| 205 | + -webkit-appearance: button; |
| 206 | +} |
| 207 | + |
| 208 | +/** |
| 209 | +Remove the inner border and padding in Firefox. |
| 210 | +*/ |
| 211 | + |
| 212 | +::-moz-focus-inner { |
| 213 | + border-style: none; |
| 214 | + padding: 0; |
| 215 | +} |
| 216 | + |
| 217 | +/** |
| 218 | +Restore the focus styles unset by the previous rule. |
| 219 | +*/ |
| 220 | + |
| 221 | +:-moz-focusring { |
| 222 | + outline: 1px dotted ButtonText; |
| 223 | +} |
| 224 | + |
| 225 | +/** |
| 226 | +Remove the additional ':invalid' styles in Firefox. |
| 227 | +See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737 |
| 228 | +*/ |
| 229 | + |
| 230 | +:-moz-ui-invalid { |
| 231 | + box-shadow: none; |
| 232 | +} |
| 233 | + |
| 234 | +/** |
| 235 | +Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers. |
| 236 | +*/ |
| 237 | + |
| 238 | +legend { |
| 239 | + padding: 0; |
| 240 | +} |
| 241 | + |
| 242 | +/** |
| 243 | +Add the correct vertical alignment in Chrome and Firefox. |
| 244 | +*/ |
| 245 | + |
| 246 | +progress { |
| 247 | + vertical-align: baseline; |
| 248 | +} |
| 249 | + |
| 250 | +/** |
| 251 | +Correct the cursor style of increment and decrement buttons in Safari. |
| 252 | +*/ |
| 253 | + |
| 254 | +::-webkit-inner-spin-button, |
| 255 | +::-webkit-outer-spin-button { |
| 256 | + height: auto; |
| 257 | +} |
| 258 | + |
| 259 | +/** |
| 260 | +1. Correct the odd appearance in Chrome and Safari. |
| 261 | +2. Correct the outline style in Safari. |
| 262 | +*/ |
| 263 | + |
| 264 | +[type='search'] { |
| 265 | + -webkit-appearance: textfield; /* 1 */ |
| 266 | + outline-offset: -2px; /* 2 */ |
| 267 | +} |
| 268 | + |
| 269 | +/** |
| 270 | +Remove the inner padding in Chrome and Safari on macOS. |
| 271 | +*/ |
| 272 | + |
| 273 | +::-webkit-search-decoration { |
| 274 | + -webkit-appearance: none; |
| 275 | +} |
| 276 | + |
| 277 | +/** |
| 278 | +1. Correct the inability to style clickable types in iOS and Safari. |
| 279 | +2. Change font properties to 'inherit' in Safari. |
| 280 | +*/ |
| 281 | + |
| 282 | +::-webkit-file-upload-button { |
| 283 | + -webkit-appearance: button; /* 1 */ |
| 284 | + font: inherit; /* 2 */ |
| 285 | +} |
| 286 | + |
| 287 | +/* |
| 288 | +Interactive |
| 289 | +=========== |
| 290 | +*/ |
| 291 | + |
| 292 | +/* |
| 293 | +Add the correct display in Chrome and Safari. |
| 294 | +*/ |
| 295 | + |
| 296 | +summary { |
| 297 | + display: list-item; |
| 298 | +} |
0 commit comments