twitter-bootstrap-rails 2.2.8 → 3.2.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of twitter-bootstrap-rails might be problematic. Click here for more details.

Files changed (189) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +160 -228
  3. data/Rakefile +4 -6
  4. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  5. data/app/assets/fonts/fontawesome-webfont.svg +279 -38
  6. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  7. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  8. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  9. data/app/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  10. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  11. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  12. data/app/assets/javascripts/twitter/bootstrap/affix.js +142 -0
  13. data/app/assets/javascripts/twitter/bootstrap/alert.js +92 -0
  14. data/app/assets/javascripts/twitter/bootstrap/button.js +110 -0
  15. data/app/assets/javascripts/twitter/bootstrap/carousel.js +223 -0
  16. data/app/assets/javascripts/twitter/bootstrap/collapse.js +170 -0
  17. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +151 -0
  18. data/app/assets/javascripts/twitter/bootstrap/modal.js +280 -0
  19. data/app/assets/javascripts/twitter/bootstrap/popover.js +113 -0
  20. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +170 -0
  21. data/app/assets/javascripts/twitter/bootstrap/tab.js +128 -0
  22. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +457 -0
  23. data/app/assets/javascripts/twitter/bootstrap/transition.js +59 -0
  24. data/app/assets/javascripts/twitter/bootstrap.js +12 -13
  25. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -890
  26. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +2026 -787
  27. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -146
  28. data/app/helpers/bootstrap_flash_helper.rb +14 -7
  29. data/app/helpers/form_errors_helper.rb +22 -0
  30. data/app/helpers/glyph_helper.rb +8 -5
  31. data/app/helpers/modal_helper.rb +26 -22
  32. data/app/helpers/navbar_helper.rb +47 -32
  33. data/app/helpers/twitter_breadcrumbs_helper.rb +6 -2
  34. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +8 -8
  35. data/lib/generators/bootstrap/install/install_generator.rb +3 -2
  36. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +13 -11
  37. data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +5 -0
  38. data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
  39. data/lib/generators/bootstrap/layout/templates/layout.html.erb +27 -48
  40. data/lib/generators/bootstrap/layout/templates/layout.html.haml +19 -34
  41. data/lib/generators/bootstrap/layout/templates/layout.html.slim +13 -30
  42. data/lib/generators/bootstrap/partial/templates/_login.html.erb +2 -3
  43. data/lib/generators/bootstrap/themed/templates/_form.html.erb +30 -10
  44. data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -8
  45. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -9
  46. data/lib/generators/bootstrap/themed/templates/edit.html.slim +1 -1
  47. data/lib/generators/bootstrap/themed/templates/index.html.erb +2 -2
  48. data/lib/generators/bootstrap/themed/templates/index.html.haml +2 -2
  49. data/lib/generators/bootstrap/themed/templates/index.html.slim +4 -5
  50. data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
  51. data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -7
  52. data/lib/generators/bootstrap/themed/templates/show.html.haml +4 -4
  53. data/lib/generators/bootstrap/themed/templates/show.html.slim +6 -7
  54. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -5
  55. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +3 -3
  56. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +4 -4
  57. data/lib/generators/bootstrap/themed/themed_generator.rb +2 -2
  58. data/lib/twitter/bootstrap/rails/breadcrumbs.rb +69 -0
  59. data/lib/twitter/bootstrap/rails/engine.rb +17 -10
  60. data/lib/twitter/bootstrap/rails/version.rb +2 -2
  61. data/spec/lib/breadcrumbs_spec.rb +99 -0
  62. data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +12 -4
  63. data/spec/lib/twitter_bootstrap_rails/bootstrap_flash_helper_spec.rb +128 -0
  64. data/spec/lib/twitter_bootstrap_rails/form_errors_helper_spec.rb +148 -0
  65. data/spec/lib/twitter_bootstrap_rails/glyph_helper_spec.rb +24 -0
  66. data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +15 -15
  67. data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +207 -173
  68. data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +18 -16
  69. data/spec/spec_helper.rb +11 -1
  70. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5796 -1
  71. data/vendor/static-source/bootstrap.less +0 -1
  72. data/vendor/static-source/fontawesome.less +0 -1
  73. data/vendor/static-source/sprites.less +1 -1
  74. data/vendor/toolkit/fontawesome/bordered-pulled.less +16 -0
  75. data/vendor/toolkit/fontawesome/core.less +8 -126
  76. data/vendor/toolkit/fontawesome/fixed-width.less +6 -0
  77. data/vendor/toolkit/fontawesome/font-awesome.less +9 -25
  78. data/vendor/toolkit/fontawesome/icons.less +549 -378
  79. data/vendor/toolkit/fontawesome/larger.less +13 -0
  80. data/vendor/toolkit/fontawesome/list.less +19 -0
  81. data/vendor/toolkit/fontawesome/mixins.less +16 -39
  82. data/vendor/toolkit/fontawesome/path.less +5 -5
  83. data/vendor/toolkit/fontawesome/rotated-flipped.less +20 -0
  84. data/vendor/toolkit/fontawesome/spinning.less +29 -0
  85. data/vendor/toolkit/fontawesome/stacked.less +20 -0
  86. data/vendor/toolkit/fontawesome/variables.less +557 -731
  87. data/vendor/toolkit/twitter/bootstrap/alerts.less +47 -58
  88. data/vendor/toolkit/twitter/bootstrap/badges.less +55 -0
  89. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +26 -39
  90. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +11 -9
  91. data/vendor/toolkit/twitter/bootstrap/button-groups.less +168 -152
  92. data/vendor/toolkit/twitter/bootstrap/buttons.less +101 -170
  93. data/vendor/toolkit/twitter/bootstrap/carousel.less +150 -65
  94. data/vendor/toolkit/twitter/bootstrap/close.less +20 -19
  95. data/vendor/toolkit/twitter/bootstrap/code.less +38 -30
  96. data/vendor/toolkit/twitter/bootstrap/component-animations.less +12 -3
  97. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +115 -148
  98. data/vendor/toolkit/twitter/bootstrap/forms.less +401 -547
  99. data/vendor/toolkit/twitter/bootstrap/glyphicons.less +234 -0
  100. data/vendor/toolkit/twitter/bootstrap/grid.less +74 -11
  101. data/vendor/toolkit/twitter/bootstrap/input-groups.less +166 -0
  102. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +48 -0
  103. data/vendor/toolkit/twitter/bootstrap/labels.less +64 -0
  104. data/vendor/toolkit/twitter/bootstrap/list-group.less +132 -0
  105. data/vendor/toolkit/twitter/bootstrap/media.less +8 -7
  106. data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
  107. data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +8 -0
  108. data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
  109. data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +52 -0
  110. data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
  111. data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
  112. data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +85 -0
  113. data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
  114. data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
  115. data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
  116. data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
  117. data/vendor/toolkit/twitter/bootstrap/mixins/image.less +33 -0
  118. data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
  119. data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +29 -0
  120. data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
  121. data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
  122. data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
  123. data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +23 -0
  124. data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
  125. data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
  126. data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
  127. data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
  128. data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
  129. data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
  130. data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
  131. data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
  132. data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +8 -0
  133. data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
  134. data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +224 -0
  135. data/vendor/toolkit/twitter/bootstrap/mixins.less +36 -699
  136. data/vendor/toolkit/twitter/bootstrap/modals.less +109 -54
  137. data/vendor/toolkit/twitter/bootstrap/navbar.less +542 -384
  138. data/vendor/toolkit/twitter/bootstrap/navs.less +192 -359
  139. data/vendor/toolkit/twitter/bootstrap/normalize.less +425 -0
  140. data/vendor/toolkit/twitter/bootstrap/pager.less +46 -34
  141. data/vendor/toolkit/twitter/bootstrap/pagination.less +70 -105
  142. data/vendor/toolkit/twitter/bootstrap/panels.less +248 -0
  143. data/vendor/toolkit/twitter/bootstrap/popovers.less +61 -61
  144. data/vendor/toolkit/twitter/bootstrap/print.less +101 -0
  145. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +51 -73
  146. data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +34 -0
  147. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +177 -42
  148. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +120 -23
  149. data/vendor/toolkit/twitter/bootstrap/tables.less +171 -182
  150. data/vendor/toolkit/twitter/bootstrap/theme.less +260 -0
  151. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +26 -43
  152. data/vendor/toolkit/twitter/bootstrap/tooltip.less +49 -24
  153. data/vendor/toolkit/twitter/bootstrap/type.less +208 -147
  154. data/vendor/toolkit/twitter/bootstrap/utilities.less +33 -7
  155. data/vendor/toolkit/twitter/bootstrap/variables.less +761 -215
  156. data/vendor/toolkit/twitter/bootstrap/wells.less +7 -7
  157. metadata +156 -130
  158. data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  159. data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  160. data/app/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +0 -117
  161. data/app/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +0 -99
  162. data/app/assets/javascripts/twitter/bootstrap/bootstrap-button.js +0 -105
  163. data/app/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +0 -207
  164. data/app/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +0 -167
  165. data/app/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +0 -169
  166. data/app/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +0 -247
  167. data/app/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +0 -114
  168. data/app/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +0 -162
  169. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +0 -144
  170. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +0 -361
  171. data/app/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +0 -60
  172. data/app/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +0 -335
  173. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +0 -42
  174. data/test/lib/breadcrumbs_test.rb +0 -75
  175. data/test/test_helper.rb +0 -11
  176. data/vendor/toolkit/fontawesome/bootstrap.less +0 -84
  177. data/vendor/toolkit/fontawesome/extras.less +0 -93
  178. data/vendor/toolkit/fontawesome/font-awesome-ie7.less +0 -1953
  179. data/vendor/toolkit/twitter/bootstrap/accordion.less +0 -34
  180. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +0 -25
  181. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +0 -84
  182. data/vendor/toolkit/twitter/bootstrap/layouts.less +0 -16
  183. data/vendor/toolkit/twitter/bootstrap/reset.less +0 -216
  184. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +0 -28
  185. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +0 -193
  186. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +0 -19
  187. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +0 -189
  188. data/vendor/toolkit/twitter/bootstrap/responsive.less +0 -48
  189. data/vendor/toolkit/twitter/bootstrap/sprites.less +0 -197
