scaffolding.less 3.2 KB

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