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
@@ -0,0 +1,100 @@
|
|
1
|
+
//
|
2
|
+
// Grid system
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Container widths
|
7
|
+
//
|
8
|
+
// Set the container width, and override it for fixed navbars in media queries.
|
9
|
+
|
10
|
+
.container {
|
11
|
+
@include container-fixed();
|
12
|
+
|
13
|
+
@media (min-width: $screen-sm-min) {
|
14
|
+
width: $container-sm;
|
15
|
+
}
|
16
|
+
@media (min-width: $screen-md-min) {
|
17
|
+
width: $container-md;
|
18
|
+
}
|
19
|
+
@media (min-width: $screen-lg-min) {
|
20
|
+
width: $container-lg;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
|
25
|
+
// Fluid container
|
26
|
+
//
|
27
|
+
// Utilizes the mixin meant for fixed width containers, but without any defined
|
28
|
+
// width for fluid, full width layouts.
|
29
|
+
|
30
|
+
.container-fluid {
|
31
|
+
@include container-fixed();
|
32
|
+
}
|
33
|
+
|
34
|
+
|
35
|
+
// Row
|
36
|
+
//
|
37
|
+
// Rows contain and clear the floats of your columns.
|
38
|
+
|
39
|
+
.row {
|
40
|
+
@include make-row();
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
// Columns
|
45
|
+
//
|
46
|
+
// Common styles for small and large grid columns
|
47
|
+
|
48
|
+
@include make-grid-columns();
|
49
|
+
|
50
|
+
|
51
|
+
// Extra small grid
|
52
|
+
//
|
53
|
+
// Columns, offsets, pushes, and pulls for extra small devices like
|
54
|
+
// smartphones.
|
55
|
+
|
56
|
+
@include make-grid-columns-float(xs);
|
57
|
+
@include make-grid($grid-columns, xs, width);
|
58
|
+
@include make-grid($grid-columns, xs, pull);
|
59
|
+
@include make-grid($grid-columns, xs, push);
|
60
|
+
@include make-grid($grid-columns, xs, offset);
|
61
|
+
|
62
|
+
|
63
|
+
// Small grid
|
64
|
+
//
|
65
|
+
// Columns, offsets, pushes, and pulls for the small device range, from phones
|
66
|
+
// to tablets.
|
67
|
+
|
68
|
+
@media (min-width: $screen-sm-min) {
|
69
|
+
@include make-grid-columns-float(sm);
|
70
|
+
@include make-grid($grid-columns, sm, width);
|
71
|
+
@include make-grid($grid-columns, sm, pull);
|
72
|
+
@include make-grid($grid-columns, sm, push);
|
73
|
+
@include make-grid($grid-columns, sm, offset);
|
74
|
+
}
|
75
|
+
|
76
|
+
|
77
|
+
// Medium grid
|
78
|
+
//
|
79
|
+
// Columns, offsets, pushes, and pulls for the desktop device range.
|
80
|
+
|
81
|
+
@media (min-width: $screen-md-min) {
|
82
|
+
@include make-grid-columns-float(md);
|
83
|
+
@include make-grid($grid-columns, md, width);
|
84
|
+
@include make-grid($grid-columns, md, pull);
|
85
|
+
@include make-grid($grid-columns, md, push);
|
86
|
+
@include make-grid($grid-columns, md, offset);
|
87
|
+
}
|
88
|
+
|
89
|
+
|
90
|
+
// Large grid
|
91
|
+
//
|
92
|
+
// Columns, offsets, pushes, and pulls for the large desktop device range.
|
93
|
+
|
94
|
+
@media (min-width: $screen-lg-min) {
|
95
|
+
@include make-grid-columns-float(lg);
|
96
|
+
@include make-grid($grid-columns, lg, width);
|
97
|
+
@include make-grid($grid-columns, lg, pull);
|
98
|
+
@include make-grid($grid-columns, lg, push);
|
99
|
+
@include make-grid($grid-columns, lg, offset);
|
100
|
+
}
|
@@ -10,13 +10,18 @@
|
|
10
10
|
border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
|
11
11
|
|
12
12
|
// Undo padding and float of grid classes
|
13
|
-
|
13
|
+
&[class*="col-"] {
|
14
14
|
float: none;
|
15
15
|
padding-left: 0;
|
16
16
|
padding-right: 0;
|
17
17
|
}
|
18
18
|
|
19
19
|
.form-control {
|
20
|
+
// IE9 fubars the placeholder attribute in text inputs and the arrows on
|
21
|
+
// select elements in input groups. To fix it, we float the input. Details:
|
22
|
+
// https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
|
23
|
+
float: left;
|
24
|
+
|
20
25
|
width: 100%;
|
21
26
|
margin-bottom: 0;
|
22
27
|
}
|
@@ -29,10 +34,10 @@
|
|
29
34
|
|
30
35
|
.input-group-lg > .form-control,
|
31
36
|
.input-group-lg > .input-group-addon,
|
32
|
-
.input-group-lg > .input-group-btn > .btn { .input-lg
|
37
|
+
.input-group-lg > .input-group-btn > .btn { @extend .input-lg; }
|
33
38
|
.input-group-sm > .form-control,
|
34
39
|
.input-group-sm > .input-group-addon,
|
35
|
-
.input-group-sm > .input-group-btn > .btn { .input-sm
|
40
|
+
.input-group-sm > .input-group-btn > .btn { @extend .input-sm; }
|
36
41
|
|
37
42
|
|
38
43
|
// Display as table-cell
|
@@ -57,26 +62,26 @@
|
|
57
62
|
// Text input groups
|
58
63
|
// -------------------------
|
59
64
|
.input-group-addon {
|
60
|
-
padding:
|
61
|
-
font-size:
|
65
|
+
padding: $padding-base-vertical $padding-base-horizontal;
|
66
|
+
font-size: $font-size-base;
|
62
67
|
font-weight: normal;
|
63
68
|
line-height: 1;
|
64
|
-
color:
|
69
|
+
color: $input-color;
|
65
70
|
text-align: center;
|
66
|
-
background-color:
|
67
|
-
border: 1px solid
|
68
|
-
border-radius:
|
71
|
+
background-color: $input-group-addon-bg;
|
72
|
+
border: 1px solid $input-group-addon-border-color;
|
73
|
+
border-radius: $border-radius-base;
|
69
74
|
|
70
75
|
// Sizing
|
71
76
|
&.input-sm {
|
72
|
-
padding:
|
73
|
-
font-size:
|
74
|
-
border-radius:
|
77
|
+
padding: $padding-small-vertical $padding-small-horizontal;
|
78
|
+
font-size: $font-size-small;
|
79
|
+
border-radius: $border-radius-small;
|
75
80
|
}
|
76
81
|
&.input-lg {
|
77
|
-
padding:
|
78
|
-
font-size:
|
79
|
-
border-radius:
|
82
|
+
padding: $padding-large-vertical $padding-large-horizontal;
|
83
|
+
font-size: $font-size-large;
|
84
|
+
border-radius: $border-radius-large;
|
80
85
|
}
|
81
86
|
|
82
87
|
// Nuke default margins from checkboxes and radios to vertically center within.
|
@@ -90,9 +95,11 @@
|
|
90
95
|
.input-group .form-control:first-child,
|
91
96
|
.input-group-addon:first-child,
|
92
97
|
.input-group-btn:first-child > .btn,
|
98
|
+
.input-group-btn:first-child > .btn-group > .btn,
|
93
99
|
.input-group-btn:first-child > .dropdown-toggle,
|
94
|
-
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle)
|
95
|
-
|
100
|
+
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
|
101
|
+
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
|
102
|
+
@include border-right-radius(0);
|
96
103
|
}
|
97
104
|
.input-group-addon:first-child {
|
98
105
|
border-right: 0;
|
@@ -100,9 +107,11 @@
|
|
100
107
|
.input-group .form-control:last-child,
|
101
108
|
.input-group-addon:last-child,
|
102
109
|
.input-group-btn:last-child > .btn,
|
110
|
+
.input-group-btn:last-child > .btn-group > .btn,
|
103
111
|
.input-group-btn:last-child > .dropdown-toggle,
|
104
|
-
.input-group-btn:first-child > .btn:not(:first-child)
|
105
|
-
|
112
|
+
.input-group-btn:first-child > .btn:not(:first-child),
|
113
|
+
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
|
114
|
+
@include border-left-radius(0);
|
106
115
|
}
|
107
116
|
.input-group-addon:last-child {
|
108
117
|
border-left: 0;
|
@@ -112,17 +121,37 @@
|
|
112
121
|
// -------------------------
|
113
122
|
.input-group-btn {
|
114
123
|
position: relative;
|
124
|
+
// Jankily prevent input button groups from wrapping with `white-space` and
|
125
|
+
// `font-size` in combination with `inline-block` on buttons.
|
126
|
+
font-size: 0;
|
115
127
|
white-space: nowrap;
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
128
|
+
|
129
|
+
// Negative margin for spacing, position for bringing hovered/focused/actived
|
130
|
+
// element above the siblings.
|
131
|
+
> .btn {
|
132
|
+
position: relative;
|
133
|
+
+ .btn {
|
134
|
+
margin-left: -1px;
|
135
|
+
}
|
136
|
+
// Bring the "active" button to the front
|
137
|
+
&:hover,
|
138
|
+
&:focus,
|
139
|
+
&:active {
|
140
|
+
z-index: 2;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
// Negative margin to only have a 1px border between the two
|
145
|
+
&:first-child {
|
146
|
+
> .btn,
|
147
|
+
> .btn-group {
|
148
|
+
margin-right: -1px;
|
149
|
+
}
|
122
150
|
}
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
151
|
+
&:last-child {
|
152
|
+
> .btn,
|
153
|
+
> .btn-group {
|
154
|
+
margin-left: -1px;
|
155
|
+
}
|
127
156
|
}
|
128
157
|
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
//
|
2
|
+
// Jumbotron
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
.jumbotron {
|
7
|
+
padding: $jumbotron-padding;
|
8
|
+
margin-bottom: $jumbotron-padding;
|
9
|
+
color: $jumbotron-color;
|
10
|
+
background-color: $jumbotron-bg;
|
11
|
+
|
12
|
+
h1,
|
13
|
+
.h1 {
|
14
|
+
color: $jumbotron-heading-color;
|
15
|
+
}
|
16
|
+
p {
|
17
|
+
margin-bottom: ($jumbotron-padding / 2);
|
18
|
+
font-size: $jumbotron-font-size;
|
19
|
+
font-weight: 200;
|
20
|
+
}
|
21
|
+
|
22
|
+
.container & {
|
23
|
+
border-radius: $border-radius-large; // Only round corners at higher resolutions if contained in a container
|
24
|
+
}
|
25
|
+
|
26
|
+
.container {
|
27
|
+
max-width: 100%;
|
28
|
+
}
|
29
|
+
|
30
|
+
@media screen and (min-width: $screen-sm-min) {
|
31
|
+
padding-top: ($jumbotron-padding * 1.6);
|
32
|
+
padding-bottom: ($jumbotron-padding * 1.6);
|
33
|
+
|
34
|
+
.container & {
|
35
|
+
padding-left: ($jumbotron-padding * 2);
|
36
|
+
padding-right: ($jumbotron-padding * 2);
|
37
|
+
}
|
38
|
+
|
39
|
+
h1,
|
40
|
+
.h1 {
|
41
|
+
font-size: ($font-size-base * 4.5);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
font-size: 75%;
|
9
9
|
font-weight: bold;
|
10
10
|
line-height: 1;
|
11
|
-
color:
|
11
|
+
color: $label-color;
|
12
12
|
text-align: center;
|
13
13
|
white-space: nowrap;
|
14
14
|
vertical-align: baseline;
|
@@ -18,7 +18,7 @@
|
|
18
18
|
&[href] {
|
19
19
|
&:hover,
|
20
20
|
&:focus {
|
21
|
-
color:
|
21
|
+
color: $label-link-hover-color;
|
22
22
|
text-decoration: none;
|
23
23
|
cursor: pointer;
|
24
24
|
}
|
@@ -28,31 +28,37 @@
|
|
28
28
|
&:empty {
|
29
29
|
display: none;
|
30
30
|
}
|
31
|
+
|
32
|
+
// Quick fix for labels in buttons
|
33
|
+
.btn & {
|
34
|
+
position: relative;
|
35
|
+
top: -1px;
|
36
|
+
}
|
31
37
|
}
|
32
38
|
|
33
39
|
// Colors
|
34
40
|
// Contextual variations (linked labels get darker on :hover)
|
35
41
|
|
36
42
|
.label-default {
|
37
|
-
|
43
|
+
@include label-variant($label-default-bg);
|
38
44
|
}
|
39
45
|
|
40
46
|
.label-primary {
|
41
|
-
|
47
|
+
@include label-variant($label-primary-bg);
|
42
48
|
}
|
43
49
|
|
44
50
|
.label-success {
|
45
|
-
|
51
|
+
@include label-variant($label-success-bg);
|
46
52
|
}
|
47
53
|
|
48
54
|
.label-info {
|
49
|
-
|
55
|
+
@include label-variant($label-info-bg);
|
50
56
|
}
|
51
57
|
|
52
58
|
.label-warning {
|
53
|
-
|
59
|
+
@include label-variant($label-warning-bg);
|
54
60
|
}
|
55
61
|
|
56
62
|
.label-danger {
|
57
|
-
|
63
|
+
@include label-variant($label-danger-bg);
|
58
64
|
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
//
|
2
|
+
// List groups
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Base class
|
7
|
+
//
|
8
|
+
// Easily usable on <ul>, <ol>, or <div>.
|
9
|
+
|
10
|
+
.list-group {
|
11
|
+
// No need to set list-style: none; since .list-group-item is block level
|
12
|
+
margin-bottom: 20px;
|
13
|
+
padding-left: 0; // reset padding because ul and ol
|
14
|
+
}
|
15
|
+
|
16
|
+
|
17
|
+
// Individual list items
|
18
|
+
//
|
19
|
+
// Use on `li`s or `div`s within the `.list-group` parent.
|
20
|
+
|
21
|
+
.list-group-item {
|
22
|
+
position: relative;
|
23
|
+
display: block;
|
24
|
+
padding: 10px 15px;
|
25
|
+
// Place the border on the list items and negative margin up for better styling
|
26
|
+
margin-bottom: -1px;
|
27
|
+
background-color: $list-group-bg;
|
28
|
+
border: 1px solid $list-group-border;
|
29
|
+
|
30
|
+
// Round the first and last items
|
31
|
+
&:first-child {
|
32
|
+
@include border-top-radius($list-group-border-radius);
|
33
|
+
}
|
34
|
+
&:last-child {
|
35
|
+
margin-bottom: 0;
|
36
|
+
@include border-bottom-radius($list-group-border-radius);
|
37
|
+
}
|
38
|
+
|
39
|
+
// Align badges within list items
|
40
|
+
> .badge {
|
41
|
+
float: right;
|
42
|
+
}
|
43
|
+
> .badge + .badge {
|
44
|
+
margin-right: 5px;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
|
49
|
+
// Linked list items
|
50
|
+
//
|
51
|
+
// Use anchor elements instead of `li`s or `div`s to create linked list items.
|
52
|
+
// Includes an extra `.active` modifier class for showing selected items.
|
53
|
+
|
54
|
+
a.list-group-item {
|
55
|
+
color: $list-group-link-color;
|
56
|
+
|
57
|
+
.list-group-item-heading {
|
58
|
+
color: $list-group-link-heading-color;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Hover state
|
62
|
+
&:hover,
|
63
|
+
&:focus {
|
64
|
+
text-decoration: none;
|
65
|
+
background-color: $list-group-hover-bg;
|
66
|
+
}
|
67
|
+
|
68
|
+
// Active class on item itself, not parent
|
69
|
+
&.active,
|
70
|
+
&.active:hover,
|
71
|
+
&.active:focus {
|
72
|
+
z-index: 2; // Place active items above their siblings for proper border styling
|
73
|
+
color: $list-group-active-color;
|
74
|
+
background-color: $list-group-active-bg;
|
75
|
+
border-color: $list-group-active-border;
|
76
|
+
|
77
|
+
// Force color to inherit for custom content
|
78
|
+
.list-group-item-heading {
|
79
|
+
color: inherit;
|
80
|
+
}
|
81
|
+
.list-group-item-text {
|
82
|
+
color: $list-group-active-text-color;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
|
88
|
+
// Contextual variants
|
89
|
+
//
|
90
|
+
// Add modifier classes to change text and background color on individual items.
|
91
|
+
// Organizationally, this must come after the `:hover` states.
|
92
|
+
|
93
|
+
@include list-group-item-variant(success, $state-success-bg, $state-success-text);
|
94
|
+
@include list-group-item-variant(info, $state-info-bg, $state-info-text);
|
95
|
+
@include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
|
96
|
+
@include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
|
97
|
+
|
98
|
+
|
99
|
+
// Custom content options
|
100
|
+
//
|
101
|
+
// Extra classes for creating well-formatted content within `.list-group-item`s.
|
102
|
+
|
103
|
+
.list-group-item-heading {
|
104
|
+
margin-top: 0;
|
105
|
+
margin-bottom: 5px;
|
106
|
+
}
|
107
|
+
.list-group-item-text {
|
108
|
+
margin-bottom: 0;
|
109
|
+
line-height: 1.3;
|
110
|
+
}
|
File without changes
|