bootstrap-sass 2.3.1.3 → 3.0.0.0

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

Potentially problematic release.


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

Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +15 -0
  3. data/.travis.yml +12 -0
  4. data/CHANGELOG.md +104 -0
  5. data/CONTRIBUTING.md +79 -0
  6. data/Gemfile +3 -0
  7. data/README.md +114 -78
  8. data/Rakefile +48 -0
  9. data/bootstrap-sass.gemspec +28 -0
  10. data/lib/bootstrap-sass/engine.rb +4 -2
  11. data/lib/bootstrap-sass/version.rb +4 -0
  12. data/lib/bootstrap-sass.rb +10 -5
  13. data/tasks/converter.rb +829 -0
  14. data/templates/project/_variables.scss.erb +3 -0
  15. data/templates/project/manifest.rb +10 -13
  16. data/templates/project/styles.scss +1 -6
  17. data/test/compass_test.rb +8 -0
  18. data/test/compilation_test.rb +13 -0
  19. data/test/dummy/README.rdoc +3 -0
  20. data/test/dummy/Rakefile +6 -0
  21. data/test/dummy/app/assets/images/.keep +0 -0
  22. data/test/dummy/app/assets/javascripts/application.js +2 -0
  23. data/test/dummy/app/assets/stylesheets/application.css.sass +1 -0
  24. data/test/dummy/app/controllers/application_controller.rb +5 -0
  25. data/test/dummy/app/controllers/pages_controller.rb +4 -0
  26. data/test/dummy/app/helpers/application_helper.rb +2 -0
  27. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  28. data/test/dummy/app/views/pages/root.html.slim +11 -0
  29. data/test/dummy/bin/bundle +3 -0
  30. data/test/dummy/bin/rails +4 -0
  31. data/test/dummy/bin/rake +4 -0
  32. data/test/dummy/config/application.rb +17 -0
  33. data/test/dummy/config/boot.rb +5 -0
  34. data/test/dummy/config/environment.rb +5 -0
  35. data/test/dummy/config/environments/development.rb +26 -0
  36. data/test/dummy/config/environments/production.rb +76 -0
  37. data/test/dummy/config/environments/test.rb +30 -0
  38. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  39. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  40. data/test/dummy/config/initializers/inflections.rb +16 -0
  41. data/test/dummy/config/initializers/mime_types.rb +5 -0
  42. data/test/dummy/config/initializers/secret_token.rb +18 -0
  43. data/test/dummy/config/initializers/session_store.rb +3 -0
  44. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  45. data/test/dummy/config/locales/en.yml +3 -0
  46. data/test/dummy/config/locales/es.yml +3 -0
  47. data/test/dummy/config/routes.rb +3 -0
  48. data/test/dummy/config.ru +4 -0
  49. data/test/dummy/db/test.sqlite3 +0 -0
  50. data/test/dummy/lib/assets/.keep +0 -0
  51. data/test/dummy/log/.keep +0 -0
  52. data/test/dummy/log/development.log +0 -0
  53. data/test/dummy/public/404.html +58 -0
  54. data/test/dummy/public/422.html +58 -0
  55. data/test/dummy/public/500.html +57 -0
  56. data/test/dummy/public/favicon.ico +0 -0
  57. data/test/gemfiles/sass_3_2.gemfile +5 -0
  58. data/test/gemfiles/sass_head.gemfile +6 -0
  59. data/test/pages_test.rb +14 -0
  60. data/test/support/integration_test.rb +29 -0
  61. data/test/test_helper.rb +32 -0
  62. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  63. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +228 -0
  64. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  65. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  66. data/vendor/assets/javascripts/bootstrap/affix.js +126 -0
  67. data/vendor/assets/javascripts/bootstrap/alert.js +98 -0
  68. data/vendor/assets/javascripts/bootstrap/button.js +109 -0
  69. data/vendor/assets/javascripts/bootstrap/carousel.js +217 -0
  70. data/vendor/assets/javascripts/bootstrap/collapse.js +179 -0
  71. data/vendor/assets/javascripts/bootstrap/dropdown.js +154 -0
  72. data/vendor/assets/javascripts/bootstrap/modal.js +246 -0
  73. data/vendor/assets/javascripts/bootstrap/popover.js +117 -0
  74. data/vendor/assets/javascripts/bootstrap/scrollspy.js +158 -0
  75. data/vendor/assets/javascripts/bootstrap/tab.js +135 -0
  76. data/vendor/assets/javascripts/bootstrap/tooltip.js +386 -0
  77. data/vendor/assets/javascripts/bootstrap/transition.js +56 -0
  78. data/vendor/assets/javascripts/bootstrap.js +12 -13
  79. data/vendor/assets/stylesheets/bootstrap/_alerts.scss +46 -58
  80. data/vendor/assets/stylesheets/bootstrap/_badges.scss +51 -0
  81. data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +8 -9
  82. data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +173 -154
  83. data/vendor/assets/stylesheets/bootstrap/_buttons.scss +97 -165
  84. data/vendor/assets/stylesheets/bootstrap/_carousel.scss +116 -65
  85. data/vendor/assets/stylesheets/bootstrap/_close.scss +11 -8
  86. data/vendor/assets/stylesheets/bootstrap/_code.scss +16 -21
  87. data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +10 -3
  88. data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +103 -146
  89. data/vendor/assets/stylesheets/bootstrap/_forms.scss +222 -559
  90. data/vendor/assets/stylesheets/bootstrap/_glyphicons.scss +232 -0
  91. data/vendor/assets/stylesheets/bootstrap/_grid.scss +336 -11
  92. data/vendor/assets/stylesheets/bootstrap/_input-groups.scss +127 -0
  93. data/vendor/assets/stylesheets/bootstrap/_jumbotron.scss +40 -0
  94. data/vendor/assets/stylesheets/bootstrap/_labels.scss +58 -0
  95. data/vendor/assets/stylesheets/bootstrap/_list-group.scss +90 -0
  96. data/vendor/assets/stylesheets/bootstrap/_media.scss +8 -7
  97. data/vendor/assets/stylesheets/bootstrap/_mixins.scss +470 -430
  98. data/vendor/assets/stylesheets/bootstrap/_modals.scss +103 -52
  99. data/vendor/assets/stylesheets/bootstrap/_navbar.scss +511 -383
  100. data/vendor/assets/stylesheets/bootstrap/_navs.scss +169 -349
  101. data/vendor/assets/stylesheets/bootstrap/_normalize.scss +396 -0
  102. data/vendor/assets/stylesheets/bootstrap/_pager.scss +45 -33
  103. data/vendor/assets/stylesheets/bootstrap/_pagination.scss +65 -105
  104. data/vendor/assets/stylesheets/bootstrap/_panels.scss +148 -0
  105. data/vendor/assets/stylesheets/bootstrap/_popovers.scss +51 -51
  106. data/vendor/assets/stylesheets/bootstrap/_print.scss +100 -0
  107. data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +28 -55
  108. data/vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss +180 -45
  109. data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +101 -24
  110. data/vendor/assets/stylesheets/bootstrap/_tables.scss +169 -168
  111. data/vendor/assets/stylesheets/bootstrap/_theme.scss +232 -0
  112. data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +11 -33
  113. data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +45 -20
  114. data/vendor/assets/stylesheets/bootstrap/_type.scss +101 -110
  115. data/vendor/assets/stylesheets/bootstrap/_utilities.scss +19 -22
  116. data/vendor/assets/stylesheets/bootstrap/_variables.scss +498 -179
  117. data/vendor/assets/stylesheets/bootstrap/_wells.scss +7 -7
  118. data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +29 -33
  119. metadata +226 -44
  120. data/templates/project/_variables.scss +0 -301
  121. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  122. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  123. data/vendor/assets/javascripts/bootstrap-affix.js +0 -117
  124. data/vendor/assets/javascripts/bootstrap-alert.js +0 -99
  125. data/vendor/assets/javascripts/bootstrap-button.js +0 -105
  126. data/vendor/assets/javascripts/bootstrap-carousel.js +0 -207
  127. data/vendor/assets/javascripts/bootstrap-collapse.js +0 -167
  128. data/vendor/assets/javascripts/bootstrap-dropdown.js +0 -165
  129. data/vendor/assets/javascripts/bootstrap-modal.js +0 -247
  130. data/vendor/assets/javascripts/bootstrap-popover.js +0 -114
  131. data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -162
  132. data/vendor/assets/javascripts/bootstrap-tab.js +0 -144
  133. data/vendor/assets/javascripts/bootstrap-tooltip.js +0 -361
  134. data/vendor/assets/javascripts/bootstrap-transition.js +0 -60
  135. data/vendor/assets/javascripts/bootstrap-typeahead.js +0 -335
  136. data/vendor/assets/stylesheets/bootstrap/_accordion.scss +0 -34
  137. data/vendor/assets/stylesheets/bootstrap/_hero-unit.scss +0 -25
  138. data/vendor/assets/stylesheets/bootstrap/_labels-badges.scss +0 -83
  139. data/vendor/assets/stylesheets/bootstrap/_layouts.scss +0 -16
  140. data/vendor/assets/stylesheets/bootstrap/_reset.scss +0 -216
  141. data/vendor/assets/stylesheets/bootstrap/_responsive-1200px-min.scss +0 -28
  142. data/vendor/assets/stylesheets/bootstrap/_responsive-767px-max.scss +0 -193
  143. data/vendor/assets/stylesheets/bootstrap/_responsive-768px-979px.scss +0 -19
  144. data/vendor/assets/stylesheets/bootstrap/_responsive-navbar.scss +0 -189
  145. data/vendor/assets/stylesheets/bootstrap/_sprites.scss +0 -197
  146. data/vendor/assets/stylesheets/bootstrap/responsive.scss +0 -48
  147. data/vendor/assets/stylesheets/bootstrap-responsive.scss +0 -1
