scaffolding.less 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. //
  2. // Scaffolding
  3. // --------------------------------------------------
  4. // Reset the box-sizing
  5. //
  6. // Heads up! This reset may cause conflicts with some third-party widgets.
  7. // For recommendations on resolving such conflicts, see
  8. // http://getbootstrap.com/getting-started/#third-box-sizing
  9. * {
  10. .box-sizing(border-box);
  11. }
  12. *:before,
  13. *:after {
  14. .box-sizing(border-box);
  15. }
  16. // Body reset
  17. html {
  18. //font-size: 62.5%;
  19. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  20. height: 100%;
  21. }
  22. body {
  23. font-family: @font-family-base;
  24. font-size: @font-size-base;
  25. line-height: @line-height-base;
  26. color: @text-color;
  27. background-color: @body-bg;
  28. min-height: 100%;
  29. position: relative;
  30. & > .content {
  31. min-height: 100vh;
  32. padding-top: @header-height + @content-margin-vertical;
  33. }
  34. .thin-footer {
  35. padding-bottom: @footer-height;
  36. }
  37. }
  38. // Reset fonts for relevant elements
  39. input,
  40. button,
  41. select,
  42. textarea {
  43. font-family: inherit;
  44. font-size: inherit;
  45. line-height: inherit;
  46. }
  47. // Links
  48. a {
  49. color: @link-color;
  50. text-decoration: none;
  51. &:hover,
  52. &:focus {
  53. color: @link-hover-color;
  54. text-decoration: underline;
  55. }
  56. &:focus {
  57. .tab-focus();
  58. }
  59. }
  60. // Figures
  61. //
  62. // We reset this here because previously Normalize had no `figure` margins. This
  63. // ensures we don't break anyone's use of the element.
  64. figure {
  65. margin: 0;
  66. }
  67. // Images
  68. img {
  69. vertical-align: middle;
  70. }
  71. // Responsive images (ensure images don't scale beyond their parents)
  72. .img-responsive {
  73. .img-responsive();
  74. }
  75. // Rounded corners
  76. .img-rounded {
  77. border-radius: @border-radius-large;
  78. }
  79. // Image thumbnails
  80. //
  81. // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
  82. .img-thumbnail {
  83. padding: @thumbnail-padding;
  84. line-height: @line-height-base;
  85. background-color: @thumbnail-bg;
  86. border: 1px solid @thumbnail-border;
  87. border-radius: @thumbnail-border-radius;
  88. .transition(all 0.2s ease-in-out);
  89. // Keep them at most 100% wide
  90. .img-responsive(inline-block);
  91. }
  92. // Perfect circle
  93. .img-circle {
  94. border-radius: 50%; // set radius in percents
  95. }
  96. // Horizontal rules
  97. hr {
  98. margin-top: @line-height-computed;
  99. margin-bottom: @line-height-computed;
  100. border: 0;
  101. border-top: 1px solid @hr-border;
  102. &.thin {
  103. margin-top: @line-height-computed / 2;
  104. margin-bottom: @line-height-computed / 2;
  105. }
  106. }
  107. // Only display content to screen readers
  108. //
  109. // See: http://a11yproject.com/posts/how-to-hide-content/
  110. @sr-only: {
  111. position: absolute;
  112. width: 1px;
  113. height: 1px;
  114. margin: -1px;
  115. padding: 0;
  116. overflow: hidden;
  117. clip: rect(0, 0, 0, 0);
  118. border: 0;
  119. };
  120. .sr-only {
  121. @sr-only();
  122. }
  123. @media (max-width: @screen-xs-max) {
  124. .sr-only-xs {
  125. @sr-only();
  126. }
  127. }
  128. .content {
  129. padding-top: @content-margin-vertical;
  130. padding-bottom: @content-margin-vertical;
  131. }
  132. .content-alt {
  133. background-color: @content-alt-bg-color;
  134. }
  135. .row-spaced {
  136. margin-top: @line-height-computed;
  137. }
  138. .row-spaced-small {
  139. margin-top: @line-height-computed / 2;
  140. }
  141. .row-spaced-large {
  142. margin-top: @line-height-computed * 2;
  143. }