reset.less 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. // Reset.less
  2. // Adapted from Normalize.css http://github.com/necolas/normalize.css
  3. // ------------------------------------------------------------------------
  4. // Display in IE6-9 and FF3
  5. // -------------------------
  6. article,
  7. aside,
  8. details,
  9. figcaption,
  10. figure,
  11. footer,
  12. header,
  13. hgroup,
  14. nav,
  15. section {
  16. display: block;
  17. }
  18. // Display block in IE6-9 and FF3
  19. // -------------------------
  20. audio,
  21. canvas,
  22. video {
  23. display: inline-block;
  24. *display: inline;
  25. *zoom: 1;
  26. }
  27. // Prevents modern browsers from displaying 'audio' without controls
  28. // -------------------------
  29. audio:not([controls]) {
  30. display: none;
  31. }
  32. // Base settings
  33. // -------------------------
  34. html {
  35. font-size: 100%;
  36. -webkit-text-size-adjust: 100%;
  37. -ms-text-size-adjust: 100%;
  38. }
  39. // Focus states
  40. a:focus {
  41. .tab-focus();
  42. }
  43. // Hover & Active
  44. a:hover,
  45. a:active {
  46. outline: 0;
  47. }
  48. // Prevents sub and sup affecting line-height in all browsers
  49. // -------------------------
  50. sub,
  51. sup {
  52. position: relative;
  53. font-size: 75%;
  54. line-height: 0;
  55. vertical-align: baseline;
  56. }
  57. sup {
  58. top: -0.5em;
  59. }
  60. sub {
  61. bottom: -0.25em;
  62. }
  63. // Img border in a's and image quality
  64. // -------------------------
  65. img {
  66. height: auto;
  67. border: 0;
  68. -ms-interpolation-mode: bicubic;
  69. vertical-align: middle;
  70. }
  71. // Forms
  72. // -------------------------
  73. // Font size in all browsers, margin changes, misc consistency
  74. button,
  75. input,
  76. select,
  77. textarea {
  78. margin: 0;
  79. font-size: 100%;
  80. vertical-align: middle;
  81. }
  82. button,
  83. input {
  84. *overflow: visible; // Inner spacing ie IE6/7
  85. line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
  86. }
  87. button::-moz-focus-inner,
  88. input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
  89. padding: 0;
  90. border: 0;
  91. }
  92. button,
  93. input[type="button"],
  94. input[type="reset"],
  95. input[type="submit"] {
  96. cursor: pointer; // Cursors on all buttons applied consistently
  97. -webkit-appearance: button; // Style clickable inputs in iOS
  98. }
  99. input[type="search"] { // Appearance in Safari/Chrome
  100. -webkit-appearance: textfield;
  101. -webkit-box-sizing: content-box;
  102. -moz-box-sizing: content-box;
  103. box-sizing: content-box;
  104. }
  105. input[type="search"]::-webkit-search-decoration,
  106. input[type="search"]::-webkit-search-cancel-button {
  107. -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
  108. }
  109. textarea {
  110. overflow: auto; // Remove vertical scrollbar in IE6-9
  111. vertical-align: top; // Readability and alignment cross-browser
  112. }