twbs_sass_rails 0.2.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -8
  3. data/CONTRIBUTING.md +4 -4
  4. data/Gemfile.lock +52 -65
  5. data/LICENSE +2 -2
  6. data/README.md +48 -18
  7. data/Rakefile +67 -32
  8. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  9. data/app/assets/fonts/fontawesome-webfont.svg +23 -8
  10. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  11. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  12. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  13. data/app/assets/fonts/glyphicons-halflings-regular.svg +200 -199
  14. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  15. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  16. data/gemfiles/Gemfile.rails-3.2.x +2 -3
  17. data/gemfiles/Gemfile.rails-4.0.x +2 -3
  18. data/lib/generators/twbs_sass_rails/install/install_generator.rb +2 -2
  19. data/lib/generators/twbs_sass_rails/install/templates/{twbs-variables.css.less → twbs-variables.css.scss} +4 -3
  20. data/lib/generators/twbs_sass_rails/install/templates/{twbs.css.less → twbs.css.scss} +12 -7
  21. data/lib/twbs_sass_rails/version.rb +1 -1
  22. data/test/dummy/app/assets/stylesheets/{default-twbs.css.less → default-twbs.css.scss} +0 -0
  23. data/test/dummy/app/assets/stylesheets/test.css.scss +9 -0
  24. data/test/dummy/app/assets/stylesheets/twbs-variables.css.scss +7 -0
  25. data/test/dummy/app/assets/stylesheets/{twbs.css.less → twbs.css.scss} +12 -7
  26. data/test/dummy/config/application.rb +4 -1
  27. data/test/dummy/config/environments/development.rb +1 -1
  28. data/test/generators/install_generator_test.rb +4 -4
  29. data/test/integration/assets_precompile_integration_test.rb +11 -5
  30. data/test/integration/twbs_sass_rails_integration_test.rb +8 -7
  31. data/test/test_helper.rb +2 -4
  32. data/twbs_sass_rails.gemspec +6 -9
  33. data/vendor/assets/javascripts/respond.js +223 -212
  34. data/vendor/assets/javascripts/twbs/bootstrap/affix.js +36 -25
  35. data/vendor/assets/javascripts/twbs/bootstrap/alert.js +7 -17
  36. data/vendor/assets/javascripts/twbs/bootstrap/button.js +26 -28
  37. data/vendor/assets/javascripts/twbs/bootstrap/carousel.js +22 -34
  38. data/vendor/assets/javascripts/twbs/bootstrap/collapse.js +9 -18
  39. data/vendor/assets/javascripts/twbs/bootstrap/dropdown.js +25 -32
  40. data/vendor/assets/javascripts/twbs/bootstrap/modal.js +27 -30
  41. data/vendor/assets/javascripts/twbs/bootstrap/popover.js +16 -23
  42. data/vendor/assets/javascripts/twbs/bootstrap/scrollspy.js +19 -24
  43. data/vendor/assets/javascripts/twbs/bootstrap/tab.js +10 -20
  44. data/vendor/assets/javascripts/twbs/bootstrap/tooltip.js +54 -41
  45. data/vendor/assets/javascripts/twbs/bootstrap/transition.js +13 -21
  46. data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +16 -0
  47. data/vendor/assets/stylesheets/fontawesome/_core.scss +12 -0
  48. data/vendor/assets/stylesheets/fontawesome/_extras.scss +44 -0
  49. data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +6 -0
  50. data/vendor/assets/stylesheets/fontawesome/_icons.scss +412 -0
  51. data/vendor/assets/stylesheets/fontawesome/_larger.scss +13 -0
  52. data/vendor/assets/stylesheets/fontawesome/_list.scss +19 -0
  53. data/vendor/assets/stylesheets/fontawesome/_mixins.scss +20 -0
  54. data/vendor/assets/stylesheets/fontawesome/_path.scss +14 -0
  55. data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +9 -0
  56. data/vendor/assets/stylesheets/fontawesome/_spinning.scss +30 -0
  57. data/vendor/assets/stylesheets/fontawesome/_stacked.scss +20 -0
  58. data/vendor/assets/stylesheets/fontawesome/_variables.scss +381 -0
  59. data/vendor/assets/stylesheets/fontawesome/font-awesome.scss +17 -0
  60. data/vendor/assets/stylesheets/twbs/bootstrap/{alerts.less → _alerts.scss} +10 -10
  61. data/vendor/assets/stylesheets/twbs/bootstrap/{badges.less → _badges.scss} +19 -15
  62. data/vendor/assets/stylesheets/twbs/bootstrap/_breadcrumbs.scss +26 -0
  63. data/vendor/assets/stylesheets/twbs/bootstrap/{button-groups.less → _button-groups.scss} +38 -60
  64. data/vendor/assets/stylesheets/twbs/bootstrap/{buttons.less → _buttons.scss} +28 -34
  65. data/vendor/assets/stylesheets/twbs/bootstrap/{carousel.less → _carousel.scss} +38 -19
  66. data/vendor/assets/stylesheets/twbs/bootstrap/_close.scss +35 -0
  67. data/vendor/assets/stylesheets/twbs/bootstrap/_code.scss +63 -0
  68. data/vendor/assets/stylesheets/twbs/bootstrap/{component-animations.less → _component-animations.scss} +2 -2
  69. data/vendor/assets/stylesheets/twbs/bootstrap/{dropdowns.less → _dropdowns.scss} +53 -33
  70. data/vendor/assets/stylesheets/twbs/bootstrap/{forms.less → _forms.scss} +133 -79
  71. data/vendor/assets/stylesheets/twbs/bootstrap/{glyphicons.less → _glyphicons.scss} +16 -19
  72. data/vendor/assets/stylesheets/twbs/bootstrap/_grid.scss +100 -0
  73. data/vendor/assets/stylesheets/twbs/bootstrap/{input-groups.less → _input-groups.scss} +58 -29
  74. data/vendor/assets/stylesheets/twbs/bootstrap/_jumbotron.scss +44 -0
  75. data/vendor/assets/stylesheets/twbs/bootstrap/{labels.less → _labels.scss} +14 -8
  76. data/vendor/assets/stylesheets/twbs/bootstrap/_list-group.scss +110 -0
  77. data/vendor/assets/stylesheets/twbs/bootstrap/{media.less → _media.scss} +0 -0
  78. data/vendor/assets/stylesheets/twbs/bootstrap/_mixins.scss +931 -0
  79. data/vendor/assets/stylesheets/twbs/bootstrap/{modals.less → _modals.scss} +37 -40
  80. data/vendor/assets/stylesheets/twbs/bootstrap/_navbar.scss +620 -0
  81. data/vendor/assets/stylesheets/twbs/bootstrap/{navs.less → _navs.scss} +41 -52
  82. data/vendor/assets/stylesheets/twbs/bootstrap/{normalize.less → _normalize.scss} +148 -121
  83. data/vendor/assets/stylesheets/twbs/bootstrap/{pager.less → _pager.scss} +8 -8
  84. data/vendor/assets/stylesheets/twbs/bootstrap/_pagination.scss +88 -0
  85. data/vendor/assets/stylesheets/twbs/bootstrap/_panels.scss +230 -0
  86. data/vendor/assets/stylesheets/twbs/bootstrap/{popovers.less → _popovers.scss} +36 -36
  87. data/vendor/assets/stylesheets/twbs/bootstrap/{print.less → _print.scss} +6 -5
  88. data/vendor/assets/stylesheets/twbs/bootstrap/_progress-bars.scss +80 -0
  89. data/vendor/assets/stylesheets/twbs/bootstrap/_responsive-utilities.scss +80 -0
  90. data/vendor/assets/stylesheets/twbs/bootstrap/{scaffolding.less → _scaffolding.scss} +39 -24
  91. data/vendor/assets/stylesheets/twbs/bootstrap/{tables.less → _tables.scss} +42 -48
  92. data/vendor/assets/stylesheets/twbs/bootstrap/_theme.scss +247 -0
  93. data/vendor/assets/stylesheets/twbs/bootstrap/_thumbnails.scss +38 -0
  94. data/vendor/assets/stylesheets/twbs/bootstrap/_tooltip.scss +95 -0
  95. data/vendor/assets/stylesheets/twbs/bootstrap/_type.scss +296 -0
  96. data/vendor/assets/stylesheets/twbs/bootstrap/{utilities.less → _utilities.scss} +14 -3
  97. data/vendor/assets/stylesheets/twbs/bootstrap/_variables.scss +831 -0
  98. data/vendor/assets/stylesheets/twbs/bootstrap/{wells.less → _wells.scss} +6 -6
  99. data/vendor/assets/stylesheets/twbs/bootstrap/bootstrap.scss +48 -0
  100. data/vendor/assets/stylesheets/twbs/{bootstrap.less → bootstrap.scss} +0 -0
  101. metadata +94 -134
  102. data/test/dummy/app/assets/stylesheets/test.css.less +0 -5
  103. data/test/dummy/app/assets/stylesheets/twbs-variables.css.less +0 -6
  104. data/test/dummy/config/database.yml +0 -25
  105. data/test/dummy/db/.keep +0 -0
  106. data/vendor/assets/stylesheets/fontawesome/bootstrap.less +0 -84
  107. data/vendor/assets/stylesheets/fontawesome/core.less +0 -129
  108. data/vendor/assets/stylesheets/fontawesome/extras.less +0 -93
  109. data/vendor/assets/stylesheets/fontawesome/font-awesome.less +0 -33
  110. data/vendor/assets/stylesheets/fontawesome/icons.less +0 -381
  111. data/vendor/assets/stylesheets/fontawesome/mixins.less +0 -48
  112. data/vendor/assets/stylesheets/fontawesome/path.less +0 -14
  113. data/vendor/assets/stylesheets/fontawesome/variables.less +0 -735
  114. data/vendor/assets/stylesheets/twbs/bootstrap/bootstrap.less +0 -58
  115. data/vendor/assets/stylesheets/twbs/bootstrap/breadcrumbs.less +0 -23
  116. data/vendor/assets/stylesheets/twbs/bootstrap/close.less +0 -33
  117. data/vendor/assets/stylesheets/twbs/bootstrap/code.less +0 -56
  118. data/vendor/assets/stylesheets/twbs/bootstrap/grid.less +0 -346
  119. data/vendor/assets/stylesheets/twbs/bootstrap/jumbotron.less +0 -40
  120. data/vendor/assets/stylesheets/twbs/bootstrap/list-group.less +0 -88
  121. data/vendor/assets/stylesheets/twbs/bootstrap/mixins.less +0 -744
  122. data/vendor/assets/stylesheets/twbs/bootstrap/navbar.less +0 -621
  123. data/vendor/assets/stylesheets/twbs/bootstrap/pagination.less +0 -85
  124. data/vendor/assets/stylesheets/twbs/bootstrap/panels.less +0 -143
  125. data/vendor/assets/stylesheets/twbs/bootstrap/progress-bars.less +0 -96
  126. data/vendor/assets/stylesheets/twbs/bootstrap/responsive-utilities.less +0 -220
  127. data/vendor/assets/stylesheets/twbs/bootstrap/theme.less +0 -244
  128. data/vendor/assets/stylesheets/twbs/bootstrap/thumbnails.less +0 -32
  129. data/vendor/assets/stylesheets/twbs/bootstrap/tooltip.less +0 -95
  130. data/vendor/assets/stylesheets/twbs/bootstrap/type.less +0 -271
  131. data/vendor/assets/stylesheets/twbs/bootstrap/variables.less +0 -635
