|
| 1 | +/*! modern-normalize v0.7.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 | +Add the correct height in Firefox. |
| 74 | +*/ |
| 75 | + |
| 76 | +hr { |
| 77 | + height: 0; |
| 78 | +} |
| 79 | + |
| 80 | +/* |
| 81 | +Text-level semantics |
| 82 | +==================== |
| 83 | +*/ |
| 84 | + |
| 85 | +/** |
| 86 | +Add the correct text decoration in Chrome, Edge, and Safari. |
| 87 | +*/ |
| 88 | + |
| 89 | +abbr[title] { |
| 90 | + text-decoration: underline dotted; |
| 91 | +} |
| 92 | + |
| 93 | +/** |
| 94 | +Add the correct font weight in Edge and Safari. |
| 95 | +*/ |
| 96 | + |
| 97 | +b, |
| 98 | +strong { |
| 99 | + font-weight: bolder; |
| 100 | +} |
| 101 | + |
| 102 | +/** |
| 103 | +1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) |
| 104 | +2. Correct the odd 'em' font sizing in all browsers. |
| 105 | +*/ |
| 106 | + |
| 107 | +code, |
| 108 | +kbd, |
| 109 | +samp, |
| 110 | +pre { |
| 111 | + font-family: |
| 112 | + ui-monospace, |
| 113 | + SFMono-Regular, |
| 114 | + Consolas, |
| 115 | + 'Liberation Mono', |
| 116 | + Menlo, |
| 117 | + monospace; /* 1 */ |
| 118 | + font-size: 1em; /* 2 */ |
| 119 | +} |
| 120 | + |
| 121 | +/** |
| 122 | +Add the correct font size in all browsers. |
| 123 | +*/ |
| 124 | + |
| 125 | +small { |
| 126 | + font-size: 80%; |
| 127 | +} |
| 128 | + |
| 129 | +/** |
| 130 | +Prevent 'sub' and 'sup' elements from affecting the line height in all browsers. |
| 131 | +*/ |
| 132 | + |
| 133 | +sub, |
| 134 | +sup { |
| 135 | + font-size: 75%; |
| 136 | + line-height: 0; |
| 137 | + position: relative; |
| 138 | + vertical-align: baseline; |
| 139 | +} |
| 140 | + |
| 141 | +sub { |
| 142 | + bottom: -0.25em; |
| 143 | +} |
| 144 | + |
| 145 | +sup { |
| 146 | + top: -0.5em; |
| 147 | +} |
| 148 | + |
| 149 | +/* |
| 150 | +Forms |
| 151 | +===== |
| 152 | +*/ |
| 153 | + |
| 154 | +/** |
| 155 | +1. Change the font styles in all browsers. |
| 156 | +2. Remove the margin in Firefox and Safari. |
| 157 | +*/ |
| 158 | + |
| 159 | +button, |
| 160 | +input, |
| 161 | +optgroup, |
| 162 | +select, |
| 163 | +textarea { |
| 164 | + font-family: inherit; /* 1 */ |
| 165 | + font-size: 100%; /* 1 */ |
| 166 | + line-height: 1.15; /* 1 */ |
| 167 | + margin: 0; /* 2 */ |
| 168 | +} |
| 169 | + |
| 170 | +/** |
| 171 | +Remove the inheritance of text transform in Edge and Firefox. |
| 172 | +1. Remove the inheritance of text transform in Firefox. |
| 173 | +*/ |
| 174 | + |
| 175 | +button, |
| 176 | +select { /* 1 */ |
| 177 | + text-transform: none; |
| 178 | +} |
| 179 | + |
| 180 | +/** |
| 181 | +Correct the inability to style clickable types in iOS and Safari. |
| 182 | +*/ |
| 183 | + |
| 184 | +button, |
| 185 | +[type='button'], |
| 186 | +[type='reset'], |
| 187 | +[type='submit'] { |
| 188 | + -webkit-appearance: button; |
| 189 | +} |
| 190 | + |
| 191 | +/** |
| 192 | +Remove the inner border and padding in Firefox. |
| 193 | +*/ |
| 194 | + |
| 195 | +button::-moz-focus-inner, |
| 196 | +[type='button']::-moz-focus-inner, |
| 197 | +[type='reset']::-moz-focus-inner, |
| 198 | +[type='submit']::-moz-focus-inner { |
| 199 | + border-style: none; |
| 200 | + padding: 0; |
| 201 | +} |
| 202 | + |
| 203 | +/** |
| 204 | +Restore the focus styles unset by the previous rule. |
| 205 | +*/ |
| 206 | + |
| 207 | +button:-moz-focusring, |
| 208 | +[type='button']:-moz-focusring, |
| 209 | +[type='reset']:-moz-focusring, |
| 210 | +[type='submit']:-moz-focusring { |
| 211 | + outline: 1px dotted ButtonText; |
| 212 | +} |
| 213 | + |
| 214 | +/** |
| 215 | +Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers. |
| 216 | +*/ |
| 217 | + |
| 218 | +legend { |
| 219 | + padding: 0; |
| 220 | +} |
| 221 | + |
| 222 | +/** |
| 223 | +Add the correct vertical alignment in Chrome and Firefox. |
| 224 | +*/ |
| 225 | + |
| 226 | +progress { |
| 227 | + vertical-align: baseline; |
| 228 | +} |
| 229 | + |
| 230 | +/** |
| 231 | +Correct the cursor style of increment and decrement buttons in Safari. |
| 232 | +*/ |
| 233 | + |
| 234 | +[type='number']::-webkit-inner-spin-button, |
| 235 | +[type='number']::-webkit-outer-spin-button { |
| 236 | + height: auto; |
| 237 | +} |
| 238 | + |
| 239 | +/** |
| 240 | +1. Correct the odd appearance in Chrome and Safari. |
| 241 | +2. Correct the outline style in Safari. |
| 242 | +*/ |
| 243 | + |
| 244 | +[type='search'] { |
| 245 | + -webkit-appearance: textfield; /* 1 */ |
| 246 | + outline-offset: -2px; /* 2 */ |
| 247 | +} |
| 248 | + |
| 249 | +/** |
| 250 | +Remove the inner padding in Chrome and Safari on macOS. |
| 251 | +*/ |
| 252 | + |
| 253 | +[type='search']::-webkit-search-decoration { |
| 254 | + -webkit-appearance: none; |
| 255 | +} |
| 256 | + |
| 257 | +/** |
| 258 | +1. Correct the inability to style clickable types in iOS and Safari. |
| 259 | +2. Change font properties to 'inherit' in Safari. |
| 260 | +*/ |
| 261 | + |
| 262 | +::-webkit-file-upload-button { |
| 263 | + -webkit-appearance: button; /* 1 */ |
| 264 | + font: inherit; /* 2 */ |
| 265 | +} |
| 266 | + |
| 267 | +/* |
| 268 | +Interactive |
| 269 | +=========== |
| 270 | +*/ |
| 271 | + |
| 272 | +/* |
| 273 | +Add the correct display in Chrome and Safari. |
| 274 | +*/ |
| 275 | + |
| 276 | +summary { |
| 277 | + display: list-item; |
| 278 | +} |
0 commit comments