|
| 1 | +/* Document |
| 2 | + * ========================================================================== */ |
| 3 | + |
| 4 | +/** |
| 5 | + * 1. Correct the line height in all browsers. |
| 6 | + * 2. Prevent adjustments of font size after orientation changes in iOS. |
| 7 | + */ |
| 8 | + |
| 9 | +html { |
| 10 | + line-height: 1.15; /* 1 */ |
| 11 | + -webkit-text-size-adjust: 100%; /* 2 */ |
| 12 | +} |
| 13 | + |
| 14 | +/* Sections |
| 15 | + * ========================================================================== */ |
| 16 | + |
| 17 | +/** |
| 18 | + * Correct the font size and margin on `h1` elements within `section` and |
| 19 | + * `article` contexts in Chrome, Edge, Firefox, and Safari. |
| 20 | + */ |
| 21 | + |
| 22 | +h1 { |
| 23 | + font-size: 2em; |
| 24 | + margin: 0.67em 0; |
| 25 | +} |
| 26 | + |
| 27 | +/* Grouping content |
| 28 | + * ========================================================================== */ |
| 29 | + |
| 30 | +/** |
| 31 | + * Remove the margin on nested lists in Chrome, Edge, and Safari. |
| 32 | + */ |
| 33 | + |
| 34 | +dl dl, |
| 35 | +dl ol, |
| 36 | +dl ul, |
| 37 | +ol dl, |
| 38 | +ul dl { |
| 39 | + margin: 0; |
| 40 | +} |
| 41 | + |
| 42 | +/** |
| 43 | + * 1. Add the correct box sizing in Firefox. |
| 44 | + * 2. Correct the inheritance of border color in Firefox. |
| 45 | + */ |
| 46 | + |
| 47 | +hr { |
| 48 | + box-sizing: content-box; /* 1 */ |
| 49 | + color: inherit; /* 2 */ |
| 50 | + height: 0; /* 1 */ |
| 51 | +} |
| 52 | + |
| 53 | +/** |
| 54 | + * 1. Correct the inheritance and scaling of font size in all browsers. |
| 55 | + * 2. Correct the odd `em` font sizing in all browsers. |
| 56 | + */ |
| 57 | + |
| 58 | +pre { |
| 59 | + font-family: monospace, monospace; /* 1 */ |
| 60 | + font-size: 1em; /* 2 */ |
| 61 | +} |
| 62 | + |
| 63 | +/* Text-level semantics |
| 64 | + * ========================================================================== */ |
| 65 | + |
| 66 | +/** |
| 67 | + * Add the correct text decoration in Safari. |
| 68 | + */ |
| 69 | + |
| 70 | +abbr[title] { |
| 71 | + text-decoration: underline; |
| 72 | + text-decoration: underline dotted; |
| 73 | +} |
| 74 | + |
| 75 | +/** |
| 76 | + * Add the correct font weight in Chrome, Edge, and Safari. |
| 77 | + */ |
| 78 | + |
| 79 | +b, |
| 80 | +strong { |
| 81 | + font-weight: bolder; |
| 82 | +} |
| 83 | + |
| 84 | +/** |
| 85 | + * 1. Correct the inheritance and scaling of font size in all browsers. |
| 86 | + * 2. Correct the odd `em` font sizing in all browsers. |
| 87 | + */ |
| 88 | + |
| 89 | +code, |
| 90 | +kbd, |
| 91 | +samp { |
| 92 | + font-family: monospace, monospace; /* 1 */ |
| 93 | + font-size: 1em; /* 2 */ |
| 94 | +} |
| 95 | + |
| 96 | +/** |
| 97 | + * Add the correct font size in all browsers. |
| 98 | + */ |
| 99 | + |
| 100 | +small { |
| 101 | + font-size: 80%; |
| 102 | +} |
| 103 | + |
| 104 | +/* Embedded content |
| 105 | + * ========================================================================== */ |
| 106 | + |
| 107 | +/** |
| 108 | + * Add the correct display in iOS 4-7. |
| 109 | + */ |
| 110 | + |
| 111 | +audio:not([controls]) { |
| 112 | + display: none; |
| 113 | + height: 0; |
| 114 | +} |
| 115 | + |
| 116 | +/* Tabular data |
| 117 | + * ========================================================================== */ |
| 118 | + |
| 119 | +/** |
| 120 | + * 1. Correct table border color inheritance in all Chrome, Edge, and Safari. |
| 121 | + * 2. Remove text indentation from table contents in Chrome, Edge, and Safari. |
| 122 | + */ |
| 123 | + |
| 124 | +table { |
| 125 | + border-color: inherit; /* 1 */ |
| 126 | + text-indent: 0; /* 2 */ |
| 127 | +} |
| 128 | + |
| 129 | +/* Forms |
| 130 | + * ========================================================================== */ |
| 131 | + |
| 132 | +/** |
| 133 | + * Remove the margin on controls in Safari. |
| 134 | + */ |
| 135 | + |
| 136 | +button, |
| 137 | +input, |
| 138 | +select { |
| 139 | + margin: 0; |
| 140 | +} |
| 141 | + |
| 142 | +/** |
| 143 | + * Remove the inheritance of text transform in Firefox. |
| 144 | + */ |
| 145 | + |
| 146 | +button { |
| 147 | + text-transform: none; |
| 148 | +} |
| 149 | + |
| 150 | +/** |
| 151 | + * Correct the inability to style buttons in iOS and Safari. |
| 152 | + */ |
| 153 | + |
| 154 | +button, |
| 155 | +[type="button"], |
| 156 | +[type="reset"], |
| 157 | +[type="submit"] { |
| 158 | + -webkit-appearance: button; |
| 159 | +} |
| 160 | + |
| 161 | +/** |
| 162 | + * Correct the padding in Firefox. |
| 163 | + */ |
| 164 | + |
| 165 | +fieldset { |
| 166 | + padding: 0.35em 0.75em 0.625em; |
| 167 | +} |
| 168 | + |
| 169 | +/** |
| 170 | + * Add the correct vertical alignment in Chrome, Edge, and Firefox. |
| 171 | + */ |
| 172 | + |
| 173 | +progress { |
| 174 | + vertical-align: baseline; |
| 175 | +} |
| 176 | + |
| 177 | +/** |
| 178 | + * Remove the inheritance of text transform in Firefox. |
| 179 | + */ |
| 180 | + |
| 181 | +select { |
| 182 | + text-transform: none; |
| 183 | +} |
| 184 | + |
| 185 | +/** |
| 186 | + * Remove the margin in Firefox and Safari. |
| 187 | + */ |
| 188 | + |
| 189 | +textarea { |
| 190 | + margin: 0; |
| 191 | +} |
| 192 | + |
| 193 | +/** |
| 194 | + * 1. Correct the odd appearance in Chrome, Edge, and Safari. |
| 195 | + * 2. Correct the outline style in Safari. |
| 196 | + */ |
| 197 | + |
| 198 | +[type="search"] { |
| 199 | + -webkit-appearance: textfield; /* 1 */ |
| 200 | + outline-offset: -2px; /* 2 */ |
| 201 | +} |
| 202 | + |
| 203 | +/** |
| 204 | + * Correct the cursor style of increment and decrement buttons in Safari. |
| 205 | + */ |
| 206 | + |
| 207 | +::-webkit-inner-spin-button, |
| 208 | +::-webkit-outer-spin-button { |
| 209 | + height: auto; |
| 210 | +} |
| 211 | + |
| 212 | +/** |
| 213 | + * Correct the text style of placeholders in Chrome, Edge, and Safari. |
| 214 | + */ |
| 215 | + |
| 216 | +::-webkit-input-placeholder { |
| 217 | + color: inherit; |
| 218 | + opacity: 0.54; |
| 219 | +} |
| 220 | + |
| 221 | +/** |
| 222 | + * Remove the inner padding in Chrome, Edge, and Safari on macOS. |
| 223 | + */ |
| 224 | + |
| 225 | +::-webkit-search-decoration { |
| 226 | + -webkit-appearance: none; |
| 227 | +} |
| 228 | + |
| 229 | +/** |
| 230 | + * 1. Correct the inability to style upload buttons in iOS and Safari. |
| 231 | + * 2. Change font properties to `inherit` in Safari. |
| 232 | + */ |
| 233 | + |
| 234 | +::-webkit-file-upload-button { |
| 235 | + -webkit-appearance: button; /* 1 */ |
| 236 | + font: inherit; /* 2 */ |
| 237 | +} |
| 238 | + |
| 239 | +/** |
| 240 | + * Remove the inner border and padding of focus outlines in Firefox. |
| 241 | + */ |
| 242 | + |
| 243 | +::-moz-focus-inner { |
| 244 | + border-style: none; |
| 245 | + padding: 0; |
| 246 | +} |
| 247 | + |
| 248 | +/** |
| 249 | + * Restore the focus outline styles unset by the previous rule in Firefox. |
| 250 | + */ |
| 251 | + |
| 252 | +:-moz-focusring { |
| 253 | + outline: 1px dotted ButtonText; |
| 254 | +} |
| 255 | + |
| 256 | +/** |
| 257 | + * Remove the additional :invalid styles in Firefox. |
| 258 | + */ |
| 259 | + |
| 260 | +:-moz-ui-invalid { |
| 261 | + box-shadow: none; |
| 262 | +} |
| 263 | + |
| 264 | +/* Interactive |
| 265 | + * ========================================================================== */ |
| 266 | + |
| 267 | +/* |
| 268 | + * Add the correct styles in Safari. |
| 269 | + */ |
| 270 | + |
| 271 | +dialog { |
| 272 | + background-color: white; |
| 273 | + border: solid; |
| 274 | + color: black; |
| 275 | + height: -moz-fit-content; |
| 276 | + height: -webkit-fit-content; |
| 277 | + height: fit-content; |
| 278 | + left: 0; |
| 279 | + margin: auto; |
| 280 | + padding: 1em; |
| 281 | + position: absolute; |
| 282 | + right: 0; |
| 283 | + width: -moz-fit-content; |
| 284 | + width: -webkit-fit-content; |
| 285 | + width: fit-content; |
| 286 | +} |
| 287 | + |
| 288 | +dialog:not([open]) { |
| 289 | + display: none; |
| 290 | +} |
| 291 | + |
| 292 | +/* |
| 293 | + * Add the correct display in all browsers. |
| 294 | + */ |
| 295 | + |
| 296 | +summary { |
| 297 | + display: list-item; |
| 298 | +} |
0 commit comments