@@ -4,11 +4,16 @@
4
4
 
5
5
 
6
6
  // Reset the box-sizing
7
-
8
- *,
7
+ //
8
+ // Heads up! This reset may cause conflicts with some third-party widgets.
9
+ // For recommendations on resolving such conflicts, see
10
+ // http://getbootstrap.com/getting-started/#third-box-sizing
11
+ * {
12
+ @include box-sizing(border-box);
13
+ }
9
14
  *:before,
10
15
  *:after {
11
- .box-sizing(border-box);
16
+ @include box-sizing(border-box);
12
17
  }
13
18
 
14
19
 
@@ -20,11 +25,11 @@ html {
20
25
  }
21
26
 
22
27
  body {
23
- font-family: @font-family-base;
24
- font-size: @font-size-base;
25
- line-height: @line-height-base;
26
- color: @text-color;
27
- background-color: @body-bg;
28
+ font-family: $font-family-base;
29
+ font-size: $font-size-base;
30
+ line-height: $line-height-base;
31
+ color: $text-color;
32
+ background-color: $body-bg;
28
33
  }
29
34
 
30
35
  // Reset fonts for relevant elements
@@ -41,21 +46,31 @@ textarea {
41
46
  // Links
42
47
 
43
48
  a {
44
- color: @link-color;
49
+ color: $link-color;
45
50
  text-decoration: none;
46
51
 
47
52
  &:hover,
48
53
  &:focus {
49
- color: @link-hover-color;
54
+ color: $link-hover-color;
50
55
  text-decoration: underline;
51
56
  }
52
57
 
53
58
  &:focus {
54
- .tab-focus();
59
+ @include tab-focus();
55
60
  }
56
61
  }
57
62
 
58
63
 
64
+ // Figures
65
+ //
66
+ // We reset this here because previously Normalize had no `figure` margins. This
67
+ // ensures we don't break anyone's use of the element.
68
+
69
+ figure {
70
+ margin: 0;
71
+ }
72
+
73
+
59
74
  // Images
60
75
 
61
76
  img {
@@ -64,27 +79,27 @@ img {
64
79
 
65
80
  // Responsive images (ensure images don't scale beyond their parents)
66
81
  .img-responsive {
67
- .img-responsive();
82
+ @include img-responsive();
68
83
  }
69
84
 
70
85
  // Rounded corners
71
86
  .img-rounded {
72
- border-radius: @border-radius-large;
87
+ border-radius: $border-radius-large;
73
88
  }
74
89
 
75
90
  // Image thumbnails
76
91
  //
77
92
  // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
78
93
  .img-thumbnail {
79
- padding: @thumbnail-padding;
80
- line-height: @line-height-base;
81
- background-color: @thumbnail-bg;
82
- border: 1px solid @thumbnail-border;
83
- border-radius: @thumbnail-border-radius;
84
- .transition(all .2s ease-in-out);
94
+ padding: $thumbnail-padding;
95
+ line-height: $line-height-base;
96
+ background-color: $thumbnail-bg;
97
+ border: 1px solid $thumbnail-border;
98
+ border-radius: $thumbnail-border-radius;
99
+ @include transition(all .2s ease-in-out);
85
100
 
86
101
  // Keep them at most 100% wide
87
- .img-responsive(inline-block);
102
+ @include img-responsive(inline-block);
88
103
  }
89
104
 
90
105
  // Perfect circle
@@ -96,10 +111,10 @@ img {
96
111
  // Horizontal rules
97
112
 
98
113
  hr {
99
- margin-top: @line-height-computed;
100
- margin-bottom: @line-height-computed;
114
+ margin-top: $line-height-computed;
115
+ margin-bottom: $line-height-computed;
101
116
  border: 0;
102
- border-top: 1px solid @hr-border;
117
+ border-top: 1px solid $hr-border;
103
118
  }
104
119
 
105
120
 
@@ -114,6 +129,6 @@ hr {
114
129
  margin: -1px;
115
130
  padding: 0;
116
131
  overflow: hidden;
117
- clip: rect(0 0 0 0);
132
+ clip: rect(0,0,0,0);
118
133
  border: 0;
119
134
  }
@@ -5,7 +5,7 @@
5
5
 
6
6
  table {
7
7
  max-width: 100%;
8
- background-color: @table-bg;
8
+ background-color: $table-bg;
9
9
  }
10
10
  th {
11
11
  text-align: left;
@@ -16,7 +16,7 @@ th {
16
16
 
17
17
  .table {
18
18
  width: 100%;
19
- margin-bottom: @line-height-computed;
19
+ margin-bottom: $line-height-computed;
20
20
  // Cells
21
21
  > thead,
22
22
  > tbody,
@@ -24,17 +24,17 @@ th {
24
24
  > tr {
25
25
  > th,
26
26
  > td {
27
- padding: @table-cell-padding;
28
- line-height: @line-height-base;
27
+ padding: $table-cell-padding;
28
+ line-height: $line-height-base;
29
29
  vertical-align: top;
30
- border-top: 1px solid @table-border-color;
30
+ border-top: 1px solid $table-border-color;
31
31
  }
32
32
  }
33
33
  }
34
34
  // Bottom align for column headings
35
35
  > thead > tr > th {
36
36
  vertical-align: bottom;
37
- border-bottom: 2px solid @table-border-color;
37
+ border-bottom: 2px solid $table-border-color;
38
38
  }
39
39
  // Remove top border from thead by default
40
40
  > caption + thead,
@@ -49,12 +49,12 @@ th {
49
49
  }
50
50
  // Account for multiple tbody instances
51
51
  > tbody + tbody {
52
- border-top: 2px solid @table-border-color;
52
+ border-top: 2px solid $table-border-color;
53
53
  }
54
54
 
55
55
  // Nesting
56
56
  .table {
57
- background-color: @body-bg;
57
+ background-color: $body-bg;
58
58
  }
59
59
  }
60
60
 
@@ -68,7 +68,7 @@ th {
68
68
  > tr {
69
69
  > th,
70
70
  > td {
71
- padding: @table-condensed-cell-padding;
71
+ padding: $table-condensed-cell-padding;
72
72
  }
73
73
  }
74
74
  }
@@ -80,23 +80,21 @@ th {
80
80
  // Add borders all around the table and between all the columns.
81
81
 
82
82
  .table-bordered {
83
- border: 1px solid @table-border-color;
83
+ border: 1px solid $table-border-color;
84
84
  > thead,
85
85
  > tbody,
86
86
  > tfoot {
87
87
  > tr {
88
88
  > th,
89
89
  > td {
90
- border: 1px solid @table-border-color;
90
+ border: 1px solid $table-border-color;
91
91
  }
92
92
  }
93
93
  }
94
- > thead {
95
- > tr {
96
- > th,
97
- > td {
98
- border-bottom-width: 2px;
99
- }
94
+ > thead > tr {
95
+ > th,
96
+ > td {
97
+ border-bottom-width: 2px;
100
98
  }
101
99
  }
102
100
  }
@@ -107,12 +105,10 @@ th {
107
105
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
108
106
 
109
107
  .table-striped {
110
- > tbody {
111
- > tr:nth-child(odd) {
112
- > td,
113
- > th {
114
- background-color: @table-bg-accent;
115
- }
108
+ > tbody > tr:nth-child(odd) {
109
+ > td,
110
+ > th {
111
+ background-color: $table-bg-accent;
116
112
  }
117
113
  }
118
114
  }
@@ -123,12 +119,10 @@ th {
123
119
  // Placed here since it has to come after the potential zebra striping
124
120
 
125
121
  .table-hover {
126
- > tbody {
127
- > tr:hover {
128
- > td,
129
- > th {
130
- background-color: @table-bg-hover;
131
- }
122
+ > tbody > tr:hover {
123
+ > td,
124
+ > th {
125
+ background-color: $table-bg-hover;
132
126
  }
133
127
  }
134
128
  }
@@ -139,6 +133,7 @@ th {
139
133
  // Reset default table behavior
140
134
 
141
135
  table col[class*="col-"] {
136
+ position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)
142
137
  float: none;
143
138
  display: table-column;
144
139
  }
@@ -146,6 +141,7 @@ table {
146
141
  td,
147
142
  th {
148
143
  &[class*="col-"] {
144
+ position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)
149
145
  float: none;
150
146
  display: table-cell;
151
147
  }
@@ -158,21 +154,12 @@ table {
158
154
  // Exact selectors below required to override `.table-striped` and prevent
159
155
  // inheritance to nested tables.
160
156
 
161
- .table > thead > tr,
162
- .table > tbody > tr,
163
- .table > tfoot > tr {
164
- > td.active,
165
- > th.active,
166
- &.active > td,
167
- &.active > th {
168
- background-color: @table-bg-active;
169
- }
170
- }
171
-
172
157
  // Generate the contextual variants
173
- .table-row-variant(success; @state-success-bg; @state-success-border);
174
- .table-row-variant(danger; @state-danger-bg; @state-danger-border);
175
- .table-row-variant(warning; @state-warning-bg; @state-warning-border);
158
+ @include table-row-variant('active', $table-bg-active);
159
+ @include table-row-variant('success', $state-success-bg);
160
+ @include table-row-variant('info', $state-info-bg);
161
+ @include table-row-variant('warning', $state-warning-bg);
162
+ @include table-row-variant('danger', $state-danger-bg);
176
163
 
177
164
 
178
165
  // Responsive tables
@@ -181,20 +168,19 @@ table {
181
168
  // by enabling horizontal scrolling. Only applies <768px. Everything above that
182
169
  // will display normally.
183
170
 
184
- @media (max-width: @screen-sm-min) {
171
+ @media (max-width: $screen-xs-max) {
185
172
  .table-responsive {
186
173
  width: 100%;
187
- margin-bottom: 15px;
174
+ margin-bottom: ($line-height-computed * 0.75);
188
175
  overflow-y: hidden;
189
176
  overflow-x: scroll;
190
177
  -ms-overflow-style: -ms-autohiding-scrollbar;
191
- border: 1px solid @table-border-color;
178
+ border: 1px solid $table-border-color;
192
179
  -webkit-overflow-scrolling: touch;
193
180
 
194
- // Tighten up spacing and give a background color
181
+ // Tighten up spacing
195
182
  > .table {
196
183
  margin-bottom: 0;
197
- background-color: #fff;
198
184
 
199
185
  // Ensure the content doesn't wrap
200
186
  > thead,
@@ -227,6 +213,13 @@ table {
227
213
  border-right: 0;
228
214
  }
229
215
  }
216
+ }
217
+
218
+ // Only nuke the last row's bottom-border in `tbody` and `tfoot` since
219
+ // chances are there will be only one `tr` in a `thead` and that would
220
+ // remove the border altogether.
221
+ > tbody,
222
+ > tfoot {
230
223
  > tr:last-child {
231
224
  > th,
232
225
  > td {
@@ -234,6 +227,7 @@ table {
234
227
  }
235
228
  }
236
229
  }
230
+
237
231
  }
238
232
  }
239
233
  }
@@ -0,0 +1,247 @@
1
+
2
+ //
3
+ // Load core variables and mixins
4
+ // --------------------------------------------------
5
+
6
+ @import "variables";
7
+ @import "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, 12%));
36
+ @include 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
+
53
+ // Common styles
54
+ .btn {
55
+ // Remove the gradient for the pressed/active state
56
+ &:active,
57
+ &.active {
58
+ background-image: none;
59
+ }
60
+ }
61
+
62
+ // Apply the mixin to the buttons
63
+ .btn-default { @include btn-styles($btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }
64
+ .btn-primary { @include btn-styles($btn-primary-bg); }
65
+ .btn-success { @include btn-styles($btn-success-bg); }
66
+ .btn-info { @include btn-styles($btn-info-bg); }
67
+ .btn-warning { @include btn-styles($btn-warning-bg); }
68
+ .btn-danger { @include btn-styles($btn-danger-bg); }
69
+
70
+
71
+
72
+ //
73
+ // Images
74
+ // --------------------------------------------------
75
+
76
+ .thumbnail,
77
+ .img-thumbnail {
78
+ @include box-shadow(0 1px 2px rgba(0,0,0,.075));
79
+ }
80
+
81
+
82
+
83
+ //
84
+ // Dropdowns
85
+ // --------------------------------------------------
86
+
87
+ .dropdown-menu > li > a:hover,
88
+ .dropdown-menu > li > a:focus {
89
+ @include gradient-vertical($start-color: $dropdown-link-hover-bg, $end-color: darken($dropdown-link-hover-bg, 5%));
90
+ background-color: darken($dropdown-link-hover-bg, 5%);
91
+ }
92
+ .dropdown-menu > .active > a,
93
+ .dropdown-menu > .active > a:hover,
94
+ .dropdown-menu > .active > a:focus {
95
+ @include gradient-vertical($start-color: $dropdown-link-active-bg, $end-color: darken($dropdown-link-active-bg, 5%));
96
+ background-color: darken($dropdown-link-active-bg, 5%);
97
+ }
98
+
99
+
100
+
101
+ //
102
+ // Navbar
103
+ // --------------------------------------------------
104
+
105
+ // Default navbar
106
+ .navbar-default {
107
+ @include gradient-vertical($start-color: lighten($navbar-default-bg, 10%), $end-color: $navbar-default-bg);
108
+ @include reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
109
+ border-radius: $navbar-border-radius;
110
+ $shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
111
+ @include box-shadow($shadow);
112
+
113
+ .navbar-nav > .active > a {
114
+ @include gradient-vertical($start-color: darken($navbar-default-bg, 5%), $end-color: darken($navbar-default-bg, 2%));
115
+ @include box-shadow(inset 0 3px 9px rgba(0,0,0,.075));
116
+ }
117
+ }
118
+ .navbar-brand,
119
+ .navbar-nav > li > a {
120
+ text-shadow: 0 1px 0 rgba(255,255,255,.25);
121
+ }
122
+
123
+ // Inverted navbar
124
+ .navbar-inverse {
125
+ @include gradient-vertical($start-color: lighten($navbar-inverse-bg, 10%), $end-color: $navbar-inverse-bg);
126
+ @include reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
127
+
128
+ .navbar-nav > .active > a {
129
+ @include gradient-vertical($start-color: $navbar-inverse-bg, $end-color: lighten($navbar-inverse-bg, 2.5%));
130
+ @include box-shadow(inset 0 3px 9px rgba(0,0,0,.25));
131
+ }
132
+
133
+ .navbar-brand,
134
+ .navbar-nav > li > a {
135
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
136
+ }
137
+ }
138
+
139
+ // Undo rounded corners in static and fixed navbars
140
+ .navbar-static-top,
141
+ .navbar-fixed-top,
142
+ .navbar-fixed-bottom {
143
+ border-radius: 0;
144
+ }
145
+
146
+
147
+
148
+ //
149
+ // Alerts
150
+ // --------------------------------------------------
151
+
152
+ // Common styles
153
+ .alert {
154
+ text-shadow: 0 1px 0 rgba(255,255,255,.2);
155
+ $shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);
156
+ @include box-shadow($shadow);
157
+ }
158
+
159
+ // Mixin for generating new styles
160
+ @mixin alert-styles($color) {
161
+ @include gradient-vertical($start-color: $color, $end-color: darken($color, 7.5%));
162
+ border-color: darken($color, 15%);
163
+ }
164
+
165
+ // Apply the mixin to the alerts
166
+ .alert-success { @include alert-styles($alert-success-bg); }
167
+ .alert-info { @include alert-styles($alert-info-bg); }
168
+ .alert-warning { @include alert-styles($alert-warning-bg); }
169
+ .alert-danger { @include alert-styles($alert-danger-bg); }
170
+
171
+
172
+
173
+ //
174
+ // Progress bars
175
+ // --------------------------------------------------
176
+
177
+ // Give the progress background some depth
178
+ .progress {
179
+ @include gradient-vertical($start-color: darken($progress-bg, 4%), $end-color: $progress-bg)
180
+ }
181
+
182
+ // Mixin for generating new styles
183
+ @mixin progress-bar-styles($color) {
184
+ @include gradient-vertical($start-color: $color, $end-color: darken($color, 10%));
185
+ }
186
+
187
+ // Apply the mixin to the progress bars
188
+ .progress-bar { @include progress-bar-styles($progress-bar-bg); }
189
+ .progress-bar-success { @include progress-bar-styles($progress-bar-success-bg); }
190
+ .progress-bar-info { @include progress-bar-styles($progress-bar-info-bg); }
191
+ .progress-bar-warning { @include progress-bar-styles($progress-bar-warning-bg); }
192
+ .progress-bar-danger { @include progress-bar-styles($progress-bar-danger-bg); }
193
+
194
+
195
+
196
+ //
197
+ // List groups
198
+ // --------------------------------------------------
199
+
200
+ .list-group {
201
+ border-radius: $border-radius-base;
202
+ @include box-shadow(0 1px 2px rgba(0,0,0,.075));
203
+ }
204
+ .list-group-item.active,
205
+ .list-group-item.active:hover,
206
+ .list-group-item.active:focus {
207
+ text-shadow: 0 -1px 0 darken($list-group-active-bg, 10%);
208
+ @include gradient-vertical($start-color: $list-group-active-bg, $end-color: darken($list-group-active-bg, 7.5%));
209
+ border-color: darken($list-group-active-border, 7.5%);
210
+ }
211
+
212
+
213
+
214
+ //
215
+ // Panels
216
+ // --------------------------------------------------
217
+
218
+ // Common styles
219
+ .panel {
220
+ @include box-shadow(0 1px 2px rgba(0,0,0,.05));
221
+ }
222
+
223
+ // Mixin for generating new styles
224
+ @mixin panel-heading-styles($color) {
225
+ @include gradient-vertical($start-color: $color, $end-color: darken($color, 5%));
226
+ }
227
+
228
+ // Apply the mixin to the panel headings only
229
+ .panel-default > .panel-heading { @include panel-heading-styles($panel-default-heading-bg); }
230
+ .panel-primary > .panel-heading { @include panel-heading-styles($panel-primary-heading-bg); }
231
+ .panel-success > .panel-heading { @include panel-heading-styles($panel-success-heading-bg); }
232
+ .panel-info > .panel-heading { @include panel-heading-styles($panel-info-heading-bg); }
233
+ .panel-warning > .panel-heading { @include panel-heading-styles($panel-warning-heading-bg); }
234
+ .panel-danger > .panel-heading { @include panel-heading-styles($panel-danger-heading-bg); }
235
+
236
+
237
+
238
+ //
239
+ // Wells
240
+ // --------------------------------------------------
241
+
242
+ .well {
243
+ @include gradient-vertical($start-color: darken($well-bg, 5%), $end-color: $well-bg);
244
+ border-color: darken($well-bg, 10%);
245
+ $shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
246
+ @include box-shadow($shadow);
247
+ }
@@ -0,0 +1,38 @@
1
+ //
2
+ // Thumbnails
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Mixin and adjust the regular image class
7
+ .thumbnail {
8
+ display: block;
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;
15
+ @include transition(all .2s ease-in-out);
16
+
17
+ > img,
18
+ a > img {
19
+ @include 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
+ // [converter] extracted a&.active to a.thumbnail.active
28
+
29
+ // Image captions
30
+ .caption {
31
+ padding: $thumbnail-caption-padding;
32
+ color: $thumbnail-caption-color;
33
+ }
34
+ }
35
+
36
+ a.thumbnail.active {
37
+ border-color: $link-color;
38
+ }