@@ -3,51 +3,34 @@
3
3
  // --------------------------------------------------
4
4
 
5
5
 
6
- // Note: `.thumbnails` and `.thumbnails > li` are overriden in responsive files
7
-
8
- // Make wrapper ul behave like the grid
9
- .thumbnails {
10
- margin-left: -@gridGutterWidth;
11
- list-style: none;
12
- .clearfix();
13
- }
14
- // Fluid rows have no left margin
15
- .row-fluid .thumbnails {
16
- margin-left: 0;
17
- }
18
-
19
- // Float li to make thumbnails appear in a row
20
- .thumbnails > li {
21
- float: left; // Explicity set the float since we don't require .span* classes
22
- margin-bottom: @baseLineHeight;
23
- margin-left: @gridGutterWidth;
24
- }
25
-
26
- // The actual thumbnail (can be `a` or `div`)
6
+ // Mixin and adjust the regular image class
27
7
  .thumbnail {
28
8
  display: block;
29
- padding: 4px;
30
- line-height: @baseLineHeight;
31
- border: 1px solid #ddd;
32
- .border-radius(@baseBorderRadius);
33
- .box-shadow(0 1px 3px rgba(0,0,0,.055));
9
+ padding: @thumbnail-padding;
10
+ margin-bottom: @line-height-computed;
11
+ line-height: @line-height-base;
12
+ background-color: @thumbnail-bg;
13
+ border: 1px solid @thumbnail-border;
14
+ border-radius: @thumbnail-border-radius;
34
15
  .transition(all .2s ease-in-out);
35
- }
36
- // Add a hover/focus state for linked versions only
37
- a.thumbnail:hover,
38
- a.thumbnail:focus {
39
- border-color: @linkColor;
40
- .box-shadow(0 1px 4px rgba(0,105,214,.25));
41
- }
42
16
 