@@ -3,233 +3,234 @@
3
3
  // --------------------------------------------------
4
4
 
5
5
 
6
- // BASE TABLES
7
- // -----------------
8
-
9
6
  table {
10
7
  max-width: 100%;
11
- background-color: $tableBackground;
12
- border-collapse: collapse;
13
- border-spacing: 0;
8
+ background-color: $table-bg;
9
+ }
10
+ th {
11
+ text-align: left;
14
12
  }
15
13
 
16
- // BASELINE STYLES
17
- // ---------------
14
+
15
+ // Baseline styles
18
16
 
19
17
  .table {
20
18
  width: 100%;
21
- margin-bottom: $baseLineHeight;
19
+ margin-bottom: $line-height-computed;
22
20
  // Cells
23
- th,
24
- td {
25
- padding: 8px;
26
- line-height: $baseLineHeight;
27
- text-align: left;
28
- vertical-align: top;
29
- border-top: 1px solid $tableBorder;
30
- }
31
- th {
32
- font-weight: bold;
21
+ thead,
22
+ tbody,
23
+ tfoot {
24
+ > tr {
25
+ > th,
26
+ > td {
27
+ padding: $table-cell-padding;
28
+ line-height: $line-height-base;
29
+ vertical-align: top;
30
+ border-top: 1px solid $table-border-color;
31
+ }
32
+ }
33
33
  }
34
34
  // Bottom align for column headings
35
- thead th {
35
+ thead > tr > th {
36
36
  vertical-align: bottom;
37
+ border-bottom: 2px solid $table-border-color;
37
38
  }
38
39
  // Remove top border from thead by default
39
- caption + thead tr:first-child th,
40
- caption + thead tr:first-child td,
41
- colgroup + thead tr:first-child th,
42
- colgroup + thead tr:first-child td,
43
- thead:first-child tr:first-child th,
44
- thead:first-child tr:first-child td {
45
- border-top: 0;
40
+ caption + thead,
41
+ colgroup + thead,
42
+ thead:first-child {
43
+ tr:first-child {
44
+ th, td {
45
+ border-top: 0;
46
+ }
47
+ }
46
48
  }
47
49
  // Account for multiple tbody instances
48
50
  tbody + tbody {
49
- border-top: 2px solid $tableBorder;
51
+ border-top: 2px solid $table-border-color;
50
52
  }
51
53
 
52
54
  // Nesting
53
55
  .table {
54
- background-color: $bodyBackground;
56
+ background-color: $body-bg;
55
57
  }
56
58
  }
57
59
 
58
60
 
59
-
60
- // CONDENSED TABLE W/ HALF PADDING
61
- // -------------------------------
61
+ // Condensed table w/ half padding
62
62
 
63
63
  .table-condensed {
64
- th,
65
- td {
66
- padding: 4px 5px;
64
+ thead,
65
+ tbody,
66
+ tfoot {
67
+ > tr {
68
+ > th,
69
+ > td {
70
+ padding: $table-condensed-cell-padding;
71
+ }
72
+ }
67
73
  }
68
74
  }
69
75
 
70
76
 
71
- // BORDERED VERSION
72
- // ----------------
77
+ // Bordered version
78
+ //
79
+ // Add borders all around the table and between all the columns.
73
80
 
74
81
  .table-bordered {
75
- border: 1px solid $tableBorder;
76
- border-collapse: separate; // Done so we can round those corners!
77
- *border-collapse: collapse; // IE7 can't round corners anyway
78
- border-left: 0;
79
- @include border-radius($baseBorderRadius);
80
- th,
81
- td {
82
- border-left: 1px solid $tableBorder;
83
- }
84
- // Prevent a double border
85
- caption + thead tr:first-child th,
86
- caption + tbody tr:first-child th,
87
- caption + tbody tr:first-child td,
88
- colgroup + thead tr:first-child th,
89
- colgroup + tbody tr:first-child th,
90
- colgroup + tbody tr:first-child td,
91
- thead:first-child tr:first-child th,
92
- tbody:first-child tr:first-child th,
93
- tbody:first-child tr:first-child td {
94
- border-top: 0;
95
- }
96
- // For first th/td in the first row in the first thead or tbody
97
- thead:first-child tr:first-child > th:first-child,
98
- tbody:first-child tr:first-child > td:first-child,
99
- tbody:first-child tr:first-child > th:first-child {
100
- @include border-top-left-radius($baseBorderRadius);
101
- }
102
- // For last th/td in the first row in the first thead or tbody
103
- thead:first-child tr:first-child > th:last-child,
104
- tbody:first-child tr:first-child > td:last-child,
105
- tbody:first-child tr:first-child > th:last-child {
106
- @include border-top-right-radius($baseBorderRadius);
107
- }
108
- // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot
109
- thead:last-child tr:last-child > th:first-child,
110
- tbody:last-child tr:last-child > td:first-child,
111
- tbody:last-child tr:last-child > th:first-child,
112
- tfoot:last-child tr:last-child > td:first-child,
113
- tfoot:last-child tr:last-child > th:first-child {
114
- @include border-bottom-left-radius($baseBorderRadius);
115
- }
116
- // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot
117
- thead:last-child tr:last-child > th:last-child,
118
- tbody:last-child tr:last-child > td:last-child,
119
- tbody:last-child tr:last-child > th:last-child,
120
- tfoot:last-child tr:last-child > td:last-child,
121
- tfoot:last-child tr:last-child > th:last-child {
122
- @include border-bottom-right-radius($baseBorderRadius);
123
- }
124
-
125
- // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
126
- tfoot + tbody:last-child tr:last-child td:first-child {
127
- @include border-bottom-left-radius(0);
128
- }
129
- tfoot + tbody:last-child tr:last-child td:last-child {
130
- @include border-bottom-right-radius(0);
131
- }
132
-
133
- // Special fixes to round the left border on the first td/th
134
- caption + thead tr:first-child th:first-child,
135
- caption + tbody tr:first-child td:first-child,
136
- colgroup + thead tr:first-child th:first-child,
137
- colgroup + tbody tr:first-child td:first-child {
138
- @include border-top-left-radius($baseBorderRadius);
82
+ border: 1px solid $table-border-color;
83
+ > thead,
84
+ > tbody,
85
+ > tfoot {
86
+ > tr {
87
+ > th,
88
+ > td {
89
+ border: 1px solid $table-border-color;
90
+ }
91
+ }
139
92
  }
140
- caption + thead tr:first-child th:last-child,
141
- caption + tbody tr:first-child td:last-child,
142
- colgroup + thead tr:first-child th:last-child,
143
- colgroup + tbody tr:first-child td:last-child {
144
- @include border-top-right-radius($baseBorderRadius);
93
+ > thead {
94
+ > tr {
95
+ > th,
96
+ > td {
97
+ border-bottom-width: 2px;
98
+ }
99
+ }
145
100
  }
146
-
147
101
  }
148
102
 
149
103
 
150
-
151
-
152
- // ZEBRA-STRIPING
153
- // --------------
154
-
104
+ // Zebra-striping
105
+ //
155
106
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
107
+
156
108
  .table-striped {
157
- tbody {
158
- > tr:nth-child(odd) > td,
159
- > tr:nth-child(odd) > th {
160
- background-color: $tableBackgroundAccent;
109
+ > tbody {
110
+ > tr:nth-child(odd) {
111
+ > td,
112
+ > th {
113
+ background-color: $table-bg-accent;
114
+ }
161
115
  }
162
116
  }
163
117
  }
164
118
 
165
119
 
166
- // HOVER EFFECT
167
- // ------------
120
+ // Hover effect
121
+ //
168
122
  // Placed here since it has to come after the potential zebra striping
123
+
169
124
  .table-hover {
170
- tbody {
171
- tr:hover > td,
172
- tr:hover > th {
173
- background-color: $tableBackgroundHover;
125
+ > tbody {
126
+ > tr:hover {
127
+ > td,
128
+ > th {
129
+ background-color: $table-bg-hover;
130
+ }
174
131
  }
175
132
  }
176
133
  }
177
134
 
178
135
 
179
- // TABLE CELL SIZING
180
- // -----------------
136
+ // Table cell sizing
137
+ //
138
+ // Reset default table behavior
181
139
 
182
- // Reset default grid behavior
183
- table td[class*="span"],
184
- table th[class*="span"],
185
- .row-fluid table td[class*="span"],
186
- .row-fluid table th[class*="span"] {
187
- display: table-cell;
188
- float: none; // undo default grid column styles
189
- margin-left: 0; // undo default grid column styles
140
+ table col[class*="col-"] {
141
+ float: none;
142
+ display: table-column;
190
143
  }
191
-
192
- // Change the column widths to account for td/th padding
193
- .table td,
194
- .table th {
195
- @for $i from 1 through 12 {
196
- &.span#{$i} { @include tableColumns($i); }
144
+ table {
145
+ td,
146
+ th {
147
+ &[class*="col-"] {
148
+ float: none;
149
+ display: table-cell;
150
+ }
197
151
  }
198
152
  }
199
153
 
200
154
 
201
-
202
- // TABLE BACKGROUNDS
203
- // -----------------
204
- // Exact selectors below required to override .table-striped
205
-
206
- .table tbody tr {
207
- &.success > td {
208
- background-color: $successBackground;
209
- }
210
- &.error > td {
211
- background-color: $errorBackground;
212
- }
213
- &.warning > td {
214
- background-color: $warningBackground;
215
- }
216
- &.info > td {
217
- background-color: $infoBackground;
155
+ // Table backgrounds
156
+ //
157
+ // Exact selectors below required to override `.table-striped` and prevent
158
+ // inheritance to nested tables.
159
+
160
+ .table > thead > tr,
161
+ .table > tbody > tr,
162
+ .table > tfoot > tr {
163
+ > td.active,
164
+ > th.active,
165
+ &.active > td,
166
+ &.active > th {
167
+ background-color: $table-bg-active;
218
168
  }
219
169
  }
220
170
 
221
- // Hover states for .table-hover
222
- .table-hover tbody tr {
223
- &.success:hover > td {
224
- background-color: darken($successBackground, 5%);
225
- }
226
- &.error:hover > td {
227
- background-color: darken($errorBackground, 5%);
228
- }
229
- &.warning:hover > td {
230
- background-color: darken($warningBackground, 5%);
231
- }
232
- &.info:hover > td {
233
- background-color: darken($infoBackground, 5%);
171
+ // Generate the contextual variants
172
+ @include table-row-variant('success', $state-success-bg, $state-success-border);
173
+ @include table-row-variant('danger', $state-danger-bg, $state-danger-border);
174
+ @include table-row-variant('warning', $state-warning-bg, $state-warning-border);
175
+
176
+
177
+ // Responsive tables
178
+ //
179
+ // Wrap your tables in `.table-scrollable` and we'll make them mobile friendly
180
+ // by enabling horizontal scrolling. Only applies <768px. Everything above that
181
+ // will display normally.
182
+
183
+ @media (max-width: $screen-sm) {
184
+ .table-responsive {
185
+ width: 100%;
186
+ margin-bottom: 15px;
187
+ overflow-y: hidden;
188
+ overflow-x: scroll;
189
+ border: 1px solid $table-border-color;
190
+
191
+ // Tighten up spacing and give a background color
192
+ > .table {
193
+ margin-bottom: 0;
194
+ background-color: #fff;
195
+
196
+ // Ensure the content doesn't wrap
197
+ > thead,
198
+ > tbody,
199
+ > tfoot {
200
+ > tr {
201
+ > th,
202
+ > td {
203
+ white-space: nowrap;
204
+ }
205
+ }
206
+ }
207
+ }
208
+
209
+ // Special overrides for the bordered tables
210
+ > .table-bordered {
211
+ border: 0;
212
+
213
+ // Nuke the appropriate borders so that the parent can handle them
214
+ > thead,
215
+ > tbody,
216
+ > tfoot {
217
+ > tr {
218
+ > th:first-child,
219
+ > td:first-child {
220
+ border-left: 0;
221
+ }
222
+ > th:last-child,
223
+ > td:last-child {
224
+ border-right: 0;
225
+ }
226
+ }
227
+ > tr:last-child {
228
+ > th,
229
+ > td {
230
+ border-bottom: 0;
231
+ }
232
+ }
233
+ }
234
+ }
234
235
  }
235
236
  }
@@ -0,0 +1,232 @@
1
+
2
+ //
3
+ // Load core variables and mixins
4
+ // --------------------------------------------------
5
+
6
+ @import "bootstrap/variables";
7
+ @import "bootstrap/mixins";
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
+ @include box-shadow($shadow);
25
+
26
+ // Reset the shadow
27
+ &:active,
28
+ &.active {
29
+ @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
30
+ }
31
+ }
32
+
33
+ // Mixin for generating new styles
34
+ @mixin btn-styles($btn-color: #555) {
35
+ @include gradient-vertical($start-color: $btn-color, $end-color: darken($btn-color, 10%));
36
+ border-color: darken($btn-color, 12%);
37
+
38
+ &:active,
39
+ &.active {
40
+ background-color: darken($btn-color, 10%);
41
+ border-color: darken($btn-color, 12%);
42
+ }
43
+ }
44
+
45
+ // Common styles
46
+ .btn {
47
+ // Remove the gradient for the pressed/active state
48
+ &:active,
49
+ &.active {
50
+ background-image: none;
51
+ }
52
+ }
53
+
54
+ // Apply the mixin to the buttons
55
+ .btn-default { @include btn-styles($btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }
56
+ .btn-primary { @include btn-styles($btn-primary-bg); }
57
+ .btn-success { @include btn-styles($btn-success-bg); }
58
+ .btn-warning { @include btn-styles($btn-warning-bg); }
59
+ .btn-danger { @include btn-styles($btn-danger-bg); }
60
+ .btn-info { @include btn-styles($btn-info-bg); }
61
+
62
+
63
+
64
+ //
65
+ // Images
66
+ // --------------------------------------------------
67
+
68
+ .thumbnail,
69
+ .img-thumbnail {
70
+ @include box-shadow(0 1px 2px rgba(0,0,0,.075));
71
+ }
72
+
73
+
74
+
75
+ //
76
+ // Dropdowns
77
+ // --------------------------------------------------
78
+
79
+ .dropdown-menu > li > a:hover,
80
+ .dropdown-menu > li > a:focus,
81
+ .dropdown-menu > .active > a,
82
+ .dropdown-menu > .active > a:hover,
83
+ .dropdown-menu > .active > a:focus {
84
+ @include gradient-vertical($start-color: $dropdown-link-hover-bg, $end-color: darken($dropdown-link-hover-bg, 5%));
85
+ background-color: darken($dropdown-link-hover-bg, 5%);
86
+ }
87
+
88
+
89
+
90
+ //
91
+ // Navbar
92
+ // --------------------------------------------------
93
+
94
+ // Basic navbar
95
+ .navbar {
96
+ @include gradient-vertical($start-color: lighten($navbar-default-bg, 10%), $end-color: $navbar-default-bg);
97
+ border-radius: $navbar-border-radius;
98
+ $shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
99
+ @include box-shadow($shadow);
100
+
101
+ .navbar-nav > .active > a {
102
+ background-color: $navbar-default-bg;
103
+ }
104
+ }
105
+ .navbar-brand,
106
+ .navbar-nav > li > a {
107
+ text-shadow: 0 1px 0 rgba(255,255,255,.25);
108
+ }
109
+
110
+ // Inverted navbar
111
+ .navbar-inverse {
112
+ @include gradient-vertical($start-color: lighten($navbar-inverse-bg, 10%), $end-color: $navbar-inverse-bg);
113
+
114
+ .navbar-nav > .active > a {
115
+ background-color: $navbar-inverse-bg;
116
+ }
117
+
118
+ .navbar-brand,
119
+ .navbar-nav > li > a {
120
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
121
+ }
122
+ }
123
+
124
+ // Undo rounded corners in static and fixed navbars
125
+ .navbar-static-top,
126
+ .navbar-fixed-top,
127
+ .navbar-fixed-bottom {
128
+ border-radius: 0;
129
+ }
130
+
131
+
132
+
133
+ //
134
+ // Alerts
135
+ // --------------------------------------------------
136
+
137
+ // Common styles
138
+ .alert {
139
+ text-shadow: 0 1px 0 rgba(255,255,255,.2);
140
+ $shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);
141
+ @include box-shadow($shadow);
142
+ }
143
+
144
+ // Mixin for generating new styles
145
+ @mixin alert-styles($color) {
146
+ @include gradient-vertical($start-color: $color, $end-color: darken($color, 7.5%));
147
+ border-color: darken($color, 15%);
148
+ }
149
+
150
+ // Apply the mixin to the alerts
151
+ .alert-success { @include alert-styles($alert-success-bg); }
152
+ .alert-info { @include alert-styles($alert-info-bg); }
153
+ .alert-warning { @include alert-styles($alert-warning-bg); }
154
+ .alert-danger { @include alert-styles($alert-danger-bg); }
155
+
156
+
157
+
158
+ //
159
+ // Progress bars
160
+ // --------------------------------------------------
161
+
162
+ // Give the progress background some depth
163
+ .progress {
164
+ @include gradient-vertical($start-color: darken($progress-bg, 4%), $end-color: $progress-bg)
165
+ }
166
+
167
+ // Mixin for generating new styles
168
+ @mixin progress-bar-styles($color) {
169
+ @include gradient-vertical($start-color: $color, $end-color: darken($color, 10%));
170
+ }
171
+
172
+ // Apply the mixin to the progress bars
173
+ .progress-bar { @include progress-bar-styles($progress-bar-bg); }
174
+ .progress-bar-success { @include progress-bar-styles($progress-bar-success-bg); }
175
+ .progress-bar-info { @include progress-bar-styles($progress-bar-info-bg); }
176
+ .progress-bar-warning { @include progress-bar-styles($progress-bar-warning-bg); }
177
+ .progress-bar-danger { @include progress-bar-styles($progress-bar-danger-bg); }
178
+
179
+
180
+
181
+ //
182
+ // List groups
183
+ // --------------------------------------------------
184
+
185
+ .list-group {
186
+ border-radius: $border-radius-base;
187
+ @include box-shadow(0 1px 2px rgba(0,0,0,.075));
188
+ }
189
+ .list-group-item.active,
190
+ .list-group-item.active:hover,
191
+ .list-group-item.active:focus {
192
+ text-shadow: 0 -1px 0 darken($list-group-active-bg, 10%);
193
+ @include gradient-vertical($start-color: $list-group-active-bg, $end-color: darken($list-group-active-bg, 7.5%));
194
+ border-color: darken($list-group-active-border, 7.5%);
195
+ }
196
+
197
+
198
+
199
+ //
200
+ // Panels
201
+ // --------------------------------------------------
202
+
203
+ // Common styles
204
+ .panel {
205
+ @include box-shadow(0 1px 2px rgba(0,0,0,.05));
206
+ }
207
+
208
+ // Mixin for generating new styles
209
+ @mixin panel-heading-styles($color) {
210
+ @include gradient-vertical($start-color: $color, $end-color: darken($color, 5%));
211
+ }
212
+
213
+ // Apply the mixin to the panel headings only
214
+ .panel-default > .panel-heading { @include panel-heading-styles($panel-default-heading-bg); }
215
+ .panel-primary > .panel-heading { @include panel-heading-styles($panel-primary-heading-bg); }
216
+ .panel-success > .panel-heading { @include panel-heading-styles($panel-success-heading-bg); }
217
+ .panel-info > .panel-heading { @include panel-heading-styles($panel-info-heading-bg); }
218
+ .panel-warning > .panel-heading { @include panel-heading-styles($panel-warning-heading-bg); }
219
+ .panel-danger > .panel-heading { @include panel-heading-styles($panel-danger-heading-bg); }
220
+
221
+
222
+
223
+ //
224
+ // Wells
225
+ // --------------------------------------------------
226
+
227
+ .well {
228
+ @include gradient-vertical($start-color: darken($well-bg, 5%), $end-color: $well-bg);
229
+ border-color: darken($well-bg, 10%);
230
+ $shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
231
+ @include box-shadow($shadow);
232
+ }
@@ -3,51 +3,29 @@
3
3
  // --------------------------------------------------
4
4
 
5
5
 
6
- // Note: `.thumbnails` and `.thumbnails > li` are overriden in responsive files
6
+ // Mixin and adjust the regular image class
7
+ .thumbnail {
8
+ @extend .img-thumbnail;
9
+ display: block; // Override the inline-block from `.img-thumbnail`
7
10
 
8
- // Make wrapper ul behave like the grid
9
- .thumbnails {
10
- margin-left: -$gridGutterWidth;
11
- list-style: none;
12
- @include clearfix();
13
- }
14
- // Fluid rows have no left margin
15
- .row-fluid .thumbnails {
16
- margin-left: 0;
11
+ > img {
12
+ @include img-responsive();
13
+ }
17
14
  }
18
15
 
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
16
 
26
- // The actual thumbnail (can be `a` or `div`)
27
- .thumbnail {
28
- display: block;
29
- padding: 4px;
30
- line-height: $baseLineHeight;
31
- border: 1px solid #ddd;
32
- @include border-radius($baseBorderRadius);
33
- @include box-shadow(0 1px 3px rgba(0,0,0,.055));
34
- @include transition(all .2s ease-in-out);
35
- }
36
- // Add a hover/focus state for linked versions only
17
+ // Add a hover state for linked versions only
37
18
  a.thumbnail:hover,
38
19
  a.thumbnail:focus {
39
- border-color: $linkColor;
40
- @include box-shadow(0 1px 4px rgba(0,105,214,.25));
20
+ border-color: $link-color;
41
21
  }
42
22
 
43
23
  // Images and captions
44
24
  .thumbnail > img {
45
- display: block;
46
- max-width: 100%;
47
25
  margin-left: auto;
48
26
  margin-right: auto;
49
27
  }
50
28
  .thumbnail .caption {
51
- padding: 9px;
52
- color: $gray;
29
+ padding: $thumbnail-caption-padding;
30
+ color: $thumbnail-caption-color;
53
31
  }