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