43
- // Images and captions
44
- .thumbnail > img {
45
- display: block;
46
- max-width: 100%;
47
- margin-left: auto;
48
- margin-right: auto;
49
- }
50
- .thumbnail .caption {
51
- padding: 9px;
52
- color: @gray;
17
+ > img,
18
+ a > img {
19
+ &:extend(.img-responsive);
20
+ margin-left: auto;
21
+ margin-right: auto;
22
+ }
23
+
24
+ // Add a hover state for linked versions only
25
+ a&:hover,
26
+ a&:focus,
27
+ a&.active {
28
+ border-color: @link-color;
29
+ }
30
+
31
+ // Image captions
32
+ .caption {
33
+ padding: @thumbnail-caption-padding;
34
+ color: @thumbnail-caption-color;
35
+ }
53
36
  }
@@ -6,28 +6,29 @@
6
6
  // Base class
7
7
  .tooltip {
8
8
  position: absolute;
9
- z-index: @zindexTooltip;
9
+ z-index: @zindex-tooltip;
10
10
  display: block;
11
11
  visibility: visible;
12
- font-size: 11px;
12
+ font-size: @font-size-small;
13
13
  line-height: 1.4;
14
14
  .opacity(0);
15
- &.in { .opacity(80); }
16
- &.top { margin-top: -3px; padding: 5px 0; }
17
- &.right { margin-left: 3px; padding: 0 5px; }
18
- &.bottom { margin-top: 3px; padding: 5px 0; }
19
- &.left { margin-left: -3px; padding: 0 5px; }
15
+
16
+ &.in { .opacity(@tooltip-opacity); }
17
+ &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }
18
+ &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }
19
+ &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }
20
+ &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }
20
21
  }
