twitter-bootstrap-rails 2.2.8 → 3.2.0

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 (181) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +82 -119
  3. data/Rakefile +4 -6
  4. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  5. data/app/assets/fonts/fontawesome-webfont.svg +471 -366
  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.js +12 -13
  13. data/app/assets/javascripts/twitter/bootstrap/affix.js +137 -0
  14. data/app/assets/javascripts/twitter/bootstrap/alert.js +88 -0
  15. data/app/assets/javascripts/twitter/bootstrap/button.js +107 -0
  16. data/app/assets/javascripts/twitter/bootstrap/carousel.js +205 -0
  17. data/app/assets/javascripts/twitter/bootstrap/collapse.js +170 -0
  18. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +147 -0
  19. data/app/assets/javascripts/twitter/bootstrap/modal.js +243 -0
  20. data/app/assets/javascripts/twitter/bootstrap/popover.js +110 -0
  21. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +153 -0
  22. data/app/assets/javascripts/twitter/bootstrap/tab.js +125 -0
  23. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +399 -0
  24. data/app/assets/javascripts/twitter/bootstrap/transition.js +48 -0
  25. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -890
  26. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +4 -787
  27. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -146
  28. data/app/helpers/bootstrap_flash_helper.rb +7 -5
  29. data/app/helpers/form_errors_helper.rb +22 -0
  30. data/app/helpers/glyph_helper.rb +8 -6
  31. data/app/helpers/modal_helper.rb +29 -21
  32. data/app/helpers/navbar_helper.rb +42 -30
  33. data/app/helpers/twitter_breadcrumbs_helper.rb +3 -2
  34. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +4 -4
  35. data/lib/generators/bootstrap/install/install_generator.rb +3 -2
  36. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +7 -8
  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 +22 -43
  40. data/lib/generators/bootstrap/layout/templates/layout.html.haml +16 -31
  41. data/lib/generators/bootstrap/layout/templates/layout.html.slim +10 -25
  42. data/lib/generators/bootstrap/partial/templates/_login.html.erb +2 -3
  43. data/lib/generators/bootstrap/themed/templates/_form.html.erb +25 -8
  44. data/lib/generators/bootstrap/themed/templates/_form.html.haml +7 -7
  45. data/lib/generators/bootstrap/themed/templates/_form.html.slim +7 -7
  46. data/lib/generators/bootstrap/themed/templates/index.html.erb +2 -2
  47. data/lib/generators/bootstrap/themed/templates/index.html.haml +2 -2
  48. data/lib/generators/bootstrap/themed/templates/index.html.slim +2 -2
  49. data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -7
  50. data/lib/generators/bootstrap/themed/templates/show.html.haml +4 -4
  51. data/lib/generators/bootstrap/themed/templates/show.html.slim +5 -6
  52. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -5
  53. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +3 -3
  54. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +4 -4
  55. data/lib/generators/bootstrap/themed/themed_generator.rb +2 -2
  56. data/lib/twitter/bootstrap/rails/{twitter-bootstrap-breadcrumbs.rb → breadcrumbs.rb} +24 -8
  57. data/lib/twitter/bootstrap/rails/engine.rb +5 -2
  58. data/lib/twitter/bootstrap/rails/version.rb +2 -2
  59. data/spec/lib/breadcrumbs_spec.rb +74 -0
  60. data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +4 -2
  61. data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +15 -15
  62. data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +157 -173
  63. data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +18 -16
  64. data/spec/spec_helper.rb +7 -1
  65. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5797 -0
  66. data/vendor/static-source/bootstrap.less +0 -1
  67. data/vendor/static-source/fontawesome.less +0 -1
  68. data/vendor/static-source/sprites.less +1 -1
  69. data/vendor/toolkit/fontawesome/bordered-pulled.less +16 -0
  70. data/vendor/toolkit/fontawesome/core.less +9 -126
  71. data/vendor/toolkit/fontawesome/fixed-width.less +6 -0
  72. data/vendor/toolkit/fontawesome/font-awesome.less +9 -25
  73. data/vendor/toolkit/fontawesome/icons.less +503 -378
  74. data/vendor/toolkit/fontawesome/larger.less +13 -0
  75. data/vendor/toolkit/fontawesome/list.less +19 -0
  76. data/vendor/toolkit/fontawesome/mixins.less +14 -42
  77. data/vendor/toolkit/fontawesome/path.less +1 -1
  78. data/vendor/toolkit/fontawesome/rotated-flipped.less +9 -0
  79. data/vendor/toolkit/fontawesome/spinning.less +32 -0
  80. data/vendor/toolkit/fontawesome/stacked.less +20 -0
  81. data/vendor/toolkit/fontawesome/variables.less +511 -731
  82. data/vendor/toolkit/twitter/bootstrap/alerts.less +47 -58
  83. data/vendor/toolkit/twitter/bootstrap/badges.less +55 -0
  84. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +27 -39
  85. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +11 -9
  86. data/vendor/toolkit/twitter/bootstrap/button-groups.less +168 -152
  87. data/vendor/toolkit/twitter/bootstrap/buttons.less +101 -170
  88. data/vendor/toolkit/twitter/bootstrap/carousel.less +150 -65
  89. data/vendor/toolkit/twitter/bootstrap/close.less +20 -19
  90. data/vendor/toolkit/twitter/bootstrap/code.less +38 -30
  91. data/vendor/toolkit/twitter/bootstrap/component-animations.less +12 -3
  92. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +115 -148
  93. data/vendor/toolkit/twitter/bootstrap/forms.less +401 -547
  94. data/vendor/toolkit/twitter/bootstrap/glyphicons.less +233 -0
  95. data/vendor/toolkit/twitter/bootstrap/grid.less +74 -11
  96. data/vendor/toolkit/twitter/bootstrap/input-groups.less +166 -0
  97. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +48 -0
  98. data/vendor/toolkit/twitter/bootstrap/labels.less +64 -0
  99. data/vendor/toolkit/twitter/bootstrap/list-group.less +132 -0
  100. data/vendor/toolkit/twitter/bootstrap/media.less +8 -7
  101. data/vendor/toolkit/twitter/bootstrap/mixins.less +36 -699
  102. data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
  103. data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +8 -0
  104. data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
  105. data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +52 -0
  106. data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
  107. data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
  108. data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +85 -0
  109. data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
  110. data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
  111. data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
  112. data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
  113. data/vendor/toolkit/twitter/bootstrap/mixins/image.less +33 -0
  114. data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
  115. data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +29 -0
  116. data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
  117. data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
  118. data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
  119. data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +23 -0
  120. data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
  121. data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
  122. data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
  123. data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
  124. data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
  125. data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
  126. data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
  127. data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
  128. data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +8 -0
  129. data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
  130. data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +224 -0
  131. data/vendor/toolkit/twitter/bootstrap/modals.less +109 -54
  132. data/vendor/toolkit/twitter/bootstrap/navbar.less +542 -384
  133. data/vendor/toolkit/twitter/bootstrap/navs.less +192 -359
  134. data/vendor/toolkit/twitter/bootstrap/normalize.less +425 -0
  135. data/vendor/toolkit/twitter/bootstrap/pager.less +46 -34
  136. data/vendor/toolkit/twitter/bootstrap/pagination.less +70 -105
  137. data/vendor/toolkit/twitter/bootstrap/panels.less +248 -0
  138. data/vendor/toolkit/twitter/bootstrap/popovers.less +61 -61
  139. data/vendor/toolkit/twitter/bootstrap/print.less +101 -0
  140. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +51 -73
  141. data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +34 -0
  142. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +177 -42
  143. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +120 -23
  144. data/vendor/toolkit/twitter/bootstrap/tables.less +171 -182
  145. data/vendor/toolkit/twitter/bootstrap/theme.less +260 -0
  146. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +26 -43
  147. data/vendor/toolkit/twitter/bootstrap/tooltip.less +49 -24
  148. data/vendor/toolkit/twitter/bootstrap/type.less +208 -147
  149. data/vendor/toolkit/twitter/bootstrap/utilities.less +33 -7
  150. data/vendor/toolkit/twitter/bootstrap/variables.less +761 -215
  151. data/vendor/toolkit/twitter/bootstrap/wells.less +7 -7
  152. metadata +128 -138
  153. data/app/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +0 -117
  154. data/app/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +0 -99
  155. data/app/assets/javascripts/twitter/bootstrap/bootstrap-button.js +0 -105
  156. data/app/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +0 -207
  157. data/app/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +0 -167
  158. data/app/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +0 -169
  159. data/app/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +0 -247
  160. data/app/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +0 -114
  161. data/app/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +0 -162
  162. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +0 -144
  163. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +0 -361
  164. data/app/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +0 -60
  165. data/app/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +0 -335
  166. data/test/lib/breadcrumbs_test.rb +0 -75
  167. data/test/test_helper.rb +0 -11
  168. data/vendor/toolkit/fontawesome/bootstrap.less +0 -84
  169. data/vendor/toolkit/fontawesome/extras.less +0 -93
  170. data/vendor/toolkit/fontawesome/font-awesome-ie7.less +0 -1953
  171. data/vendor/toolkit/twitter/bootstrap/accordion.less +0 -34
  172. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +0 -25
  173. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +0 -84
  174. data/vendor/toolkit/twitter/bootstrap/layouts.less +0 -16
  175. data/vendor/toolkit/twitter/bootstrap/reset.less +0 -216
  176. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +0 -28
  177. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +0 -193
  178. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +0 -19
  179. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +0 -189
  180. data/vendor/toolkit/twitter/bootstrap/responsive.less +0 -48
  181. data/vendor/toolkit/twitter/bootstrap/sprites.less +0 -197
