scaffolding.less 2.8 KB

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