21
22
 
22
23
  // Wrapper for the tooltip content
23
24
  .tooltip-inner {
24
- max-width: 200px;
25
- padding: 8px;
26
- color: @tooltipColor;
25
+ max-width: @tooltip-max-width;
26
+ padding: 3px 8px;
27
+ color: @tooltip-color;
27
28
  text-align: center;
28
29
  text-decoration: none;
29
- background-color: @tooltipBackground;
30
- .border-radius(@baseBorderRadius);
30
+ background-color: @tooltip-bg;
31
+ border-radius: @border-radius-base;
31
32
  }
32
33
 
33
34
  // Arrows
@@ -42,29 +43,53 @@
42
43
  &.top .tooltip-arrow {
43
44
  bottom: 0;
44
45
  left: 50%;
45
- margin-left: -@tooltipArrowWidth;
46
- border-width: @tooltipArrowWidth @tooltipArrowWidth 0;
47
- border-top-color: @tooltipArrowColor;
46
+ margin-left: -@tooltip-arrow-width;
47
+ border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
48
+ border-top-color: @tooltip-arrow-color;
49
+ }
50
+ &.top-left .tooltip-arrow {
51
+ bottom: 0;
52
+ left: @tooltip-arrow-width;
53
+ border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
54
+ border-top-color: @tooltip-arrow-color;
55
+ }
56
+ &.top-right .tooltip-arrow {
57
+ bottom: 0;
58
+ right: @tooltip-arrow-width;
59
+ border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
60
+ border-top-color: @tooltip-arrow-color;
48
61
  }
49
62
  &.right .tooltip-arrow {
50
63
  top: 50%;
51
64
  left: 0;
52
- margin-top: -@tooltipArrowWidth;
53
- border-width: @tooltipArrowWidth @tooltipArrowWidth @tooltipArrowWidth 0;
54
- border-right-color: @tooltipArrowColor;
65
+ margin-top: -@tooltip-arrow-width;
66
+ border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
67
+ border-right-color: @tooltip-arrow-color;
55
68
  }
56
69
  &.left .tooltip-arrow {
57
70
  top: 50%;
58
71
  right: 0;
59
- margin-top: -@tooltipArrowWidth;
60
- border-width: @tooltipArrowWidth 0 @tooltipArrowWidth @tooltipArrowWidth;
61
- border-left-color: @tooltipArrowColor;
72
+ margin-top: -@tooltip-arrow-width;
73
+ border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
74
+ border-left-color: @tooltip-arrow-color;
62
75
  }
