reset.less 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. //
  2. // Modals
  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. max-width: none;
  78. }
  79. // Forms
  80. // -------------------------
  81. // Font size in all browsers, margin changes, misc consistency
  82. button,
  83. input,
  84. select,
  85. textarea {
  86. margin: 0;
  87. font-size: 100%;
  88. vertical-align: middle;
  89. }
  90. button,
  91. input {
  92. *overflow: visible; // Inner spacing ie IE6/7
  93. line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
  94. }
  95. button::-moz-focus-inner,
  96. input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
  97. padding: 0;
  98. border: 0;
  99. }
  100. button,
  101. input[type="button"],
  102. input[type="reset"],
  103. input[type="submit"] {
  104. cursor: pointer; // Cursors on all buttons applied consistently
  105. -webkit-appearance: button; // Style clickable inputs in iOS
  106. }
  107. input[type="search"] { // Appearance in Safari/Chrome
  108. -webkit-box-sizing: content-box;
  109. -moz-box-sizing: content-box;
  110. box-sizing: content-box;
  111. -webkit-appearance: textfield;
  112. }
  113. input[type="search"]::-webkit-search-decoration,
  114. input[type="search"]::-webkit-search-cancel-button {
  115. -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
  116. }
  117. textarea {
  118. overflow: auto; // Remove vertical scrollbar in IE6-9
  119. vertical-align: top; // Readability and alignment cross-browser
  120. }