type.less 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. //
  2. // Typography
  3. // --------------------------------------------------
  4. // Body text
  5. // -------------------------
  6. p {
  7. margin: 0 0 @baseLineHeight / 2;
  8. }
  9. .lead {
  10. margin-bottom: @baseLineHeight;
  11. font-size: @baseFontSize * 1.5;
  12. font-weight: 200;
  13. line-height: @baseLineHeight * 1.5;
  14. }
  15. // Emphasis & misc
  16. // -------------------------
  17. // Ex: 14px base font * 85% = about 12px
  18. small { font-size: 85%; }
  19. strong { font-weight: bold; }
  20. em { font-style: italic; color: @headingsColor; }
  21. cite { font-style: normal; }
  22. // Utility classes
  23. .muted { color: @grayLight; }
  24. a.muted:hover,
  25. a.muted:focus { color: darken(@grayLight, 10%); }
  26. .text-warning { color: @warningText; }
  27. a.text-warning:hover,
  28. a.text-warning:focus { color: darken(@warningText, 10%); }
  29. .text-error { color: @errorText; }
  30. a.text-error:hover,
  31. a.text-error:focus { color: darken(@errorText, 10%); }
  32. .text-info { color: @infoText; }
  33. a.text-info:hover,
  34. a.text-info:focus { color: darken(@infoText, 10%); }
  35. .text-success { color: @successText; }
  36. a.text-success:hover,
  37. a.text-success:focus { color: darken(@successText, 10%); }
  38. .text-left { text-align: left; }
  39. .text-right { text-align: right; }
  40. .text-center { text-align: center; }
  41. // Headings
  42. // -------------------------
  43. h1, h2, h3, h4, h5, h6 {
  44. margin: (@baseLineHeight / 2) 0;
  45. font-family: @headingsFontFamily;
  46. font-weight: @headingsFontWeight;
  47. line-height: @baseLineHeight;
  48. color: @headingsColor;
  49. text-rendering: optimizelegibility; // Fix the character spacing for headings
  50. font-style: @headingsFontStyle;
  51. small {
  52. font-weight: normal;
  53. line-height: 1;
  54. color: @grayLight;
  55. }
  56. }
  57. h1,
  58. h2,
  59. h3 { line-height: @baseLineHeight * 2; }
  60. h1 { font-size: @baseFontSize * 2.00; } // ~38px
  61. h2 { font-size: @baseFontSize * 1.75; } // ~32px
  62. h3 { font-size: @baseFontSize * 1.50; } // ~24px
  63. h4 { font-size: @baseFontSize * 1.25; } // ~18px
  64. h5 { font-size: @baseFontSize; }
  65. h6 { font-size: @baseFontSize * 0.85; } // ~12px
  66. h1 small { font-size: @baseFontSize * 1.75; } // ~24px
  67. h2 small { font-size: @baseFontSize * 1.25; } // ~18px
  68. h3 small { font-size: @baseFontSize; }
  69. h4 small { font-size: @baseFontSize; }
  70. // Lists
  71. // --------------------------------------------------
  72. // Unordered and Ordered lists
  73. ul, ol {
  74. padding: 0;
  75. margin: 0 0 @baseLineHeight / 2 25px;
  76. }
  77. ul ul,
  78. ul ol,
  79. ol ol,
  80. ol ul {
  81. margin-bottom: 0;
  82. }
  83. li {
  84. line-height: @baseLineHeight;
  85. }
  86. // Remove default list styles
  87. ul.unstyled,
  88. ol.unstyled {
  89. margin-left: 0;
  90. list-style: none;
  91. }
  92. // Single-line list items
  93. ul.inline,
  94. ol.inline {
  95. margin-left: 0;
  96. list-style: none;
  97. > li {
  98. display: inline-block;
  99. .ie7-inline-block();
  100. padding-left: 5px;
  101. padding-right: 5px;
  102. }
  103. }
  104. // Description Lists
  105. dl {
  106. margin-bottom: @baseLineHeight;
  107. }
  108. dt,
  109. dd {
  110. line-height: @baseLineHeight;
  111. }
  112. dt {
  113. font-weight: bold;
  114. }
  115. dd {
  116. margin-left: @baseLineHeight / 2;
  117. }
  118. // Horizontal layout (like forms)
  119. .dl-horizontal {
  120. .clearfix(); // Ensure dl clears floats if empty dd elements present
  121. dt {
  122. float: left;
  123. width: @horizontalComponentOffset - 20;
  124. clear: left;
  125. text-align: right;
  126. .text-overflow();
  127. }
  128. dd {
  129. margin-left: @horizontalComponentOffset;
  130. }
  131. }
  132. // MISC
  133. // ----
  134. // Horizontal rules
  135. hr {
  136. margin: @baseLineHeight 0;
  137. border: 0;
  138. border-top: 1px solid @hrBorder;
  139. border-bottom: 1px solid @white;
  140. }
  141. // Abbreviations and acronyms
  142. abbr[title],
  143. // Added data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257
  144. abbr[data-original-title] {
  145. cursor: help;
  146. border-bottom: 1px dotted @grayLight;
  147. }
  148. abbr.initialism {
  149. font-size: 90%;
  150. text-transform: uppercase;
  151. }
  152. // Blockquotes
  153. blockquote {
  154. padding: 0 0 0 15px;
  155. margin: 0 0 @baseLineHeight;
  156. border-left: 5px solid @grayLighter;
  157. p {
  158. margin-bottom: 0;
  159. font-size: @baseFontSize * 1.25;
  160. font-weight: 300;
  161. line-height: 1.25;
  162. }
  163. small {
  164. display: block;
  165. line-height: @baseLineHeight;
  166. color: @grayLight;
  167. &:before {
  168. content: '\2014 \00A0';
  169. }
  170. }
  171. // Float right with text-align: right
  172. &.pull-right {
  173. float: right;
  174. padding-right: 15px;
  175. padding-left: 0;
  176. border-right: 5px solid @grayLighter;
  177. border-left: 0;
  178. p,
  179. small {
  180. text-align: right;
  181. }
  182. small {
  183. &:before {
  184. content: '';
  185. }
  186. &:after {
  187. content: '\00A0 \2014';
  188. }
  189. }
  190. }
  191. }
  192. // Quotes
  193. q:before,
  194. q:after,
  195. blockquote:before,
  196. blockquote:after {
  197. content: "";
  198. }
  199. // Addresses
  200. address {
  201. display: block;
  202. margin-bottom: @baseLineHeight;
  203. font-style: normal;
  204. line-height: @baseLineHeight;
  205. }
  206. a.external-link {
  207. color: @blue;
  208. text-decoration: underline;
  209. }
  210. .link {
  211. color: @linkColor;
  212. cursor: pointer;
  213. }
  214. .link:hover {
  215. color: @linkColorHover;
  216. }
  217. .pointer {
  218. cursor: pointer;
  219. }