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