scaffolding.less 2.9 KB

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