_reset.scss
1 /* http://meyerweb.com/eric/tools/css/reset/ 2 v2.0-modified | 20110126 3 License: none (public domain) 4 */ 5 6 html, 7 body, 8 div, 9 span, 10 applet, 11 object, 12 iframe, 13 h1, 14 h2, 15 h3, 16 h4, 17 h5, 18 h6, 19 p, 20 blockquote, 21 pre, 22 a, 23 abbr, 24 acronym, 25 address, 26 big, 27 cite, 28 code, 29 del, 30 dfn, 31 em, 32 img, 33 ins, 34 kbd, 35 q, 36 s, 37 samp, 38 small, 39 strike, 40 strong, 41 sub, 42 sup, 43 tt, 44 var, 45 b, 46 u, 47 i, 48 center, 49 dl, 50 dt, 51 dd, 52 ol, 53 ul, 54 li, 55 fieldset, 56 form, 57 label, 58 legend, 59 table, 60 caption, 61 tbody, 62 tfoot, 63 thead, 64 tr, 65 th, 66 td, 67 article, 68 aside, 69 canvas, 70 details, 71 embed, 72 figure, 73 figcaption, 74 footer, 75 header, 76 hgroup, 77 menu, 78 nav, 79 output, 80 ruby, 81 section, 82 summary, 83 time, 84 mark, 85 audio, 86 video { 87 margin: 0; 88 padding: 0; 89 border: 0; 90 font: inherit; 91 vertical-align: baseline; 92 } 93 94 /* make sure to set some focus styles for accessibility */ 95 :focus { 96 outline: 0; 97 } 98 99 /* HTML5 display-role reset for older browsers */ 100 article, 101 aside, 102 details, 103 figcaption, 104 figure, 105 footer, 106 header, 107 hgroup, 108 menu, 109 nav, 110 section { 111 display: block; 112 } 113 114 body { 115 line-height: 1; 116 overflow-x: hidden; 117 } 118 119 ol, 120 ul { 121 list-style: none; 122 } 123 124 blockquote, 125 q { 126 quotes: none; 127 } 128 129 blockquote:before, 130 blockquote:after, 131 q:before, 132 q:after { 133 content: ""; 134 content: none; 135 } 136 137 * { 138 box-sizing: border-box; 139 } 140 141 table { 142 border-collapse: collapse; 143 border-spacing: 0; 144 } 145 146 input[type="search"]::-webkit-search-cancel-button, 147 input[type="search"]::-webkit-search-decoration, 148 input[type="search"]::-webkit-search-results-button, 149 input[type="search"]::-webkit-search-results-decoration { 150 -webkit-appearance: none; 151 -moz-appearance: none; 152 } 153 154 input[type="search"] { 155 -webkit-appearance: none; 156 -moz-appearance: none; 157 -webkit-box-sizing: content-box; 158 -moz-box-sizing: content-box; 159 box-sizing: content-box; 160 } 161 162 textarea { 163 overflow: auto; 164 vertical-align: top; 165 resize: vertical; 166 } 167 168 /** 169 * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. 170 */ 171 172 audio, 173 canvas, 174 video { 175 display: inline-block; 176 *display: inline; 177 *zoom: 1; 178 max-width: 100%; 179 } 180 181 /** 182 * Prevent modern browsers from displaying `audio` without controls. 183 * Remove excess height in iOS 5 devices. 184 */ 185 186 audio:not([controls]) { 187 display: none; 188 height: 0; 189 } 190 191 /** 192 * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. 193 * Known issue: no IE 6 support. 194 */ 195 196 [hidden] { 197 display: none; 198 } 199 200 /** 201 * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using 202 * `em` units. 203 * 2. Prevent iOS text size adjust after orientation change, without disabling 204 * user zoom. 205 */ 206 207 html { 208 font-size: 100%; 209 /* 1 */ 210 -webkit-text-size-adjust: 100%; 211 /* 2 */ 212 -ms-text-size-adjust: 100%; 213 /* 2 */ 214 } 215 216 /** 217 * Address `outline` inconsistency between Chrome and other browsers. 218 */ 219 220 a:focus { 221 outline: thin dotted; 222 } 223 224 /** 225 * Improve readability when focused and also mouse hovered in all browsers. 226 */ 227 228 a:active, 229 a:hover { 230 outline: 0; 231 } 232 233 button:hover { 234 transition: 0.2s; 235 } 236 237 /** 238 * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. 239 * 2. Improve image quality when scaled in IE 7. 240 */ 241 242 img { 243 border: 0; 244 /* 1 */ 245 -ms-interpolation-mode: bicubic; 246 /* 2 */ 247 } 248 249 /** 250 * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. 251 */ 252 253 figure { 254 margin: 0; 255 } 256 257 /** 258 * Correct margin displayed oddly in IE 6/7. 259 */ 260 261 form { 262 margin: 0; 263 } 264 265 /** 266 * Define consistent border, margin, and padding. 267 */ 268 269 fieldset { 270 border: 1px solid #c0c0c0; 271 margin: 0 2px; 272 padding: 0.35em 0.625em 0.75em; 273 } 274 275 /** 276 * 1. Correct color not being inherited in IE 6/7/8/9. 277 * 2. Correct text not wrapping in Firefox 3. 278 * 3. Correct alignment displayed oddly in IE 6/7. 279 */ 280 281 legend { 282 border: 0; 283 /* 1 */ 284 padding: 0; 285 white-space: normal; 286 /* 2 */ 287 *margin-left: -7px; 288 /* 3 */ 289 } 290 291 /** 292 * 1. Correct font size not being inherited in all browsers. 293 * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, 294 * and Chrome. 295 * 3. Improve appearance and consistency in all browsers. 296 */ 297 298 button, 299 input, 300 select, 301 textarea { 302 font-size: 100%; 303 /* 1 */ 304 margin: 0; 305 /* 2 */ 306 vertical-align: baseline; 307 /* 3 */ 308 *vertical-align: middle; 309 /* 3 */ 310 } 311 312 /** 313 * Address Firefox 3+ setting `line-height` on `input` using `!important` in 314 * the UA stylesheet. 315 */ 316 317 button, 318 input { 319 line-height: normal; 320 } 321 322 /** 323 * Address inconsistent `text-transform` inheritance for `button` and `select`. 324 * All other form control elements do not inherit `text-transform` values. 325 * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. 326 * Correct `select` style inheritance in Firefox 4+ and Opera. 327 */ 328 329 button, 330 select { 331 text-transform: none; 332 } 333 334 /** 335 * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 336 * and `video` controls. 337 * 2. Correct inability to style clickable `input` types in iOS. 338 * 3. Improve usability and consistency of cursor style between image-type 339 * `input` and others. 340 * 4. Remove inner spacing in IE 7 without affecting normal text inputs. 341 * Known issue: inner spacing remains in IE 6. 342 */ 343 344 button, 345 html input[type="button"], 346 /* 1 */ 347 input[type="reset"], 348 input[type="submit"] { 349 -webkit-appearance: button; 350 /* 2 */ 351 cursor: pointer; 352 /* 3 */ 353 *overflow: visible; 354 /* 4 */ 355 } 356 357 button { 358 cursor: pointer; 359 } 360 361 /** 362 * Re-set default cursor for disabled elements. 363 */ 364 365 button[disabled], 366 html input[disabled] { 367 cursor: default; 368 } 369 370 /** 371 * 1. Address box sizing set to content-box in IE 8/9. 372 * 2. Remove excess padding in IE 8/9. 373 * 3. Remove excess padding in IE 7. 374 * Known issue: excess padding remains in IE 6. 375 */ 376 377 input[type="checkbox"], 378 input[type="radio"] { 379 box-sizing: border-box; 380 /* 1 */ 381 padding: 0; 382 /* 2 */ 383 *height: 13px; 384 /* 3 */ 385 *width: 13px; 386 /* 3 */ 387 } 388 389 /** 390 * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 391 * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome 392 * (include `-moz` to future-proof). 393 */ 394 395 input[type="search"] { 396 -webkit-appearance: textfield; 397 /* 1 */ 398 -moz-box-sizing: content-box; 399 -webkit-box-sizing: content-box; 400 /* 2 */ 401 box-sizing: content-box; 402 } 403 404 /** 405 * Remove inner padding and search cancel button in Safari 5 and Chrome 406 * on OS X. 407 */ 408 409 input[type="search"]::-webkit-search-cancel-button, 410 input[type="search"]::-webkit-search-decoration { 411 -webkit-appearance: none; 412 } 413 414 /** 415 * Remove inner padding and border in Firefox 3+. 416 */ 417 418 button::-moz-focus-inner, 419 input::-moz-focus-inner { 420 border: 0; 421 padding: 0; 422 } 423 424 /** 425 * 1. Remove default vertical scrollbar in IE 6/7/8/9. 426 * 2. Improve readability and alignment in all browsers. 427 */ 428 429 textarea { 430 overflow: auto; 431 /* 1 */ 432 vertical-align: top; 433 /* 2 */ 434 } 435 436 /** 437 * Remove most spacing between table cells. 438 */ 439 440 table { 441 border-collapse: collapse; 442 border-spacing: 0; 443 } 444 445 html, 446 button, 447 input, 448 select, 449 textarea { 450 color: #222; 451 } 452 453 ::-moz-selection { 454 background: #hansed4fc; 455 text-shadow: none; 456 } 457 458 ::selection { 459 background: #hansed4fc; 460 text-shadow: none; 461 } 462 463 img { 464 vertical-align: middle; 465 } 466 467 fieldset { 468 border: 0; 469 margin: 0; 470 padding: 0; 471 } 472 473 textarea { 474 resize: vertical; 475 } 476 477 input:-webkit-autofill, 478 input:-webkit-autofill:hover, 479 input:-webkit-autofill:focus, 480 textarea:-webkit-autofill, 481 textarea:-webkit-autofill:hover, 482 textarea:-webkit-autofill:focus, 483 select:-webkit-autofill, 484 select:-webkit-autofill:hover, 485 select:-webkit-autofill:focus { 486 -webkit-text-fill-color: #455065; 487 -webkit-box-shadow: 0 0 0px 1000px #fff inset !important; 488 box-shadow: 0 0 0px 1000px #fff inset; 489 transition: background-color 5000s ease-in-out 0s; 490 } 491 492 /* Chrome, Safari, Edge, Opera */ 493 input::-webkit-outer-spin-button, 494 input::-webkit-inner-spin-button { 495 -webkit-appearance: none; 496 margin: 0; 497 } 498 499 /* Firefox */ 500 input[type="number"] { 501 -moz-appearance: textfield; 502 } 503 504 a:active, 505 a:focus { 506 outline: 0; 507 border: none; 508 outline-style: none; 509 -moz-outline-style: none; 510 } 511 512 button:disabled { 513 color: #fff; 514 background: grey; 515 cursor: not-allowed; 516 }