-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathreset.scss
388 lines (325 loc) Β· 6.88 KB
/
reset.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
// scss-lint:disable all
// https://github.com/nothingrandom/reset.css
// based off of
// @see normalize: http://necolas.github.io/normalize.css/
// @see Reset CSS: http://meyerweb.com/eric/tools/css/reset/
// with extras taken from bootstrap/foundation
*,
*:before,
*:after {
box-sizing: border-box;
}
html {
line-height: 1.15;
// Prevent text resize after orientation change on iOS
-mos-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
html,
body {
height: 100%;
font-size: 1em;
}
body {
position: relative;
min-height: 100%;
// Remove default margin
margin: 0;
padding: 0;
cursor: default;
// Make text as readable as possible
text-rendering: optimizeLegibility;
}
// HTML 5 Display definitions
// ==============================
// HTML5 block elements not defined correctly in IE 8-11 and Firefox.
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
// Inline block not defined correctly in IE 8-9
audio,
canvas,
progress,
video {
display: inline-block;
}
// Remove gap between elements and their containers
audio,
canvas,
iframe,
img,
progress,
svg,
video {
vertical-align: middle;
}
// Stop modern browsers from showing auto without controls.
// Removes excess height in iOS 5 devices
audio:not([controls]) {
display: none;
height: 0;
}
// Fix the hidden styling in IE 8-10
// Hide the template element in IE 8-11, Safari, and old versions of Firefox
[hidden],
template {
display: none;
}
// Links
// ==============================
// Remove that grey background color from links in IE 10
a {
background-color: transparent;
&:hover {
cursor: pointer;
}
}
// Text
// ==============================
// Remove the bottom border in Chrome 57- and Firefox 39-.
// Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
abbr[title] {
border-bottom: none;
text-decoration: underline;
text-decoration: underline dotted;
}
// Style set to bold
b,
strong {
font-weight: bold;
}
// Styling not present in Safari and Chrome
dfn {
font-style: italic;
}
// Styling not present in IE 8-9
mark {
background: #FFFF00;
color: #000000;
}
// Fixes inconsistency across all browsers
small {
font-size: 80%;
}
// Prevent sub and sup from effecting line height
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sup {
top: -.5em;
}
sub {
bottom: -.25em;
}
// @see https://twitter.com/miketaylr/status/12228805301
::selection,
::-webkit-selection,
::-moz-selection {
background-color: #B4D5FE;
text-shadow: none !important;
}
// Embedded content
// ==============================
// Remove border when inside link in IE 8-10
// Set as a block for styling
img {
display: block;
max-width: 100%;
height: auto;
border: 0;
-ms-interpolation-mode: bicubic;
}
// Correct overflow hidden in IE 9-11
svg:not(:root) {
overflow: hidden;
}
iframe {
border: 0;
}
// Grouping content
// ==============================
// Margin not present in IE 8-9 and Safari
figure {
margin: 1em 40px;
}
// Fixes differences across Firefox and other browsers
hr {
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
// Contain overflow
pre {
overflow: auto;
}
// Fixes odd strange 'em' unit font size rendering in browsers
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
// Forms
// ==============================
// Limitation: By default, Chrome and Safari on macOS allow limited styling of 'select', unless a border is set
// Fixes variations of margins in Firefox, Safari, and Chrome
// Correct color not being inherited
// Correct font properties not being inherited
button,
input,
optgroup,
select,
textarea {
margin: 0;
border-style: solid;
color: inherit;
font: inherit;
}
// Fixes overflow set to hidden in IE 8-11, Edge
button {
overflow: visible;
}
// Fixes inconsistency with 'text-transform' inheritance for 'button' and 'select'
// Button style in IE 8-11, Firefox, and Opera
// Select style in Firefox
button,
select {
text-transform: none;
}
// Avoid webkit bug in Android 4 with native audio and video controls
// Fix inability to style clickable 'input' types in iOS 6
button,
html input[type='button'],
input[type='reset'],
input[type='submit'] {
-moz-appearance: button;
-webkit-appearance: button;
cursor: pointer;
}
// Remove the border-radius of 4px on Chrome macOS.
button,
html input[type='button'],
input[type='reset'],
input[type='submit'],
input[type='file'] {
border-radius: 0;
}
// Set default cursor for disabled elements
button[disabled],
html input[disabled] {
cursor: default;
}
// Remove inner padding and border in Firefox
button::-moz-focus-inner,
input::-moz-focus-inner {
padding: 0;
border: 0;
}
// Fix Firefox setting 'line-height' on 'input' using '!important' in the UA stylesheet
input {
line-height: normal;
}
// Fix 'box-sizing' set to 'content-box' in IE 8-10
// Remove excess padding in IE 8-10
input[type='checkbox'],
input[type='radio'] {
box-sizing: border-box;
padding: 0;
}
// Fix the cursor style for Chrome's buttons
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
height: auto;
}
// Fix 'box-sizing' set to 'border-box' in Safari and Chrome
// Fix 'appearance' set to 'searchfield' in Safari and Chrome
input[type='search'] {
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
-webkit-appearance: textfield;
}
// Remove inner padding and search cancel button in Safari and Chrome on macOS
input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-decoration {
-moz-appearance: none;
-webkit-appearance: none;
}
// Make margin, padding, and border consistent
fieldset {
margin: 0 2px;
padding: .35em .75em .625em;
border: 1px solid #C0C0C0;
}
// Remove padding for usability
// Correct color not being inherited in IE 8-11 (yes, border really does fix this)
legend {
padding: 0;
border: 0;
}
// Remove default vertical scrollbar in IE 8-11
// Only allow for vertical resize
textarea {
overflow: auto;
resize: vertical;
}
// Prevent inherit from lines 84-88
optgroup {
font-weight: bold;
}
// Tables
// ==============================
// Remove spacing between table cells
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
// Lists
// ==============================
ol,
ul {
margin: 0;
padding: 0;
list-style: none;
}
// Tab Index
// ==============================
// Prevent focus outline on links that cannot be accessed via keyboard
[tabindex='-1']:focus {
outline: none !important;
}
// Helper classes
// ==============================
.hide {
display: none !important;
}
.show {
display: block !important;
}
.hidden {
display: none !important;
visibility: hidden !important;
}