UNPKG

6.12 kBCSSView Raw
1/*! destyle.css v4.0.0 | MIT License | https://github.com/nicolas-cusan/destyle.css */
2
3/* Reset box-model and set borders */
4/* ============================================ */
5
6*,
7::before,
8::after {
9 box-sizing: border-box;
10 border-style: solid;
11 border-width: 0;
12}
13
14/* Document */
15/* ============================================ */
16
17/**
18 * 1. Correct the line height in all browsers.
19 * 2. Prevent adjustments of font size after orientation changes in iOS.
20 * 3. Remove gray overlay on links for iOS.
21 */
22
23html {
24 line-height: 1.15; /* 1 */
25 -webkit-text-size-adjust: 100%; /* 2 */
26 -webkit-tap-highlight-color: transparent; /* 3*/
27}
28
29/* Sections */
30/* ============================================ */
31
32/**
33 * Remove the margin in all browsers.
34 */
35
36body {
37 margin: 0;
38}
39
40/**
41 * Render the `main` element consistently in IE.
42 */
43
44main {
45 display: block;
46}
47
48/* Vertical rhythm */
49/* ============================================ */
50
51p,
52table,
53blockquote,
54address,
55pre,
56iframe,
57form,
58figure,
59dl {
60 margin: 0;
61}
62
63/* Headings */
64/* ============================================ */
65
66h1,
67h2,
68h3,
69h4,
70h5,
71h6 {
72 font-size: inherit;
73 font-weight: inherit;
74 margin: 0;
75}
76
77/* Lists (enumeration) */
78/* ============================================ */
79
80ul,
81ol {
82 margin: 0;
83 padding: 0;
84 list-style: none;
85}
86
87/* Lists (definition) */
88/* ============================================ */
89
90dt {
91 font-weight: bold;
92}
93
94dd {
95 margin-left: 0;
96}
97
98/* Grouping content */
99/* ============================================ */
100
101/**
102 * 1. Add the correct box sizing in Firefox.
103 * 2. Show the overflow in Edge and IE.
104 */
105
106hr {
107 box-sizing: content-box; /* 1 */
108 height: 0; /* 1 */
109 overflow: visible; /* 2 */
110 border-top-width: 1px;
111 margin: 0;
112 clear: both;
113 color: inherit;
114}
115
116/**
117 * 1. Correct the inheritance and scaling of font size in all browsers.
118 * 2. Correct the odd `em` font sizing in all browsers.
119 */
120
121pre {
122 font-family: monospace, monospace; /* 1 */
123 font-size: inherit; /* 2 */
124}
125
126address {
127 font-style: inherit;
128}
129
130/* Text-level semantics */
131/* ============================================ */
132
133/**
134 * Remove the gray background on active links in IE 10.
135 */
136
137a {
138 background-color: transparent;
139 text-decoration: none;
140 color: inherit;
141}
142
143/**
144 * 1. Remove the bottom border in Chrome 57-
145 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
146 */
147
148abbr[title] {
149 text-decoration: underline dotted; /* 2 */
150}
151
152/**
153 * Add the correct font weight in Chrome, Edge, and Safari.
154 */
155
156b,
157strong {
158 font-weight: bolder;
159}
160
161/**
162 * 1. Correct the inheritance and scaling of font size in all browsers.
163 * 2. Correct the odd `em` font sizing in all browsers.
164 */
165
166code,
167kbd,
168samp {
169 font-family: monospace, monospace; /* 1 */
170 font-size: inherit; /* 2 */
171}
172
173/**
174 * Add the correct font size in all browsers.
175 */
176
177small {
178 font-size: 80%;
179}
180
181/**
182 * Prevent `sub` and `sup` elements from affecting the line height in
183 * all browsers.
184 */
185
186sub,
187sup {
188 font-size: 75%;
189 line-height: 0;
190 position: relative;
191 vertical-align: baseline;
192}
193
194sub {
195 bottom: -0.25em;
196}
197
198sup {
199 top: -0.5em;
200}
201
202/* Replaced content */
203/* ============================================ */
204
205/**
206 * Prevent vertical alignment issues.
207 */
208
209svg,
210img,
211embed,
212object,
213iframe {
214 vertical-align: bottom;
215}
216
217/* Forms */
218/* ============================================ */
219
220/**
221 * Reset form fields to make them styleable.
222 * 1. Make form elements stylable across systems iOS especially.
223 * 2. Inherit text-transform from parent.
224 */
225
226button,
227input,
228optgroup,
229select,
230textarea {
231 -webkit-appearance: none; /* 1 */
232 appearance: none;
233 vertical-align: middle;
234 color: inherit;
235 font: inherit;
236 background: transparent;
237 padding: 0;
238 margin: 0;
239 border-radius: 0;
240 text-align: inherit;
241 text-transform: inherit; /* 2 */
242}
243
244/**
245 * Correct cursors for clickable elements.
246 */
247
248button,
249[type="button"],
250[type="reset"],
251[type="submit"] {
252 cursor: pointer;
253}
254
255button:disabled,
256[type="button"]:disabled,
257[type="reset"]:disabled,
258[type="submit"]:disabled {
259 cursor: default;
260}
261
262/**
263 * Improve outlines for Firefox and unify style with input elements & buttons.
264 */
265
266:-moz-focusring {
267 outline: auto;
268}
269
270select:disabled {
271 opacity: inherit;
272}
273
274/**
275 * Remove padding
276 */
277
278option {
279 padding: 0;
280}
281
282/**
283 * Reset to invisible
284 */
285
286fieldset {
287 margin: 0;
288 padding: 0;
289 min-width: 0;
290}
291
292legend {
293 padding: 0;
294}
295
296/**
297 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
298 */
299
300progress {
301 vertical-align: baseline;
302}
303
304/**
305 * Remove the default vertical scrollbar in IE 10+.
306 */
307
308textarea {
309 overflow: auto;
310}
311
312/**
313 * Correct the cursor style of increment and decrement buttons in Chrome.
314 */
315
316[type="number"]::-webkit-inner-spin-button,
317[type="number"]::-webkit-outer-spin-button {
318 height: auto;
319}
320
321/**
322 * Correct the outline style in Safari.
323 */
324
325[type="search"] {
326 outline-offset: -2px; /* 1 */
327}
328
329/**
330 * Remove the inner padding in Chrome and Safari on macOS.
331 */
332
333[type="search"]::-webkit-search-decoration {
334 -webkit-appearance: none;
335}
336
337/**
338 * 1. Correct the inability to style clickable types in iOS and Safari.
339 * 2. Fix font inheritance.
340 */
341
342::-webkit-file-upload-button {
343 -webkit-appearance: button; /* 1 */
344 font: inherit; /* 2 */
345}
346
347/**
348 * Fix appearance for Firefox
349 */
350[type="number"] {
351 -moz-appearance: textfield;
352}
353
354/**
355 * Clickable labels
356 */
357
358label[for] {
359 cursor: pointer;
360}
361
362/* Interactive */
363/* ============================================ */
364
365/*
366 * Add the correct display in Edge, IE 10+, and Firefox.
367 */
368
369details {
370 display: block;
371}
372
373/*
374 * Add the correct display in all browsers.
375 */
376
377summary {
378 display: list-item;
379}
380
381/*
382 * Remove outline for editable content.
383 */
384
385[contenteditable]:focus {
386 outline: auto;
387}
388
389/* Tables */
390/* ============================================ */
391
392/**
3931. Correct table border color inheritance in all Chrome and Safari.
394*/
395
396table {
397 border-color: inherit; /* 1 */
398 border-collapse: collapse;
399}
400
401caption {
402 text-align: left;
403}
404
405td,
406th {
407 vertical-align: top;
408 padding: 0;
409}
410
411th {
412 text-align: left;
413 font-weight: bold;
414}