| 1 | /*
|
|---|
| 2 | 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|---|
| 3 | 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | *,
|
|---|
| 7 | ::before,
|
|---|
| 8 | ::after {
|
|---|
| 9 | box-sizing: border-box; /* 1 */
|
|---|
| 10 | border-width: 0; /* 2 */
|
|---|
| 11 | border-style: solid; /* 2 */
|
|---|
| 12 | border-color: theme('borderColor.DEFAULT', currentColor); /* 2 */
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | ::before,
|
|---|
| 16 | ::after {
|
|---|
| 17 | --tw-content: '';
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | /*
|
|---|
| 21 | 1. Use a consistent sensible line-height in all browsers.
|
|---|
| 22 | 2. Prevent adjustments of font size after orientation changes in iOS.
|
|---|
| 23 | 3. Use a more readable tab size.
|
|---|
| 24 | 4. Use the user's configured `sans` font-family by default.
|
|---|
| 25 | 5. Use the user's configured `sans` font-feature-settings by default.
|
|---|
| 26 | 6. Use the user's configured `sans` font-variation-settings by default.
|
|---|
| 27 | 7. Disable tap highlights on iOS
|
|---|
| 28 | */
|
|---|
| 29 |
|
|---|
| 30 | html,
|
|---|
| 31 | :host {
|
|---|
| 32 | line-height: 1.5; /* 1 */
|
|---|
| 33 | -webkit-text-size-adjust: 100%; /* 2 */
|
|---|
| 34 | -moz-tab-size: 4; /* 3 */
|
|---|
| 35 | tab-size: 4; /* 3 */
|
|---|
| 36 | font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
|
|---|
| 37 | font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
|
|---|
| 38 | font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */
|
|---|
| 39 | -webkit-tap-highlight-color: transparent; /* 7 */
|
|---|
| 40 | }
|
|---|
| 41 |
|
|---|
| 42 | /*
|
|---|
| 43 | 1. Remove the margin in all browsers.
|
|---|
| 44 | 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
|
|---|
| 45 | */
|
|---|
| 46 |
|
|---|
| 47 | body {
|
|---|
| 48 | margin: 0; /* 1 */
|
|---|
| 49 | line-height: inherit; /* 2 */
|
|---|
| 50 | }
|
|---|
| 51 |
|
|---|
| 52 | /*
|
|---|
| 53 | 1. Add the correct height in Firefox.
|
|---|
| 54 | 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
|---|
| 55 | 3. Ensure horizontal rules are visible by default.
|
|---|
| 56 | */
|
|---|
| 57 |
|
|---|
| 58 | hr {
|
|---|
| 59 | height: 0; /* 1 */
|
|---|
| 60 | color: inherit; /* 2 */
|
|---|
| 61 | border-top-width: 1px; /* 3 */
|
|---|
| 62 | }
|
|---|
| 63 |
|
|---|
| 64 | /*
|
|---|
| 65 | Add the correct text decoration in Chrome, Edge, and Safari.
|
|---|
| 66 | */
|
|---|
| 67 |
|
|---|
| 68 | abbr:where([title]) {
|
|---|
| 69 | text-decoration: underline dotted;
|
|---|
| 70 | }
|
|---|
| 71 |
|
|---|
| 72 | /*
|
|---|
| 73 | Remove the default font size and weight for headings.
|
|---|
| 74 | */
|
|---|
| 75 |
|
|---|
| 76 | h1,
|
|---|
| 77 | h2,
|
|---|
| 78 | h3,
|
|---|
| 79 | h4,
|
|---|
| 80 | h5,
|
|---|
| 81 | h6 {
|
|---|
| 82 | font-size: inherit;
|
|---|
| 83 | font-weight: inherit;
|
|---|
| 84 | }
|
|---|
| 85 |
|
|---|
| 86 | /*
|
|---|
| 87 | Reset links to optimize for opt-in styling instead of opt-out.
|
|---|
| 88 | */
|
|---|
| 89 |
|
|---|
| 90 | a {
|
|---|
| 91 | color: inherit;
|
|---|
| 92 | text-decoration: inherit;
|
|---|
| 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. Use the user's configured `mono` font-family by default.
|
|---|
| 106 | 2. Use the user's configured `mono` font-feature-settings by default.
|
|---|
| 107 | 3. Use the user's configured `mono` font-variation-settings by default.
|
|---|
| 108 | 4. Correct the odd `em` font sizing in all browsers.
|
|---|
| 109 | */
|
|---|
| 110 |
|
|---|
| 111 | code,
|
|---|
| 112 | kbd,
|
|---|
| 113 | samp,
|
|---|
| 114 | pre {
|
|---|
| 115 | font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */
|
|---|
| 116 | font-feature-settings: theme('fontFamily.mono[1].fontFeatureSettings', normal); /* 2 */
|
|---|
| 117 | font-variation-settings: theme('fontFamily.mono[1].fontVariationSettings', normal); /* 3 */
|
|---|
| 118 | font-size: 1em; /* 4 */
|
|---|
| 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 | 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)
|
|---|
| 151 | 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)
|
|---|
| 152 | 3. Remove gaps between table borders by default.
|
|---|
| 153 | */
|
|---|
| 154 |
|
|---|
| 155 | table {
|
|---|
| 156 | text-indent: 0; /* 1 */
|
|---|
| 157 | border-color: inherit; /* 2 */
|
|---|
| 158 | border-collapse: collapse; /* 3 */
|
|---|
| 159 | }
|
|---|
| 160 |
|
|---|
| 161 | /*
|
|---|
| 162 | 1. Change the font styles in all browsers.
|
|---|
| 163 | 2. Remove the margin in Firefox and Safari.
|
|---|
| 164 | 3. Remove default padding in all browsers.
|
|---|
| 165 | */
|
|---|
| 166 |
|
|---|
| 167 | button,
|
|---|
| 168 | input,
|
|---|
| 169 | optgroup,
|
|---|
| 170 | select,
|
|---|
| 171 | textarea {
|
|---|
| 172 | font-family: inherit; /* 1 */
|
|---|
| 173 | font-feature-settings: inherit; /* 1 */
|
|---|
| 174 | font-variation-settings: inherit; /* 1 */
|
|---|
| 175 | font-size: 100%; /* 1 */
|
|---|
| 176 | font-weight: inherit; /* 1 */
|
|---|
| 177 | line-height: inherit; /* 1 */
|
|---|
| 178 | letter-spacing: inherit; /* 1 */
|
|---|
| 179 | color: inherit; /* 1 */
|
|---|
| 180 | margin: 0; /* 2 */
|
|---|
| 181 | padding: 0; /* 3 */
|
|---|
| 182 | }
|
|---|
| 183 |
|
|---|
| 184 | /*
|
|---|
| 185 | Remove the inheritance of text transform in Edge and Firefox.
|
|---|
| 186 | */
|
|---|
| 187 |
|
|---|
| 188 | button,
|
|---|
| 189 | select {
|
|---|
| 190 | text-transform: none;
|
|---|
| 191 | }
|
|---|
| 192 |
|
|---|
| 193 | /*
|
|---|
| 194 | 1. Correct the inability to style clickable types in iOS and Safari.
|
|---|
| 195 | 2. Remove default button styles.
|
|---|
| 196 | */
|
|---|
| 197 |
|
|---|
| 198 | button,
|
|---|
| 199 | input:where([type='button']),
|
|---|
| 200 | input:where([type='reset']),
|
|---|
| 201 | input:where([type='submit']) {
|
|---|
| 202 | -webkit-appearance: button; /* 1 */
|
|---|
| 203 | background-color: transparent; /* 2 */
|
|---|
| 204 | background-image: none; /* 2 */
|
|---|
| 205 | }
|
|---|
| 206 |
|
|---|
| 207 | /*
|
|---|
| 208 | Use the modern Firefox focus style for all focusable elements.
|
|---|
| 209 | */
|
|---|
| 210 |
|
|---|
| 211 | :-moz-focusring {
|
|---|
| 212 | outline: auto;
|
|---|
| 213 | }
|
|---|
| 214 |
|
|---|
| 215 | /*
|
|---|
| 216 | Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
|
|---|
| 217 | */
|
|---|
| 218 |
|
|---|
| 219 | :-moz-ui-invalid {
|
|---|
| 220 | box-shadow: none;
|
|---|
| 221 | }
|
|---|
| 222 |
|
|---|
| 223 | /*
|
|---|
| 224 | Add the correct vertical alignment in Chrome and Firefox.
|
|---|
| 225 | */
|
|---|
| 226 |
|
|---|
| 227 | progress {
|
|---|
| 228 | vertical-align: baseline;
|
|---|
| 229 | }
|
|---|
| 230 |
|
|---|
| 231 | /*
|
|---|
| 232 | Correct the cursor style of increment and decrement buttons in Safari.
|
|---|
| 233 | */
|
|---|
| 234 |
|
|---|
| 235 | ::-webkit-inner-spin-button,
|
|---|
| 236 | ::-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 | ::-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 | /*
|
|---|
| 269 | Add the correct display in Chrome and Safari.
|
|---|
| 270 | */
|
|---|
| 271 |
|
|---|
| 272 | summary {
|
|---|
| 273 | display: list-item;
|
|---|
| 274 | }
|
|---|
| 275 |
|
|---|
| 276 | /*
|
|---|
| 277 | Removes the default spacing and border for appropriate elements.
|
|---|
| 278 | */
|
|---|
| 279 |
|
|---|
| 280 | blockquote,
|
|---|
| 281 | dl,
|
|---|
| 282 | dd,
|
|---|
| 283 | h1,
|
|---|
| 284 | h2,
|
|---|
| 285 | h3,
|
|---|
| 286 | h4,
|
|---|
| 287 | h5,
|
|---|
| 288 | h6,
|
|---|
| 289 | hr,
|
|---|
| 290 | figure,
|
|---|
| 291 | p,
|
|---|
| 292 | pre {
|
|---|
| 293 | margin: 0;
|
|---|
| 294 | }
|
|---|
| 295 |
|
|---|
| 296 | fieldset {
|
|---|
| 297 | margin: 0;
|
|---|
| 298 | padding: 0;
|
|---|
| 299 | }
|
|---|
| 300 |
|
|---|
| 301 | legend {
|
|---|
| 302 | padding: 0;
|
|---|
| 303 | }
|
|---|
| 304 |
|
|---|
| 305 | ol,
|
|---|
| 306 | ul,
|
|---|
| 307 | menu {
|
|---|
| 308 | list-style: none;
|
|---|
| 309 | margin: 0;
|
|---|
| 310 | padding: 0;
|
|---|
| 311 | }
|
|---|
| 312 |
|
|---|
| 313 | /*
|
|---|
| 314 | Reset default styling for dialogs.
|
|---|
| 315 | */
|
|---|
| 316 | dialog {
|
|---|
| 317 | padding: 0;
|
|---|
| 318 | }
|
|---|
| 319 |
|
|---|
| 320 | /*
|
|---|
| 321 | Prevent resizing textareas horizontally by default.
|
|---|
| 322 | */
|
|---|
| 323 |
|
|---|
| 324 | textarea {
|
|---|
| 325 | resize: vertical;
|
|---|
| 326 | }
|
|---|
| 327 |
|
|---|
| 328 | /*
|
|---|
| 329 | 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
|
|---|
| 330 | 2. Set the default placeholder color to the user's configured gray 400 color.
|
|---|
| 331 | */
|
|---|
| 332 |
|
|---|
| 333 | input::placeholder,
|
|---|
| 334 | textarea::placeholder {
|
|---|
| 335 | opacity: 1; /* 1 */
|
|---|
| 336 | color: theme('colors.gray.400', #9ca3af); /* 2 */
|
|---|
| 337 | }
|
|---|
| 338 |
|
|---|
| 339 | /*
|
|---|
| 340 | Set the default cursor for buttons.
|
|---|
| 341 | */
|
|---|
| 342 |
|
|---|
| 343 | button,
|
|---|
| 344 | [role="button"] {
|
|---|
| 345 | cursor: pointer;
|
|---|
| 346 | }
|
|---|
| 347 |
|
|---|
| 348 | /*
|
|---|
| 349 | Make sure disabled buttons don't get the pointer cursor.
|
|---|
| 350 | */
|
|---|
| 351 | :disabled {
|
|---|
| 352 | cursor: default;
|
|---|
| 353 | }
|
|---|
| 354 |
|
|---|
| 355 | /*
|
|---|
| 356 | 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
|
|---|
| 357 | 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
|
|---|
| 358 | This can trigger a poorly considered lint error in some tools but is included by design.
|
|---|
| 359 | */
|
|---|
| 360 |
|
|---|
| 361 | img,
|
|---|
| 362 | svg,
|
|---|
| 363 | video,
|
|---|
| 364 | canvas,
|
|---|
| 365 | audio,
|
|---|
| 366 | iframe,
|
|---|
| 367 | embed,
|
|---|
| 368 | object {
|
|---|
| 369 | display: block; /* 1 */
|
|---|
| 370 | vertical-align: middle; /* 2 */
|
|---|
| 371 | }
|
|---|
| 372 |
|
|---|
| 373 | /*
|
|---|
| 374 | Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
|
|---|
| 375 | */
|
|---|
| 376 |
|
|---|
| 377 | img,
|
|---|
| 378 | video {
|
|---|
| 379 | max-width: 100%;
|
|---|
| 380 | height: auto;
|
|---|
| 381 | }
|
|---|
| 382 |
|
|---|
| 383 | /* Make elements with the HTML hidden attribute stay hidden by default */
|
|---|
| 384 | [hidden]:where(:not([hidden="until-found"])) {
|
|---|
| 385 | display: none;
|
|---|
| 386 | }
|
|---|