reset.css 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. /* HTML5 display properties
  2. ============================================== */
  3. article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
  4. audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
  5. audio:not([controls]) { display: none; }
  6. [hidden] { display: none; }
  7. /* Base
  8. ============================================== */
  9. /*
  10. * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
  11. * 2. Force vertical scrollbar in non-IE
  12. * 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
  13. */
  14. html { overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
  15. body { margin: 0; line-height: 100%; }
  16. body, button, input, select, textarea { font-family: sans-serif; color: #222; }
  17. /* Links
  18. ============================================== */
  19. a { color: #0ca6ff; cursor: pointer; text-decoration: none; }
  20. a:link, a:visited { outline: none; }
  21. a:hover { text-decoration: none; }
  22. a:hover, a:active { outline: 0 } /* improved readability on hover */
  23. a:focus { outline: thin dotted; }
  24. a img { border: none; }
  25. /* Typography
  26. ============================================== */
  27. abbr[title] { border-bottom: 1px dotted; }
  28. b, strong { font-weight: bold; }
  29. blockquote { margin: 1em 40px; }
  30. dfn { font-style: italic; }
  31. hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
  32. ins { background: #ff9; color: #000; text-decoration: none; }
  33. mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
  34. /* Redeclare monospace font family: h5bp.com/j */
  35. pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; }
  36. /* Improve readability of pre-formatted text in all browsers */
  37. pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
  38. q { quotes: none; }
  39. q:before, q:after { content: ""; content: none; }
  40. small { font-size: 85%; }
  41. em { font-style:italic; }
  42. /* Position subscript and superscript content without affecting line-height: h5bp.com/k */
  43. sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
  44. sup { top: -0.5em; }
  45. sub { bottom: -0.25em; }
  46. /* Lists
  47. ============================================== */
  48. ul, ol { margin: 0; padding: 0; }
  49. ul li { list-style: none; list-style-image: none; }
  50. dd { margin: 0 0 0 40px; }
  51. nav ul, nav ol { margin: 0; padding: 0; }
  52. /* Embedded Content
  53. ============================================== */
  54. /*
  55. * 1. Improve image quality when scaled in IE7: h5bp.com/d
  56. * 2. Remove the gap between images and borders on image containers: h5bp.com/e
  57. */
  58. img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; display: block }
  59. /* Correct overflow not hidden in IE9 */
  60. svg:not(:root) { overflow: hidden; }
  61. /* Figures
  62. ============================================== */
  63. figure { margin: 0; }
  64. /* Forms
  65. ============================================== */
  66. form { margin: 0; }
  67. fieldset { border: 0; margin: 0; padding: 0; }
  68. /* Indicate that 'label' will shift focus to the associated form element */
  69. label { cursor: pointer; }
  70. /*
  71. * 1. Correct color not inheriting in IE6/7/8/9
  72. * 2. Correct alignment displayed oddly in IE6/7
  73. */
  74. legend { border: 0; *margin-left: -7px; padding: 0; }
  75. /*
  76. * 1. Correct font-size not inheriting in all browsers
  77. * 2. Remove margins in FF3/4 S5 Chrome
  78. * 3. Define consistent vertical alignment display in all browsers
  79. */
  80. button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }
  81. /*
  82. * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
  83. * 2. Correct inner spacing displayed oddly in IE6/7
  84. */
  85. button, input { line-height: normal; *overflow: visible; }
  86. /*
  87. * Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7
  88. */
  89. table button, table input { *overflow: auto; }
  90. /*
  91. * 1. Display hand cursor for clickable form elements
  92. * 2. Allow styling of clickable form elements in iOS
  93. */
  94. button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; }
  95. /*
  96. * Consistent box sizing and appearance
  97. */
  98. input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; }
  99. input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
  100. input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
  101. /*
  102. * Remove inner padding and border in FF3/4: h5bp.com/l
  103. */
  104. button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
  105. /*
  106. * 1. Remove default vertical scrollbar in IE6/7/8/9
  107. * 2. Allow only vertical resizing
  108. */
  109. textarea { overflow: auto; vertical-align: top; resize: vertical; }
  110. /* Colors for form validity */
  111. input:valid, textarea:valid { }
  112. input:invalid, textarea:invalid { background-color: #f0dddd; }
  113. ::-webkit-input-placeholder {
  114. color: #bbb;
  115. }
  116. :-moz-placeholder {
  117. color: #bbb;
  118. }
  119. /* Tables
  120. ============================================== */
  121. table { border-collapse: collapse; border-spacing: 0; }
  122. td { vertical-align: top; }
  123. /* ==|== non-semantic helper classes ========================================
  124. Please define your styles before this section.
  125. ========================================================================== */
  126. /* For image replacement */
  127. .ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; }
  128. .ir br { display: none; }
  129. /* Hide from both screenreaders and browsers: h5bp.com/u */
  130. .hidden { display: none !important; visibility: hidden; }
  131. /* Hide only visually, but have it available for screenreaders: h5bp.com/v */
  132. .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
  133. /* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
  134. .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
  135. /* Hide visually and from screenreaders, but maintain layout */
  136. .invisible { visibility: hidden; }
  137. /* Print Styles
  138. ============================================== */
  139. @media print {
  140. * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
  141. a, a:visited { text-decoration: underline; }
  142. a[href]:after { content: " (" attr(href) ")"; }
  143. abbr[title]:after { content: " (" attr(title) ")"; }
  144. .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
  145. pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
  146. thead { display: table-header-group; } /* h5bp.com/t */
  147. tr, img { page-break-inside: avoid; }
  148. img { max-width: 100% !important; }
  149. @page { margin: 0.5cm; }
  150. p, h2, h3 { orphans: 3; widows: 3; }
  151. h2, h3 { page-break-after: avoid; }
  152. }