1
0

reset.less 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. //
  2. // Reset CSS
  3. // Adapted from http://github.com/necolas/normalize.css
  4. // --------------------------------------------------
  5. // Display in IE6-9 and FF3
  6. // -------------------------
  7. article,
  8. aside,
  9. details,
  10. figcaption,
  11. figure,
  12. footer,
  13. header,
  14. hgroup,
  15. nav,
  16. section {
  17. display: block;
  18. }
  19. // Display block in IE6-9 and FF3
  20. // -------------------------
  21. audio,
  22. canvas,
  23. video {
  24. display: inline-block;
  25. *display: inline;
  26. *zoom: 1;
  27. }
  28. // Prevents modern browsers from displaying 'audio' without controls
  29. // -------------------------
  30. audio:not([controls]) {
  31. display: none;
  32. }
  33. // Base settings
  34. // -------------------------
  35. html {
  36. font-size: 100%;
  37. -webkit-text-size-adjust: 100%;
  38. -ms-text-size-adjust: 100%;
  39. }
  40. // Focus states
  41. a:focus {
  42. .tab-focus();
  43. }
  44. // Hover & Active
  45. a:hover,
  46. a:active {
  47. outline: 0;
  48. }
  49. // Prevents sub and sup affecting line-height in all browsers
  50. // -------------------------
  51. sub,
  52. sup {
  53. position: relative;
  54. font-size: 75%;
  55. line-height: 0;
  56. vertical-align: baseline;
  57. }
  58. sup {
  59. top: -0.5em;
  60. }
  61. sub {
  62. bottom: -0.25em;
  63. }
  64. // Img border in a's and image quality
  65. // -------------------------
  66. img {
  67. /* Responsive images (ensure images don't scale beyond their parents) */
  68. max-width: 100%; /* Part 1: Set a maxium relative to the parent */
  69. width: auto\9; /* IE7-8 need help adjusting responsive images */
  70. height: auto; /* Part 2: Scale the height according to the width, otherwise you get stretching */
  71. vertical-align: middle;
  72. border: 0;
  73. -ms-interpolation-mode: bicubic;
  74. }
  75. // Prevent max-width from affecting Google Maps
  76. #map_canvas img,
  77. .google-maps img {
  78. max-width: none;
  79. }
  80. // Forms
  81. // -------------------------
  82. // Font size in all browsers, margin changes, misc consistency
  83. button,
  84. input,
  85. select,
  86. textarea {
  87. margin: 0;
  88. font-size: 100%;
  89. vertical-align: middle;
  90. }
  91. button,
  92. input {
  93. *overflow: visible; // Inner spacing ie IE6/7
  94. line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
  95. }
  96. button::-moz-focus-inner,
  97. input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
  98. padding: 0;
  99. border: 0;
  100. }
  101. button,
  102. html input[type="button"], // Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls.
  103. input[type="reset"],
  104. input[type="submit"] {
  105. -webkit-appearance: button; // Corrects inability to style clickable `input` types in iOS.
  106. cursor: pointer; // Improves usability and consistency of cursor style between image-type `input` and others.
  107. }
  108. label,
  109. select,
  110. button,
  111. input[type="button"],
  112. input[type="reset"],
  113. input[type="submit"],
  114. input[type="radio"],
  115. input[type="checkbox"] {
  116. cursor: pointer; // Improves usability and consistency of cursor style between image-type `input` and others.
  117. }
  118. input[type="search"] { // Appearance in Safari/Chrome
  119. .box-sizing(content-box);
  120. -webkit-appearance: textfield;
  121. }
  122. input[type="search"]::-webkit-search-decoration,
  123. input[type="search"]::-webkit-search-cancel-button {
  124. -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
  125. }
  126. textarea {
  127. overflow: auto; // Remove vertical scrollbar in IE6-9
  128. vertical-align: top; // Readability and alignment cross-browser
  129. }
  130. // Printing
  131. // -------------------------
  132. // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
  133. @media print {
  134. * {
  135. text-shadow: none !important;
  136. color: #000 !important; // Black prints faster: h5bp.com/s
  137. background: transparent !important;
  138. box-shadow: none !important;
  139. }
  140. a,
  141. a:visited {
  142. text-decoration: underline;
  143. }
  144. a[href]:after {
  145. content: " (" attr(href) ")";
  146. }
  147. abbr[title]:after {
  148. content: " (" attr(title) ")";
  149. }
  150. // Don't show links for images, or javascript/internal links
  151. .ir a:after,
  152. a[href^="javascript:"]:after,
  153. a[href^="#"]:after {
  154. content: "";
  155. }
  156. pre,
  157. blockquote {
  158. border: 1px solid #999;
  159. page-break-inside: avoid;
  160. }
  161. thead {
  162. display: table-header-group; // h5bp.com/t
  163. }
  164. tr,
  165. img {
  166. page-break-inside: avoid;
  167. }
  168. img {
  169. max-width: 100% !important;
  170. }
  171. @page {
  172. margin: 0.5cm;
  173. }
  174. p,
  175. h2,
  176. h3 {
  177. orphans: 3;
  178. widows: 3;
  179. }
  180. h2,
  181. h3 {
  182. page-break-after: avoid;
  183. }
  184. }