You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

304 lines
5.8 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. // stylelint-disable selector-list-comma-newline-after, selector-no-qualifying-type
  2. //
  3. // Typography
  4. // --------------------------------------------------
  5. // Headings
  6. // -------------------------
  7. h1, h2, h3, h4, h5, h6,
  8. .h1, .h2, .h3, .h4, .h5, .h6 {
  9. font-family: @headings-font-family;
  10. font-weight: @headings-font-weight;
  11. line-height: @headings-line-height;
  12. color: @headings-color;
  13. small,
  14. .small {
  15. font-weight: 400;
  16. line-height: 1;
  17. color: @headings-small-color;
  18. }
  19. }
  20. h1, .h1,
  21. h2, .h2,
  22. h3, .h3 {
  23. margin-top: @line-height-computed;
  24. margin-bottom: (@line-height-computed / 2);
  25. small,
  26. .small {
  27. font-size: 65%;
  28. }
  29. }
  30. h4, .h4,
  31. h5, .h5,
  32. h6, .h6 {
  33. margin-top: (@line-height-computed / 2);
  34. margin-bottom: (@line-height-computed / 2);
  35. small,
  36. .small {
  37. font-size: 75%;
  38. }
  39. }
  40. h1, .h1 { font-size: @font-size-h1; }
  41. h2, .h2 { font-size: @font-size-h2; }
  42. h3, .h3 { font-size: @font-size-h3; }
  43. h4, .h4 { font-size: @font-size-h4; }
  44. h5, .h5 { font-size: @font-size-h5; }
  45. h6, .h6 { font-size: @font-size-h6; }
  46. // Body text
  47. // -------------------------
  48. p {
  49. margin: 0 0 (@line-height-computed / 2);
  50. }
  51. .lead {
  52. margin-bottom: @line-height-computed;
  53. font-size: floor((@font-size-base * 1.15));
  54. font-weight: 300;
  55. line-height: 1.4;
  56. @media (min-width: @screen-sm-min) {
  57. font-size: (@font-size-base * 1.5);
  58. }
  59. }
  60. // Emphasis & misc
  61. // -------------------------
  62. // Ex: (12px small font / 14px base font) * 100% = about 85%
  63. small,
  64. .small {
  65. font-size: floor((100% * @font-size-small / @font-size-base));
  66. }
  67. mark,
  68. .mark {
  69. padding: .2em;
  70. background-color: @state-warning-bg;
  71. }
  72. // Alignment
  73. .text-left { text-align: left; }
  74. .text-right { text-align: right; }
  75. .text-center { text-align: center; }
  76. .text-justify { text-align: justify; }
  77. .text-nowrap { white-space: nowrap; }
  78. // Transformation
  79. .text-lowercase { text-transform: lowercase; }
  80. .text-uppercase { text-transform: uppercase; }
  81. .text-capitalize { text-transform: capitalize; }
  82. // Contextual colors
  83. .text-muted {
  84. color: @text-muted;
  85. }
  86. .text-primary {
  87. .text-emphasis-variant(@brand-primary);
  88. }
  89. .text-success {
  90. .text-emphasis-variant(@state-success-text);
  91. }
  92. .text-info {
  93. .text-emphasis-variant(@state-info-text);
  94. }
  95. .text-warning {
  96. .text-emphasis-variant(@state-warning-text);
  97. }
  98. .text-danger {
  99. .text-emphasis-variant(@state-danger-text);
  100. }
  101. // Contextual backgrounds
  102. // For now we'll leave these alongside the text classes until v4 when we can
  103. // safely shift things around (per SemVer rules).
  104. .bg-primary {
  105. // Given the contrast here, this is the only class to have its color inverted
  106. // automatically.
  107. color: #fff;
  108. .bg-variant(@brand-primary);
  109. }
  110. .bg-success {
  111. .bg-variant(@state-success-bg);
  112. }
  113. .bg-info {
  114. .bg-variant(@state-info-bg);
  115. }
  116. .bg-warning {
  117. .bg-variant(@state-warning-bg);
  118. }
  119. .bg-danger {
  120. .bg-variant(@state-danger-bg);
  121. }
  122. // Page header
  123. // -------------------------
  124. .page-header {
  125. padding-bottom: ((@line-height-computed / 2) - 1);
  126. margin: (@line-height-computed * 2) 0 @line-height-computed;
  127. border-bottom: 1px solid @page-header-border-color;
  128. }
  129. // Lists
  130. // -------------------------
  131. // Unordered and Ordered lists
  132. ul,
  133. ol {
  134. margin-top: 0;
  135. margin-bottom: (@line-height-computed / 2);
  136. ul,
  137. ol {
  138. margin-bottom: 0;
  139. }
  140. }
  141. // List options
  142. // Unstyled keeps list items block level, just removes default browser padding and list-style
  143. .list-unstyled {
  144. padding-left: 0;
  145. list-style: none;
  146. }
  147. // Inline turns list items into inline-block
  148. .list-inline {
  149. .list-unstyled();
  150. margin-left: -5px;
  151. > li {
  152. display: inline-block;
  153. padding-right: 5px;
  154. padding-left: 5px;
  155. }
  156. }
  157. // Description Lists
  158. dl {
  159. margin-top: 0; // Remove browser default
  160. margin-bottom: @line-height-computed;
  161. }
  162. dt,
  163. dd {
  164. line-height: @line-height-base;
  165. }
  166. dt {
  167. font-weight: 700;
  168. }
  169. dd {
  170. margin-left: 0; // Undo browser default
  171. }
  172. // Horizontal description lists
  173. //
  174. // Defaults to being stacked without any of the below styles applied, until the
  175. // grid breakpoint is reached (default of ~768px).
  176. .dl-horizontal {
  177. dd {
  178. &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present
  179. }
  180. @media (min-width: @dl-horizontal-breakpoint) {
  181. dt {
  182. float: left;
  183. width: (@dl-horizontal-offset - 20);
  184. clear: left;
  185. text-align: right;
  186. .text-overflow();
  187. }
  188. dd {
  189. margin-left: @dl-horizontal-offset;
  190. }
  191. }
  192. }
  193. // Misc
  194. // -------------------------
  195. // Abbreviations and acronyms
  196. // Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257
  197. abbr[title],
  198. abbr[data-original-title] {
  199. cursor: help;
  200. }
  201. .initialism {
  202. font-size: 90%;
  203. .text-uppercase();
  204. }
  205. // Blockquotes
  206. blockquote {
  207. padding: (@line-height-computed / 2) @line-height-computed;
  208. margin: 0 0 @line-height-computed;
  209. font-size: @blockquote-font-size;
  210. border-left: 5px solid @blockquote-border-color;
  211. p,
  212. ul,
  213. ol {
  214. &:last-child {
  215. margin-bottom: 0;
  216. }
  217. }
  218. // Note: Deprecated small and .small as of v3.1.0
  219. // Context: https://github.com/twbs/bootstrap/issues/11660
  220. footer,
  221. small,
  222. .small {
  223. display: block;
  224. font-size: 80%; // back to default font-size
  225. line-height: @line-height-base;
  226. color: @blockquote-small-color;
  227. &:before {
  228. content: "\2014 \00A0"; // em dash, nbsp
  229. }
  230. }
  231. }
  232. // Opposite alignment of blockquote
  233. //
  234. // Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.
  235. .blockquote-reverse,
  236. blockquote.pull-right {
  237. padding-right: 15px;
  238. padding-left: 0;
  239. text-align: right;
  240. border-right: 5px solid @blockquote-border-color;
  241. border-left: 0;
  242. // Account for citation
  243. footer,
  244. small,
  245. .small {
  246. &:before { content: ""; }
  247. &:after {
  248. content: "\00A0 \2014"; // nbsp, em dash
  249. }
  250. }
  251. }
  252. // Addresses
  253. address {
  254. margin-bottom: @line-height-computed;
  255. font-style: normal;
  256. line-height: @line-height-base;
  257. }