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 | */
|
28 |
|
29 | html {
|
30 | line-height: 1.5; /* 1 */
|
31 | -webkit-text-size-adjust: 100%; /* 2 */
|
32 | -moz-tab-size: 4; /* 3 */
|
33 | tab-size: 4; /* 3 */
|
34 | font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
|
35 | font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
|
36 | font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */
|
37 | }
|
38 |
|
39 | /*
|
40 | 1. Remove the margin in all browsers.
|
41 | 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
|
42 | */
|
43 |
|
44 | body {
|
45 | margin: 0; /* 1 */
|
46 | line-height: inherit; /* 2 */
|
47 | }
|
48 |
|
49 | /*
|
50 | 1. Add the correct height in Firefox.
|
51 | 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
52 | 3. Ensure horizontal rules are visible by default.
|
53 | */
|
54 |
|
55 | hr {
|
56 | height: 0; /* 1 */
|
57 | color: inherit; /* 2 */
|
58 | border-top-width: 1px; /* 3 */
|
59 | }
|
60 |
|
61 | /*
|
62 | Add the correct text decoration in Chrome, Edge, and Safari.
|
63 | */
|
64 |
|
65 | abbr:where([title]) {
|
66 | text-decoration: underline dotted;
|
67 | }
|
68 |
|
69 | /*
|
70 | Remove the default font size and weight for headings.
|
71 | */
|
72 |
|
73 | h1,
|
74 | h2,
|
75 | h3,
|
76 | h4,
|
77 | h5,
|
78 | h6 {
|
79 | font-size: inherit;
|
80 | font-weight: inherit;
|
81 | }
|
82 |
|
83 | /*
|
84 | Reset links to optimize for opt-in styling instead of opt-out.
|
85 | */
|
86 |
|
87 | a {
|
88 | color: inherit;
|
89 | text-decoration: inherit;
|
90 | }
|
91 |
|
92 | /*
|
93 | Add the correct font weight in Edge and Safari.
|
94 | */
|
95 |
|
96 | b,
|
97 | strong {
|
98 | font-weight: bolder;
|
99 | }
|
100 |
|
101 | /*
|
102 | 1. Use the user's configured `mono` font family by default.
|
103 | 2. Correct the odd `em` font sizing in all browsers.
|
104 | */
|
105 |
|
106 | code,
|
107 | kbd,
|
108 | samp,
|
109 | pre {
|
110 | font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */
|
111 | font-size: 1em; /* 2 */
|
112 | }
|
113 |
|
114 | /*
|
115 | Add the correct font size in all browsers.
|
116 | */
|
117 |
|
118 | small {
|
119 | font-size: 80%;
|
120 | }
|
121 |
|
122 | /*
|
123 | Prevent `sub` and `sup` elements from affecting the line height in all browsers.
|
124 | */
|
125 |
|
126 | sub,
|
127 | sup {
|
128 | font-size: 75%;
|
129 | line-height: 0;
|
130 | position: relative;
|
131 | vertical-align: baseline;
|
132 | }
|
133 |
|
134 | sub {
|
135 | bottom: -0.25em;
|
136 | }
|
137 |
|
138 | sup {
|
139 | top: -0.5em;
|
140 | }
|
141 |
|
142 | /*
|
143 | 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)
|
144 | 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)
|
145 | 3. Remove gaps between table borders by default.
|
146 | */
|
147 |
|
148 | table {
|
149 | text-indent: 0; /* 1 */
|
150 | border-color: inherit; /* 2 */
|
151 | border-collapse: collapse; /* 3 */
|
152 | }
|
153 |
|
154 | /*
|
155 | 1. Change the font styles in all browsers.
|
156 | 2. Remove the margin in Firefox and Safari.
|
157 | 3. Remove default padding in all browsers.
|
158 | */
|
159 |
|
160 | button,
|
161 | input,
|
162 | optgroup,
|
163 | select,
|
164 | textarea {
|
165 | font-family: inherit; /* 1 */
|
166 | font-feature-settings: inherit; /* 1 */
|
167 | font-variation-settings: inherit; /* 1 */
|
168 | font-size: 100%; /* 1 */
|
169 | font-weight: inherit; /* 1 */
|
170 | line-height: inherit; /* 1 */
|
171 | color: inherit; /* 1 */
|
172 | margin: 0; /* 2 */
|
173 | padding: 0; /* 3 */
|
174 | }
|
175 |
|
176 | /*
|
177 | Remove the inheritance of text transform in Edge and Firefox.
|
178 | */
|
179 |
|
180 | button,
|
181 | select {
|
182 | text-transform: none;
|
183 | }
|
184 |
|
185 | /*
|
186 | 1. Correct the inability to style clickable types in iOS and Safari.
|
187 | 2. Remove default button styles.
|
188 | */
|
189 |
|
190 | button,
|
191 | [type='button'],
|
192 | [type='reset'],
|
193 | [type='submit'] {
|
194 | -webkit-appearance: button; /* 1 */
|
195 | background-color: transparent; /* 2 */
|
196 | background-image: none; /* 2 */
|
197 | }
|
198 |
|
199 | /*
|
200 | Use the modern Firefox focus style for all focusable elements.
|
201 | */
|
202 |
|
203 | :-moz-focusring {
|
204 | outline: auto;
|
205 | }
|
206 |
|
207 | /*
|
208 | Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
|
209 | */
|
210 |
|
211 | :-moz-ui-invalid {
|
212 | box-shadow: none;
|
213 | }
|
214 |
|
215 | /*
|
216 | Add the correct vertical alignment in Chrome and Firefox.
|
217 | */
|
218 |
|
219 | progress {
|
220 | vertical-align: baseline;
|
221 | }
|
222 |
|
223 | /*
|
224 | Correct the cursor style of increment and decrement buttons in Safari.
|
225 | */
|
226 |
|
227 | ::-webkit-inner-spin-button,
|
228 | ::-webkit-outer-spin-button {
|
229 | height: auto;
|
230 | }
|
231 |
|
232 | /*
|
233 | 1. Correct the odd appearance in Chrome and Safari.
|
234 | 2. Correct the outline style in Safari.
|
235 | */
|
236 |
|
237 | [type='search'] {
|
238 | -webkit-appearance: textfield; /* 1 */
|
239 | outline-offset: -2px; /* 2 */
|
240 | }
|
241 |
|
242 | /*
|
243 | Remove the inner padding in Chrome and Safari on macOS.
|
244 | */
|
245 |
|
246 | ::-webkit-search-decoration {
|
247 | -webkit-appearance: none;
|
248 | }
|
249 |
|
250 | /*
|
251 | 1. Correct the inability to style clickable types in iOS and Safari.
|
252 | 2. Change font properties to `inherit` in Safari.
|
253 | */
|
254 |
|
255 | ::-webkit-file-upload-button {
|
256 | -webkit-appearance: button; /* 1 */
|
257 | font: inherit; /* 2 */
|
258 | }
|
259 |
|
260 | /*
|
261 | Add the correct display in Chrome and Safari.
|
262 | */
|
263 |
|
264 | summary {
|
265 | display: list-item;
|
266 | }
|
267 |
|
268 | /*
|
269 | Removes the default spacing and border for appropriate elements.
|
270 | */
|
271 |
|
272 | blockquote,
|
273 | dl,
|
274 | dd,
|
275 | h1,
|
276 | h2,
|
277 | h3,
|
278 | h4,
|
279 | h5,
|
280 | h6,
|
281 | hr,
|
282 | figure,
|
283 | p,
|
284 | pre {
|
285 | margin: 0;
|
286 | }
|
287 |
|
288 | fieldset {
|
289 | margin: 0;
|
290 | padding: 0;
|
291 | }
|
292 |
|
293 | legend {
|
294 | padding: 0;
|
295 | }
|
296 |
|
297 | ol,
|
298 | ul,
|
299 | menu {
|
300 | list-style: none;
|
301 | margin: 0;
|
302 | padding: 0;
|
303 | }
|
304 |
|
305 | /*
|
306 | Reset default styling for dialogs.
|
307 | */
|
308 | dialog {
|
309 | padding: 0;
|
310 | }
|
311 |
|
312 | /*
|
313 | Prevent resizing textareas horizontally by default.
|
314 | */
|
315 |
|
316 | textarea {
|
317 | resize: vertical;
|
318 | }
|
319 |
|
320 | /*
|
321 | 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
|
322 | 2. Set the default placeholder color to the user's configured gray 400 color.
|
323 | */
|
324 |
|
325 | input::placeholder,
|
326 | textarea::placeholder {
|
327 | opacity: 1; /* 1 */
|
328 | color: theme('colors.gray.400', #9ca3af); /* 2 */
|
329 | }
|
330 |
|
331 | /*
|
332 | Set the default cursor for buttons.
|
333 | */
|
334 |
|
335 | button,
|
336 | [role="button"] {
|
337 | cursor: pointer;
|
338 | }
|
339 |
|
340 | /*
|
341 | Make sure disabled buttons don't get the pointer cursor.
|
342 | */
|
343 | :disabled {
|
344 | cursor: default;
|
345 | }
|
346 |
|
347 | /*
|
348 | 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
|
349 | 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
|
350 | This can trigger a poorly considered lint error in some tools but is included by design.
|
351 | */
|
352 |
|
353 | img,
|
354 | svg,
|
355 | video,
|
356 | canvas,
|
357 | audio,
|
358 | iframe,
|
359 | embed,
|
360 | object {
|
361 | display: block; /* 1 */
|
362 | vertical-align: middle; /* 2 */
|
363 | }
|
364 |
|
365 | /*
|
366 | Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
|
367 | */
|
368 |
|
369 | img,
|
370 | video {
|
371 | max-width: 100%;
|
372 | height: auto;
|
373 | }
|
374 |
|
375 | /* Make elements with the HTML hidden attribute stay hidden by default */
|
376 | [hidden] {
|
377 | display: none;
|
378 | }
|