|
1 | 1 | @layer reset {
|
2 |
| - $tags: 'a', 'abbr', 'address', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'blockquote', 'body', 'canvas', 'caption', 'cite', 'code', 'data', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'html', 'i', 'iframe', 'img', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'mark', 'menu', 'nav', 'object', 'ol', 'output', 'p', 'picture', 'pre', 'q', 'ruby', 's', 'samp', 'search', 'section', 'small', 'span', 'strong', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'u', 'ul', 'var', 'video'; |
3 |
| - |
4 |
| - @each $tag in $tags { |
5 |
| - #{$tag} { |
6 |
| - margin: 0; |
7 |
| - padding: 0; |
8 |
| - border: 0; |
9 |
| - font: inherit; |
10 |
| - vertical-align: baseline; |
11 |
| - } |
| 2 | + a, abbr, address, article, aside, audio, b, bdi, bdo, blockquote, body, canvas, caption, cite, code, data, dd, del, details, dfn, dialog, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, main, mark, menu, nav, object, ol, output, p, picture, pre, q, ruby, s, samp, search, section, small, span, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr, track, u, ul, var, video { |
| 3 | + margin: 0; |
| 4 | + padding: 0; |
| 5 | + border: 0; |
| 6 | + font: inherit; |
| 7 | + vertical-align: baseline; |
12 | 8 | }
|
13 | 9 |
|
14 | 10 | // Set line height as 1 to avoid layout nonsense.
|
|
48 | 44 | border-color: #808080;
|
49 | 45 | }
|
50 | 46 |
|
51 |
| - $tags: 'button', 'input', 'select', 'textarea'; |
52 |
| - |
53 |
| - @each $tag in $tags { |
54 |
| - #{$tag} { |
55 |
| - margin: 0; |
56 |
| - padding: 0; |
57 |
| - color: inherit; |
58 |
| - font: inherit; |
59 |
| - line-height: inherit; // Seems to have no effect on <select> (and no effect on <input type="button"> in Chrome) |
60 |
| - vertical-align: baseline; |
61 |
| - } |
| 47 | + button, input, select, textarea { |
| 48 | + margin: 0; |
| 49 | + padding: 0; |
| 50 | + color: inherit; |
| 51 | + font: inherit; |
| 52 | + // line-height seems to have no effect on <select> |
| 53 | + // and no effect on <input type="button"> in Chrome. |
| 54 | + line-height: inherit; |
| 55 | + vertical-align: baseline; |
62 | 56 | }
|
63 | 57 |
|
64 | 58 | // Remove search cancel button in Safari and Chrome.
|
65 |
| - |
66 |
| - $tags: 'input[type="search"]::-webkit-search-cancel-button', 'input[type="search"]::-webkit-search-decoration', 'input[type="search"]::-webkit-search-results-button', 'input[type="search"]::-webkit-search-results-decoration'; |
67 |
| - |
68 |
| - @each $tag in $tags { |
69 |
| - #{$tag} { |
70 |
| - appearance: none; |
71 |
| - } |
| 59 | + input[type="search"]::-webkit-search-cancel-button, |
| 60 | + input[type="search"]::-webkit-search-decoration, |
| 61 | + input[type="search"]::-webkit-search-results-button, |
| 62 | + input[type="search"]::-webkit-search-results-decoration { |
| 63 | + appearance: none; |
72 | 64 | }
|
73 | 65 |
|
74 |
| - $tags: 'button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]'; |
75 |
| - |
76 |
| - @each $tag in $tags { |
77 |
| - #{$tag} { |
78 |
| - cursor: pointer; // Consistency of cursor style between <input type="image"> and others. |
79 |
| - -webkit-appearance: button; // Correct the inability to style clickable types in iOS and Safari. |
80 |
| - } |
| 66 | + button, input[type="button"], input[type="reset"], input[type="submit"] { |
| 67 | + // Consistency of cursor style between <input type="image"> and others. |
| 68 | + cursor: pointer; |
| 69 | + // Correct the inability to style clickable types in iOS and Safari. |
| 70 | + -webkit-appearance: button; |
81 | 71 | }
|
82 | 72 |
|
83 | 73 | ::-webkit-file-upload-button {
|
84 |
| - -webkit-appearance: button; // Correct the inability to style clickable types in iOS and Safari. |
85 |
| - font: inherit; // Change font properties to `inherit` in Safari. |
| 74 | + // Correct the inability to style clickable types in iOS and Safari. |
| 75 | + -webkit-appearance: button; |
| 76 | + // Change font properties to `inherit` in Safari. |
| 77 | + font: inherit; |
86 | 78 | }
|
87 | 79 |
|
88 | 80 | ::selection {
|
|
0 commit comments