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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -8
- data/CONTRIBUTING.md +4 -4
- data/Gemfile.lock +52 -65
- data/LICENSE +2 -2
- data/README.md +48 -18
- data/Rakefile +67 -32
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +23 -8
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.svg +200 -199
- data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/gemfiles/Gemfile.rails-3.2.x +2 -3
- data/gemfiles/Gemfile.rails-4.0.x +2 -3
- data/lib/generators/twbs_sass_rails/install/install_generator.rb +2 -2
- data/lib/generators/twbs_sass_rails/install/templates/{twbs-variables.css.less → twbs-variables.css.scss} +4 -3
- data/lib/generators/twbs_sass_rails/install/templates/{twbs.css.less → twbs.css.scss} +12 -7
- data/lib/twbs_sass_rails/version.rb +1 -1
- data/test/dummy/app/assets/stylesheets/{default-twbs.css.less → default-twbs.css.scss} +0 -0
- data/test/dummy/app/assets/stylesheets/test.css.scss +9 -0
- data/test/dummy/app/assets/stylesheets/twbs-variables.css.scss +7 -0
- data/test/dummy/app/assets/stylesheets/{twbs.css.less → twbs.css.scss} +12 -7
- data/test/dummy/config/application.rb +4 -1
- data/test/dummy/config/environments/development.rb +1 -1
- data/test/generators/install_generator_test.rb +4 -4
- data/test/integration/assets_precompile_integration_test.rb +11 -5
- data/test/integration/twbs_sass_rails_integration_test.rb +8 -7
- data/test/test_helper.rb +2 -4
- data/twbs_sass_rails.gemspec +6 -9
- data/vendor/assets/javascripts/respond.js +223 -212
- data/vendor/assets/javascripts/twbs/bootstrap/affix.js +36 -25
- data/vendor/assets/javascripts/twbs/bootstrap/alert.js +7 -17
- data/vendor/assets/javascripts/twbs/bootstrap/button.js +26 -28
- data/vendor/assets/javascripts/twbs/bootstrap/carousel.js +22 -34
- data/vendor/assets/javascripts/twbs/bootstrap/collapse.js +9 -18
- data/vendor/assets/javascripts/twbs/bootstrap/dropdown.js +25 -32
- data/vendor/assets/javascripts/twbs/bootstrap/modal.js +27 -30
- data/vendor/assets/javascripts/twbs/bootstrap/popover.js +16 -23
- data/vendor/assets/javascripts/twbs/bootstrap/scrollspy.js +19 -24
- data/vendor/assets/javascripts/twbs/bootstrap/tab.js +10 -20
- data/vendor/assets/javascripts/twbs/bootstrap/tooltip.js +54 -41
- data/vendor/assets/javascripts/twbs/bootstrap/transition.js +13 -21
- data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +16 -0
- data/vendor/assets/stylesheets/fontawesome/_core.scss +12 -0
- data/vendor/assets/stylesheets/fontawesome/_extras.scss +44 -0
- data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +6 -0
- data/vendor/assets/stylesheets/fontawesome/_icons.scss +412 -0
- data/vendor/assets/stylesheets/fontawesome/_larger.scss +13 -0
- data/vendor/assets/stylesheets/fontawesome/_list.scss +19 -0
- data/vendor/assets/stylesheets/fontawesome/_mixins.scss +20 -0
- data/vendor/assets/stylesheets/fontawesome/_path.scss +14 -0
- data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +9 -0
- data/vendor/assets/stylesheets/fontawesome/_spinning.scss +30 -0
- data/vendor/assets/stylesheets/fontawesome/_stacked.scss +20 -0
- data/vendor/assets/stylesheets/fontawesome/_variables.scss +381 -0
- data/vendor/assets/stylesheets/fontawesome/font-awesome.scss +17 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{alerts.less → _alerts.scss} +10 -10
- data/vendor/assets/stylesheets/twbs/bootstrap/{badges.less → _badges.scss} +19 -15
- data/vendor/assets/stylesheets/twbs/bootstrap/_breadcrumbs.scss +26 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{button-groups.less → _button-groups.scss} +38 -60
- data/vendor/assets/stylesheets/twbs/bootstrap/{buttons.less → _buttons.scss} +28 -34
- data/vendor/assets/stylesheets/twbs/bootstrap/{carousel.less → _carousel.scss} +38 -19
- data/vendor/assets/stylesheets/twbs/bootstrap/_close.scss +35 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/_code.scss +63 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{component-animations.less → _component-animations.scss} +2 -2
- data/vendor/assets/stylesheets/twbs/bootstrap/{dropdowns.less → _dropdowns.scss} +53 -33
- data/vendor/assets/stylesheets/twbs/bootstrap/{forms.less → _forms.scss} +133 -79
- data/vendor/assets/stylesheets/twbs/bootstrap/{glyphicons.less → _glyphicons.scss} +16 -19
- data/vendor/assets/stylesheets/twbs/bootstrap/_grid.scss +100 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{input-groups.less → _input-groups.scss} +58 -29
- data/vendor/assets/stylesheets/twbs/bootstrap/_jumbotron.scss +44 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{labels.less → _labels.scss} +14 -8
- data/vendor/assets/stylesheets/twbs/bootstrap/_list-group.scss +110 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{media.less → _media.scss} +0 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/_mixins.scss +931 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{modals.less → _modals.scss} +37 -40
- data/vendor/assets/stylesheets/twbs/bootstrap/_navbar.scss +620 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{navs.less → _navs.scss} +41 -52
- data/vendor/assets/stylesheets/twbs/bootstrap/{normalize.less → _normalize.scss} +148 -121
- data/vendor/assets/stylesheets/twbs/bootstrap/{pager.less → _pager.scss} +8 -8
- data/vendor/assets/stylesheets/twbs/bootstrap/_pagination.scss +88 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/_panels.scss +230 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{popovers.less → _popovers.scss} +36 -36
- data/vendor/assets/stylesheets/twbs/bootstrap/{print.less → _print.scss} +6 -5
- data/vendor/assets/stylesheets/twbs/bootstrap/_progress-bars.scss +80 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/_responsive-utilities.scss +80 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{scaffolding.less → _scaffolding.scss} +39 -24
- data/vendor/assets/stylesheets/twbs/bootstrap/{tables.less → _tables.scss} +42 -48
- data/vendor/assets/stylesheets/twbs/bootstrap/_theme.scss +247 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/_thumbnails.scss +38 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/_tooltip.scss +95 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/_type.scss +296 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{utilities.less → _utilities.scss} +14 -3
- data/vendor/assets/stylesheets/twbs/bootstrap/_variables.scss +831 -0
- data/vendor/assets/stylesheets/twbs/bootstrap/{wells.less → _wells.scss} +6 -6
- data/vendor/assets/stylesheets/twbs/bootstrap/bootstrap.scss +48 -0
- data/vendor/assets/stylesheets/twbs/{bootstrap.less → bootstrap.scss} +0 -0
- metadata +94 -134
- data/test/dummy/app/assets/stylesheets/test.css.less +0 -5
- data/test/dummy/app/assets/stylesheets/twbs-variables.css.less +0 -6
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/db/.keep +0 -0
- data/vendor/assets/stylesheets/fontawesome/bootstrap.less +0 -84
- data/vendor/assets/stylesheets/fontawesome/core.less +0 -129
- data/vendor/assets/stylesheets/fontawesome/extras.less +0 -93
- data/vendor/assets/stylesheets/fontawesome/font-awesome.less +0 -33
- data/vendor/assets/stylesheets/fontawesome/icons.less +0 -381
- data/vendor/assets/stylesheets/fontawesome/mixins.less +0 -48
- data/vendor/assets/stylesheets/fontawesome/path.less +0 -14
- data/vendor/assets/stylesheets/fontawesome/variables.less +0 -735
- data/vendor/assets/stylesheets/twbs/bootstrap/bootstrap.less +0 -58
- data/vendor/assets/stylesheets/twbs/bootstrap/breadcrumbs.less +0 -23
- data/vendor/assets/stylesheets/twbs/bootstrap/close.less +0 -33
- data/vendor/assets/stylesheets/twbs/bootstrap/code.less +0 -56
- data/vendor/assets/stylesheets/twbs/bootstrap/grid.less +0 -346
- data/vendor/assets/stylesheets/twbs/bootstrap/jumbotron.less +0 -40
- data/vendor/assets/stylesheets/twbs/bootstrap/list-group.less +0 -88
- data/vendor/assets/stylesheets/twbs/bootstrap/mixins.less +0 -744
- data/vendor/assets/stylesheets/twbs/bootstrap/navbar.less +0 -621
- data/vendor/assets/stylesheets/twbs/bootstrap/pagination.less +0 -85
- data/vendor/assets/stylesheets/twbs/bootstrap/panels.less +0 -143
- data/vendor/assets/stylesheets/twbs/bootstrap/progress-bars.less +0 -96
- data/vendor/assets/stylesheets/twbs/bootstrap/responsive-utilities.less +0 -220
- data/vendor/assets/stylesheets/twbs/bootstrap/theme.less +0 -244
- data/vendor/assets/stylesheets/twbs/bootstrap/thumbnails.less +0 -32
- data/vendor/assets/stylesheets/twbs/bootstrap/tooltip.less +0 -95
- data/vendor/assets/stylesheets/twbs/bootstrap/type.less +0 -271
- 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
|
-
|
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:
|
24
|
-
font-size:
|
25
|
-
line-height:
|
26
|
-
color:
|
27
|
-
background-color:
|
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:
|
49
|
+
color: $link-color;
|
45
50
|
text-decoration: none;
|
46
51
|
|
47
52
|
&:hover,
|
48
53
|
&:focus {
|
49
|
-
color:
|
54
|
+
color: $link-hover-color;
|
50
55
|
text-decoration: underline;
|
51
56
|
}
|
52
57
|
|
53
58
|
&:focus {
|
54
|
-
|
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
|
-
|
82
|
+
@include img-responsive();
|
68
83
|
}
|
69
84
|
|
70
85
|
// Rounded corners
|
71
86
|
.img-rounded {
|
72
|
-
border-radius:
|
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:
|
80
|
-
line-height:
|
81
|
-
background-color:
|
82
|
-
border: 1px solid
|
83
|
-
border-radius:
|
84
|
-
|
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
|
-
|
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:
|
100
|
-
margin-bottom:
|
114
|
+
margin-top: $line-height-computed;
|
115
|
+
margin-bottom: $line-height-computed;
|
101
116
|
border: 0;
|
102
|
-
border-top: 1px solid
|
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
|
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:
|
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:
|
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:
|
28
|
-
line-height:
|
27
|
+
padding: $table-cell-padding;
|
28
|
+
line-height: $line-height-base;
|
29
29
|
vertical-align: top;
|
30
|
-
border-top: 1px solid
|
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
|
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
|
52
|
+
border-top: 2px solid $table-border-color;
|
53
53
|
}
|
54
54
|
|
55
55
|
// Nesting
|
56
56
|
.table {
|
57
|
-
background-color:
|
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:
|
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
|
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
|
90
|
+
border: 1px solid $table-border-color;
|
91
91
|
}
|
92
92
|
}
|
93
93
|
}
|
94
|
-
> thead {
|
95
|
-
>
|
96
|
-
|
97
|
-
|
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
|
-
>
|
112
|
-
|
113
|
-
|
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
|
-
>
|
128
|
-
|
129
|
-
|
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
|
-
|
174
|
-
|
175
|
-
|
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:
|
171
|
+
@media (max-width: $screen-xs-max) {
|
185
172
|
.table-responsive {
|
186
173
|
width: 100%;
|
187
|
-
margin-bottom:
|
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
|
178
|
+
border: 1px solid $table-border-color;
|
192
179
|
-webkit-overflow-scrolling: touch;
|
193
180
|
|
194
|
-
// Tighten up spacing
|
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
|
+
}
|