scaffolding.less 2.5 KB

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