@@ -0,0 +1,260 @@
1
+
2
+ //
3
+ // Load core variables and mixins
4
+ // --------------------------------------------------
5
+
6
+ @import "variables.less";
7
+ @import "mixins.less";
8
+
9
+
10
+
11
+ //
12
+ // Buttons
13
+ // --------------------------------------------------
14
+
15
+ // Common styles
16
+ .btn-default,
17
+ .btn-primary,
18
+ .btn-success,
19
+ .btn-info,
20
+ .btn-warning,
21
+ .btn-danger {
22
+ text-shadow: 0 -1px 0 rgba(0,0,0,.2);
23
+ @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);
24
+ .box-shadow(@shadow);
25
+
26
+ // Reset the shadow
27
+ &:active,
28
+ &.active {
29
+ .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
30
+ }
31
+ }
32
+
33
+ // Mixin for generating new styles
34
+ .btn-styles(@btn-color: #555) {
35
+ #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));
36
+ .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners
37
+ background-repeat: repeat-x;
38
+ border-color: darken(@btn-color, 14%);
39
+
40
+ &:hover,
41
+ &:focus {
42
+ background-color: darken(@btn-color, 12%);
43
+ background-position: 0 -15px;
44
+ }
45
+
46
+ &:active,
47
+ &.active {
48
+ background-color: darken(@btn-color, 12%);
49
+ border-color: darken(@btn-color, 14%);
50
+ }
51
+
52
+ &:disabled,
53
+ &[disabled] {
54
+ background-color: darken(@btn-color, 12%);
55
+ background-image: none;
56
+ }
57
+ }
58
+
59
+ // Common styles
60
+ .btn {
61
+ // Remove the gradient for the pressed/active state
62
+ &:active,
63
+ &.active {
64
+ background-image: none;
65
+ }
66
+ }
67
+
68
+ // Apply the mixin to the buttons
69
+ .btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }
70
+ .btn-primary { .btn-styles(@btn-primary-bg); }
71
+ .btn-success { .btn-styles(@btn-success-bg); }
72
+ .btn-info { .btn-styles(@btn-info-bg); }
73
+ .btn-warning { .btn-styles(@btn-warning-bg); }
74
+ .btn-danger { .btn-styles(@btn-danger-bg); }
75
+
76
+
77
+
78
+ //
79
+ // Images
80
+ // --------------------------------------------------
81
+
82
+ .thumbnail,
83
+ .img-thumbnail {
84
+ .box-shadow(0 1px 2px rgba(0,0,0,.075));
85
+ }
86
+
87
+
88
+
89
+ //
90
+ // Dropdowns
91
+ // --------------------------------------------------
92
+
93
+ .dropdown-menu > li > a:hover,
94
+ .dropdown-menu > li > a:focus {
95
+ #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));
96
+ background-color: darken(@dropdown-link-hover-bg, 5%);
97
+ }
98
+ .dropdown-menu > .active > a,
99
+ .dropdown-menu > .active > a:hover,
100
+ .dropdown-menu > .active > a:focus {
101
+ #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
102
+ background-color: darken(@dropdown-link-active-bg, 5%);
103
+ }
104
+
105
+
106
+
107
+ //
108
+ // Navbar
109
+ // --------------------------------------------------
110
+
111
+ // Default navbar
112
+ .navbar-default {
113
+ #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);
114
+ .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
115
+ border-radius: @navbar-border-radius;
116
+ @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
117
+ .box-shadow(@shadow);
118
+
119
+ .navbar-nav > .open > a,
120
+ .navbar-nav > .active > a {
121
+ #gradient > .vertical(@start-color: darken(@navbar-default-bg, 5%); @end-color: darken(@navbar-default-bg, 2%));
122
+ .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));
123
+ }
124
+ }
125
+ .navbar-brand,
126
+ .navbar-nav > li > a {
127
+ text-shadow: 0 1px 0 rgba(255,255,255,.25);
128
+ }
129
+
130
+ // Inverted navbar
131
+ .navbar-inverse {
132
+ #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);
133
+ .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
134
+
135
+ .navbar-nav > .open > a,
136
+ .navbar-nav > .active > a {
137
+ #gradient > .vertical(@start-color: @navbar-inverse-bg; @end-color: lighten(@navbar-inverse-bg, 2.5%));
138
+ .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));
139
+ }
140
+
141
+ .navbar-brand,
142
+ .navbar-nav > li > a {
143
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
144
+ }
145
+ }
146
+
147
+ // Undo rounded corners in static and fixed navbars
148
+ .navbar-static-top,
149
+ .navbar-fixed-top,
150
+ .navbar-fixed-bottom {
151
+ border-radius: 0;
152
+ }
153
+
154
+
155
+
156
+ //
157
+ // Alerts
158
+ // --------------------------------------------------
159
+
160
+ // Common styles
161
+ .alert {
162
+ text-shadow: 0 1px 0 rgba(255,255,255,.2);
163
+ @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);
164
+ .box-shadow(@shadow);
165
+ }
166
+
167
+ // Mixin for generating new styles
168
+ .alert-styles(@color) {
169
+ #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));
170
+ border-color: darken(@color, 15%);
171
+ }
172
+
173
+ // Apply the mixin to the alerts
174
+ .alert-success { .alert-styles(@alert-success-bg); }
175
+ .alert-info { .alert-styles(@alert-info-bg); }
176
+ .alert-warning { .alert-styles(@alert-warning-bg); }
177
+ .alert-danger { .alert-styles(@alert-danger-bg); }
178
+
179
+
180
+
181
+ //
182
+ // Progress bars
183
+ // --------------------------------------------------
184
+
185
+ // Give the progress background some depth
186
+ .progress {
187
+ #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)
188
+ }
189
+
190
+ // Mixin for generating new styles
191
+ .progress-bar-styles(@color) {
192
+ #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));
193
+ }
194
+
195
+ // Apply the mixin to the progress bars
196
+ .progress-bar { .progress-bar-styles(@progress-bar-bg); }
197
+ .progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }
198
+ .progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }
199
+ .progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }
200
+ .progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }
201
+
202
+ // Reset the striped class because our mixins don't do multiple gradients and
203
+ // the above custom styles override the new `.progress-bar-striped` in v3.2.0.
204
+ .progress-bar-striped {
205
+ #gradient > .striped();
206
+ }
207
+
208
+
209
+ //
210
+ // List groups
211
+ // --------------------------------------------------
212
+
213
+ .list-group {
214
+ border-radius: @border-radius-base;
215
+ .box-shadow(0 1px 2px rgba(0,0,0,.075));
216
+ }
217
+ .list-group-item.active,
218
+ .list-group-item.active:hover,
219
+ .list-group-item.active:focus {
220
+ text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);
221
+ #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));
222
+ border-color: darken(@list-group-active-border, 7.5%);
223
+ }
224
+
225
+
226
+
227
+ //
228
+ // Panels
229
+ // --------------------------------------------------
230
+
231
+ // Common styles
232
+ .panel {
233
+ .box-shadow(0 1px 2px rgba(0,0,0,.05));
234
+ }
235
+
236
+ // Mixin for generating new styles
237
+ .panel-heading-styles(@color) {
238
+ #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));
239
+ }
240
+
241
+ // Apply the mixin to the panel headings only
242
+ .panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }
243
+ .panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }
244
+ .panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }
245
+ .panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }
246
+ .panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }
247
+ .panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }
248
+
249
+
250
+
251
+ //
252
+ // Wells
253
+ // --------------------------------------------------
254
+
255
+ .well {
256
+ #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);
257
+ border-color: darken(@well-bg, 10%);
258
+ @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
259
+ .box-shadow(@shadow);
260
+ }
@@ -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
  }