63
76
  &.bottom .tooltip-arrow {
64
77
  top: 0;
65
78
  left: 50%;
66
- margin-left: -@tooltipArrowWidth;
67
- border-width: 0 @tooltipArrowWidth @tooltipArrowWidth;
68
- border-bottom-color: @tooltipArrowColor;
79
+ margin-left: -@tooltip-arrow-width;
80
+ border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
81
+ border-bottom-color: @tooltip-arrow-color;
82
+ }
83
+ &.bottom-left .tooltip-arrow {
84
+ top: 0;
85
+ left: @tooltip-arrow-width;
86
+ border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
87
+ border-bottom-color: @tooltip-arrow-color;
88
+ }
89
+ &.bottom-right .tooltip-arrow {
90
+ top: 0;
91
+ right: @tooltip-arrow-width;
92
+ border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
93
+ border-bottom-color: @tooltip-arrow-color;
69
94
  }
70
95
  }
@@ -3,134 +3,183 @@
3
3
  // --------------------------------------------------
4
4
 
5
5
 
6
- // Body text
6
+ // Headings
7
7
  // -------------------------
8
8
 
9
- p {
10
- margin: 0 0 @baseLineHeight / 2;
9
+ h1, h2, h3, h4, h5, h6,
10
+ .h1, .h2, .h3, .h4, .h5, .h6 {
11
+ font-family: @headings-font-family;
12
+ font-weight: @headings-font-weight;
13
+ line-height: @headings-line-height;
14
+ color: @headings-color;
15
+
16
+ small,
17
+ .small {
18
+ font-weight: normal;
19
+ line-height: 1;
20
+ color: @headings-small-color;
21
+ }
11
22
  }
12
- .lead {
13
- margin-bottom: @baseLineHeight;
14
- font-size: @baseFontSize * 1.5;
15
- font-weight: 200;
16
- line-height: @baseLineHeight * 1.5;
23
+
24
+ h1, .h1,
25
+ h2, .h2,
26
+ h3, .h3 {
27
+ margin-top: @line-height-computed;
28
+ margin-bottom: (@line-height-computed / 2);
29
+
30
+ small,
31
+ .small {
32
+ font-size: 65%;
33
+ }
34
+ }
35
+ h4, .h4,
36
+ h5, .h5,
37
+ h6, .h6 {
38
+ margin-top: (@line-height-computed / 2);
39
+ margin-bottom: (@line-height-computed / 2);
40
+
41
+ small,
42
+ .small {
43
+ font-size: 75%;
44
+ }
17
45
  }
18
46
 
47
+ h1, .h1 { font-size: @font-size-h1; }
48
+ h2, .h2 { font-size: @font-size-h2; }
49
+ h3, .h3 { font-size: @font-size-h3; }
50
+ h4, .h4 { font-size: @font-size-h4; }
51
+ h5, .h5 { font-size: @font-size-h5; }
52
+ h6, .h6 { font-size: @font-size-h6; }
19
53
 
20
- // Emphasis & misc
54
+
55
+ // Body text
21
56
  // -------------------------
22
57
 
23
- // Ex: 14px base font * 85% = about 12px
24
- small { font-size: 85%; }
58
+ p {
59
+ margin: 0 0 (@line-height-computed / 2);
60
+ }
25
61
 
26
- strong { font-weight: bold; }
27
- em { font-style: italic; }
28
- cite { font-style: normal; }
62
+ .lead {
63
+ margin-bottom: @line-height-computed;
64
+ font-size: floor((@font-size-base * 1.15));
65
+ font-weight: 300;
66
+ line-height: 1.4;
29
67
 
30
- // Utility classes
31
- .muted { color: @grayLight; }
32
- a.muted:hover,
33
- a.muted:focus { color: darken(@grayLight, 10%); }
68
+ @media (min-width: @screen-sm-min) {
69
+ font-size: (@font-size-base * 1.5);
70
+ }
71
+ }
34
72
 
35
- .text-warning { color: @warningText; }
36
- a.text-warning:hover,
37
- a.text-warning:focus { color: darken(@warningText, 10%); }
38
73
 
39
- .text-error { color: @errorText; }
40
- a.text-error:hover,
41
- a.text-error:focus { color: darken(@errorText, 10%); }
74
+ // Emphasis & misc
75
+ // -------------------------
42
76
 
43
- .text-info { color: @infoText; }
44
- a.text-info:hover,
45
- a.text-info:focus { color: darken(@infoText, 10%); }
77
+ // Ex: (12px small font / 14px base font) * 100% = about 85%
78
+ small,
79
+ .small {
80
+ font-size: floor((100% * @font-size-small / @font-size-base));
81
+ }
46
82
 
47
- .text-success { color: @successText; }
48
- a.text-success:hover,
49
- a.text-success:focus { color: darken(@successText, 10%); }
83
+ mark,
84
+ .mark {
85
+ background-color: @state-warning-bg;
86
+ padding: .2em;
87
+ }
50
88
 
89
+ // Alignment
51
90
  .text-left { text-align: left; }
52
91
  .text-right { text-align: right; }
53
92
  .text-center { text-align: center; }
93
+ .text-justify { text-align: justify; }
94
+ .text-nowrap { white-space: nowrap; }
54
95
 
96
+ // Transformation
97
+ .text-lowercase { text-transform: lowercase; }
98
+ .text-uppercase { text-transform: uppercase; }
99
+ .text-capitalize { text-transform: capitalize; }
55
100
 
56
- // Headings
57
- // -------------------------
58
-
59
- h1, h2, h3, h4, h5, h6 {
60
- margin: (@baseLineHeight / 2) 0;
61
- font-family: @headingsFontFamily;
62
- font-weight: @headingsFontWeight;
63
- line-height: @baseLineHeight;
64
- color: @headingsColor;
65
- text-rendering: optimizelegibility; // Fix the character spacing for headings
66
- small {
67
- font-weight: normal;
68
- line-height: 1;
69
- color: @grayLight;
70
- }
101
+ // Contextual colors
102
+ .text-muted {
103
+ color: @text-muted;
104
+ }
105
+ .text-primary {
106
+ .text-emphasis-variant(@brand-primary);
107
+ }
108
+ .text-success {
109
+ .text-emphasis-variant(@state-success-text);
110
+ }
111
+ .text-info {
112
+ .text-emphasis-variant(@state-info-text);
113
+ }
114
+ .text-warning {
115
+ .text-emphasis-variant(@state-warning-text);
116
+ }
117
+ .text-danger {
118
+ .text-emphasis-variant(@state-danger-text);
71
119
  }
72
120
 
73
- h1,
74
- h2,
75
- h3 { line-height: @baseLineHeight * 2; }
76
-
77
- h1 { font-size: @baseFontSize * 2.75; } // ~38px
78
- h2 { font-size: @baseFontSize * 2.25; } // ~32px
79
- h3 { font-size: @baseFontSize * 1.75; } // ~24px
80
- h4 { font-size: @baseFontSize * 1.25; } // ~18px
81
- h5 { font-size: @baseFontSize; }
82
- h6 { font-size: @baseFontSize * 0.85; } // ~12px
83
-
84
- h1 small { font-size: @baseFontSize * 1.75; } // ~24px
85
- h2 small { font-size: @baseFontSize * 1.25; } // ~18px
86
- h3 small { font-size: @baseFontSize; }
87
- h4 small { font-size: @baseFontSize; }
121
+ // Contextual backgrounds
122
+ // For now we'll leave these alongside the text classes until v4 when we can
123
+ // safely shift things around (per SemVer rules).
124
+ .bg-primary {
125
+ // Given the contrast here, this is the only class to have its color inverted
126
+ // automatically.
127
+ color: #fff;
128
+ .bg-variant(@brand-primary);
129
+ }
130
+ .bg-success {
131
+ .bg-variant(@state-success-bg);
132
+ }
133
+ .bg-info {
134
+ .bg-variant(@state-info-bg);
135
+ }
136
+ .bg-warning {
137
+ .bg-variant(@state-warning-bg);
138
+ }
139
+ .bg-danger {
140
+ .bg-variant(@state-danger-bg);
141
+ }
88
142
 
89
143
 
90
144
  // Page header
91
145
  // -------------------------
92
146
 
93
147
  .page-header {
94
- padding-bottom: (@baseLineHeight / 2) - 1;
95
- margin: @baseLineHeight 0 (@baseLineHeight * 1.5);
96
- border-bottom: 1px solid @grayLighter;
148
+ padding-bottom: ((@line-height-computed / 2) - 1);
149
+ margin: (@line-height-computed * 2) 0 @line-height-computed;
150
+ border-bottom: 1px solid @page-header-border-color;
97
151
  }
98
152
 
99
153
 
100
-
101
154
  // Lists
102
- // --------------------------------------------------
155
+ // -------------------------
103
156
 
104
157
  // Unordered and Ordered lists
105
- ul, ol {
106
- padding: 0;
107
- margin: 0 0 @baseLineHeight / 2 25px;
108
- }
109
- ul ul,
110
- ul ol,
111
- ol ol,
112
- ol ul {
113
- margin-bottom: 0;
114
- }
115
- li {
116
- line-height: @baseLineHeight;
158
+ ul,
159
+ ol {
160
+ margin-top: 0;
161
+ margin-bottom: (@line-height-computed / 2);
162
+ ul,
163
+ ol {
164
+ margin-bottom: 0;
165
+ }
117
166
  }
118
167
 
119
- // Remove default list styles
120
- ul.unstyled,
121
- ol.unstyled {
122
- margin-left: 0;
168
+ // List options
169
+
170
+ // Unstyled keeps list items block level, just removes default browser padding and list-style
171
+ .list-unstyled {
172
+ padding-left: 0;
123
173
  list-style: none;
124
174
  }
125
175
 
126
- // Single-line list items
127
- ul.inline,
128
- ol.inline {
129
- margin-left: 0;
130
- list-style: none;
176
+ // Inline turns list items into inline-block
177
+ .list-inline {
178
+ .list-unstyled();
179
+ margin-left: -5px;
180
+
131
181
  > li {
132
182
  display: inline-block;
133
- .ie7-inline-block();
134
183
  padding-left: 5px;
135
184
  padding-right: 5px;
136
185
  }
@@ -138,101 +187,114 @@ ol.inline {
138
187
 
139
188
  // Description Lists
140
189
  dl {
141
- margin-bottom: @baseLineHeight;
190
+ margin-top: 0; // Remove browser default
191
+ margin-bottom: @line-height-computed;
142
192
  }
143
193
  dt,
144
194
  dd {
145
- line-height: @baseLineHeight;
195
+ line-height: @line-height-base;
146
196
  }
147
197
  dt {
148
198
  font-weight: bold;
149
199
  }
150
200
  dd {
151
- margin-left: @baseLineHeight / 2;
201
+ margin-left: 0; // Undo browser default
152
202
  }
153
- // Horizontal layout (like forms)
203
+
204
+ // Horizontal description lists
205
+ //
206
+ // Defaults to being stacked without any of the below styles applied, until the
207
+ // grid breakpoint is reached (default of ~768px).
208
+
154
209
  .dl-horizontal {
155
- .clearfix(); // Ensure dl clears floats if empty dd elements present
156
- dt {
157
- float: left;
158
- width: @horizontalComponentOffset - 20;
159
- clear: left;
160
- text-align: right;
161
- .text-overflow();
162
- }
163
210
  dd {
164
- margin-left: @horizontalComponentOffset;
211
+ &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present
212
+ }
213
+
214
+ @media (min-width: @grid-float-breakpoint) {
215
+ dt {
216
+ float: left;
217
+ width: (@dl-horizontal-offset - 20);
218
+ clear: left;
219
+ text-align: right;
220
+ .text-overflow();
221
+ }
222
+ dd {
223
+ margin-left: @dl-horizontal-offset;
224
+ }
165
225
  }
166
226
  }
167
227
 
168
- // MISC
169
- // ----
170
228
 
171
- // Horizontal rules
172
- hr {
173
- margin: @baseLineHeight 0;
174
- border: 0;
175
- border-top: 1px solid @hrBorder;
176
- border-bottom: 1px solid @white;
177
- }
229
+ // Misc
230
+ // -------------------------
178
231
 
179
232
  // Abbreviations and acronyms
180
233
  abbr[title],
181
- // Added data-* attribute to help out our tooltip plugin, per https://github.com/twitter/bootstrap/issues/5257
234
+ // Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257
182
235
  abbr[data-original-title] {
183
236
  cursor: help;
184
- border-bottom: 1px dotted @grayLight;
237
+ border-bottom: 1px dotted @abbr-border-color;
185
238
  }
186
- abbr.initialism {
239
+ .initialism {
187
240
  font-size: 90%;
188
241
  text-transform: uppercase;
189
242
  }
190
243
 
191
244
  // Blockquotes
192
245
  blockquote {
193
- padding: 0 0 0 15px;
194
- margin: 0 0 @baseLineHeight;
195
- border-left: 5px solid @grayLighter;
196
- p {
197
- margin-bottom: 0;
198
- font-size: @baseFontSize * 1.25;
199
- font-weight: 300;
200
- line-height: 1.25;
246
+ padding: (@line-height-computed / 2) @line-height-computed;
247
+ margin: 0 0 @line-height-computed;
248
+ font-size: @blockquote-font-size;
249
+ border-left: 5px solid @blockquote-border-color;
250
+
251
+ p,
252
+ ul,
253
+ ol {
254
+ &:last-child {
255
+ margin-bottom: 0;
256
+ }
201
257
  }
202
- small {
258
+
259
+ // Note: Deprecated small and .small as of v3.1.0
260
+ // Context: https://github.com/twbs/bootstrap/issues/11660
261
+ footer,
262
+ small,
263
+ .small {
203
264
  display: block;
204
- line-height: @baseLineHeight;
205
- color: @grayLight;
265
+ font-size: 80%; // back to default font-size
266
+ line-height: @line-height-base;
267
+ color: @blockquote-small-color;
268
+
206
269
  &:before {
207
- content: '\2014 \00A0';
270
+ content: '\2014 \00A0'; // em dash, nbsp
208
271
  }
209
272
  }
273
+ }
210
274
 
211
- // Float right with text-align: right
212
- &.pull-right {
213
- float: right;
214
- padding-right: 15px;
215
- padding-left: 0;
216
- border-right: 5px solid @grayLighter;
217
- border-left: 0;
218
- p,
219
- small {
220
- text-align: right;
221
- }
222
- small {
223
- &:before {
224
- content: '';
225
- }
226
- &:after {
227
- content: '\00A0 \2014';
228
- }
275
+ // Opposite alignment of blockquote
276
+ //
277
+ // Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.
278
+ .blockquote-reverse,
279
+ blockquote.pull-right {
280
+ padding-right: 15px;
281
+ padding-left: 0;
282
+ border-right: 5px solid @blockquote-border-color;
283
+ border-left: 0;
284
+ text-align: right;
285
+
286
+ // Account for citation
287
+ footer,
288
+ small,
289
+ .small {
290
+ &:before { content: ''; }
291
+ &:after {
292
+ content: '\00A0 \2014'; // nbsp, em dash
229
293
  }
230
294
  }
231
295
  }
232
296
 
233
297
  // Quotes
234
- q:before,
235
- q:after,
236
298
  blockquote:before,
237
299
  blockquote:after {
238
300
  content: "";
@@ -240,8 +302,7 @@ blockquote:after {
240
302
 
241
303
  // Addresses
242
304
  address {
243
- display: block;
244
- margin-bottom: @baseLineHeight;
305
+ margin-bottom: @line-height-computed;
245
306
  font-style: normal;
246
- line-height: @baseLineHeight;
307
+ line-height: @line-height-base;
247
308
  }