bootstrap 4.0.0.alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitattributes +14 -0
- data/.gitignore +19 -0
- data/.travis.yml +16 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +13 -0
- data/LICENSE +21 -0
- data/README.md +143 -0
- data/Rakefile +75 -0
- data/assets/javascripts/bootstrap-sprockets.js +11 -0
- data/assets/javascripts/bootstrap.js +3560 -0
- data/assets/javascripts/bootstrap.min.js +220 -0
- data/assets/javascripts/bootstrap/alert.js +192 -0
- data/assets/javascripts/bootstrap/button.js +172 -0
- data/assets/javascripts/bootstrap/carousel.js +478 -0
- data/assets/javascripts/bootstrap/collapse.js +364 -0
- data/assets/javascripts/bootstrap/dropdown.js +293 -0
- data/assets/javascripts/bootstrap/modal.js +536 -0
- data/assets/javascripts/bootstrap/popover.js +201 -0
- data/assets/javascripts/bootstrap/scrollspy.js +320 -0
- data/assets/javascripts/bootstrap/tab.js +263 -0
- data/assets/javascripts/bootstrap/tooltip.js +619 -0
- data/assets/javascripts/bootstrap/util.js +157 -0
- data/assets/stylesheets/_bootstrap-flex.scss +8 -0
- data/assets/stylesheets/_bootstrap-grid.scss +62 -0
- data/assets/stylesheets/_bootstrap-reboot.scss +10 -0
- data/assets/stylesheets/_bootstrap.scss +55 -0
- data/assets/stylesheets/bootstrap/_alert.scss +65 -0
- data/assets/stylesheets/bootstrap/_animation.scss +27 -0
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +23 -0
- data/assets/stylesheets/bootstrap/_button-group.scss +224 -0
- data/assets/stylesheets/bootstrap/_buttons.scss +174 -0
- data/assets/stylesheets/bootstrap/_card.scss +293 -0
- data/assets/stylesheets/bootstrap/_carousel.scss +252 -0
- data/assets/stylesheets/bootstrap/_close.scss +28 -0
- data/assets/stylesheets/bootstrap/_code.scss +58 -0
- data/assets/stylesheets/bootstrap/_custom-forms.scss +225 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +191 -0
- data/assets/stylesheets/bootstrap/_forms.scss +454 -0
- data/assets/stylesheets/bootstrap/_grid.scss +76 -0
- data/assets/stylesheets/bootstrap/_images.scss +28 -0
- data/assets/stylesheets/bootstrap/_input-group.scss +181 -0
- data/assets/stylesheets/bootstrap/_jumbotron.scss +22 -0
- data/assets/stylesheets/bootstrap/_labels.scss +75 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +128 -0
- data/assets/stylesheets/bootstrap/_media.scss +90 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +54 -0
- data/assets/stylesheets/bootstrap/_modal.scss +146 -0
- data/assets/stylesheets/bootstrap/_nav.scss +155 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +230 -0
- data/assets/stylesheets/bootstrap/_normalize.scss +428 -0
- data/assets/stylesheets/bootstrap/_pager.scss +57 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +82 -0
- data/assets/stylesheets/bootstrap/_popover.scss +140 -0
- data/assets/stylesheets/bootstrap/_print.scss +88 -0
- data/assets/stylesheets/bootstrap/_progress.scss +156 -0
- data/assets/stylesheets/bootstrap/_reboot.scss +298 -0
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +38 -0
- data/assets/stylesheets/bootstrap/_tables.scss +193 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +85 -0
- data/assets/stylesheets/bootstrap/_type.scss +192 -0
- data/assets/stylesheets/bootstrap/_utilities-responsive.scss +49 -0
- data/assets/stylesheets/bootstrap/_utilities-spacing.scss +78 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +117 -0
- data/assets/stylesheets/bootstrap/_variables.scss +632 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +14 -0
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +13 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +35 -0
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +76 -0
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +100 -0
- data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +89 -0
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +43 -0
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +44 -0
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +75 -0
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +59 -0
- data/assets/stylesheets/bootstrap/mixins/_image.scss +33 -0
- data/assets/stylesheets/bootstrap/mixins/_label.scss +11 -0
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +30 -0
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_progress.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_pulls.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +32 -0
- data/assets/stylesheets/bootstrap/mixins/_size.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +30 -0
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +8 -0
- data/bootstrap.gemspec +36 -0
- data/lib/bootstrap.rb +76 -0
- data/lib/bootstrap/engine.rb +11 -0
- data/lib/bootstrap/version.rb +4 -0
- data/tasks/updater.rb +67 -0
- data/tasks/updater/js.rb +37 -0
- data/tasks/updater/logger.rb +57 -0
- data/tasks/updater/network.rb +101 -0
- data/tasks/updater/scss.rb +34 -0
- data/templates/project/_bootstrap-variables.scss +633 -0
- data/templates/project/manifest.rb +18 -0
- data/templates/project/styles.scss +10 -0
- data/test/compass_test.rb +9 -0
- data/test/dummy_rails/README.rdoc +3 -0
- data/test/dummy_rails/Rakefile +6 -0
- data/test/dummy_rails/app/assets/images/.keep +0 -0
- data/test/dummy_rails/app/assets/javascripts/application.js +7 -0
- data/test/dummy_rails/app/assets/stylesheets/application.sass +1 -0
- data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
- data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
- data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
- data/test/dummy_rails/app/views/layouts/application.html.erb +14 -0
- data/test/dummy_rails/app/views/pages/root.html.slim +58 -0
- data/test/dummy_rails/config.ru +4 -0
- data/test/dummy_rails/config/application.rb +34 -0
- data/test/dummy_rails/config/boot.rb +5 -0
- data/test/dummy_rails/config/environment.rb +5 -0
- data/test/dummy_rails/config/environments/development.rb +23 -0
- data/test/dummy_rails/config/environments/production.rb +82 -0
- data/test/dummy_rails/config/environments/test.rb +38 -0
- data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy_rails/config/initializers/inflections.rb +16 -0
- data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
- data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
- data/test/dummy_rails/config/initializers/session_store.rb +3 -0
- data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy_rails/config/locales/en.yml +3 -0
- data/test/dummy_rails/config/locales/es.yml +3 -0
- data/test/dummy_rails/config/routes.rb +3 -0
- data/test/dummy_rails/log/.keep +0 -0
- data/test/gemfiles/rails_4_2.gemfile +11 -0
- data/test/gemfiles/rails_head.gemfile +19 -0
- data/test/rails_test.rb +19 -0
- data/test/support/dummy_rails_integration.rb +22 -0
- data/test/support/reporting.rb +27 -0
- data/test/test_helper.rb +35 -0
- data/test/test_helper_rails.rb +6 -0
- metadata +433 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Container widths
|
|
2
|
+
//
|
|
3
|
+
// Set the container width, and override it for fixed navbars in media queries.
|
|
4
|
+
|
|
5
|
+
.container {
|
|
6
|
+
@include make-container();
|
|
7
|
+
@include make-container-max-widths();
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
// Fluid container
|
|
13
|
+
//
|
|
14
|
+
// Utilizes the mixin meant for fixed width containers, but without any defined
|
|
15
|
+
// width for fluid, full width layouts.
|
|
16
|
+
|
|
17
|
+
.container-fluid {
|
|
18
|
+
@include make-container();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
// Row
|
|
23
|
+
//
|
|
24
|
+
// Rows contain and clear the floats of your columns.
|
|
25
|
+
|
|
26
|
+
@if $enable-grid-classes {
|
|
27
|
+
.row {
|
|
28
|
+
@include make-row();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
// Columns
|
|
34
|
+
//
|
|
35
|
+
// Common styles for small and large grid columns
|
|
36
|
+
|
|
37
|
+
@if $enable-grid-classes {
|
|
38
|
+
@include make-grid-columns();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
// Flex variation
|
|
43
|
+
//
|
|
44
|
+
// Custom styles for additional flex alignment options.
|
|
45
|
+
|
|
46
|
+
@if $enable-flex and $enable-grid-classes {
|
|
47
|
+
|
|
48
|
+
// Flex column reordering
|
|
49
|
+
|
|
50
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
51
|
+
@include media-breakpoint-up($breakpoint) {
|
|
52
|
+
.col-#{$breakpoint}-first { order: -1; }
|
|
53
|
+
.col-#{$breakpoint}-last { order: 1; }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Alignment for every column in row
|
|
58
|
+
|
|
59
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
60
|
+
@include media-breakpoint-up($breakpoint) {
|
|
61
|
+
.row-#{$breakpoint}-top { align-items: flex-start; }
|
|
62
|
+
.row-#{$breakpoint}-center { align-items: center; }
|
|
63
|
+
.row-#{$breakpoint}-bottom { align-items: flex-end; }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Alignment per column
|
|
68
|
+
|
|
69
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
70
|
+
@include media-breakpoint-up($breakpoint) {
|
|
71
|
+
.col-#{$breakpoint}-top { align-self: flex-start; }
|
|
72
|
+
.col-#{$breakpoint}-center { align-self: center; }
|
|
73
|
+
.col-#{$breakpoint}-bottom { align-self: flex-end; }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Responsive images (ensure images don't scale beyond their parents)
|
|
2
|
+
.img-fluid {
|
|
3
|
+
@include img-fluid();
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// Rounded corners
|
|
7
|
+
.img-rounded {
|
|
8
|
+
@include border-radius($border-radius-lg);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Image thumbnails
|
|
12
|
+
.img-thumbnail {
|
|
13
|
+
padding: $thumbnail-padding;
|
|
14
|
+
line-height: $line-height;
|
|
15
|
+
background-color: $thumbnail-bg;
|
|
16
|
+
border: 1px solid $thumbnail-border;
|
|
17
|
+
border-radius: $thumbnail-border-radius;
|
|
18
|
+
transition: all .2s ease-in-out;
|
|
19
|
+
@include box-shadow(0 1px 2px rgba(0,0,0,.075));
|
|
20
|
+
|
|
21
|
+
// Keep them at most 100% wide
|
|
22
|
+
@include img-fluid(inline-block);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Perfect circle
|
|
26
|
+
.img-circle {
|
|
27
|
+
border-radius: 50%;
|
|
28
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Base styles
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
.input-group {
|
|
6
|
+
position: relative;
|
|
7
|
+
|
|
8
|
+
@if $enable-flex {
|
|
9
|
+
display: flex;
|
|
10
|
+
} @else {
|
|
11
|
+
display: table;
|
|
12
|
+
// Prevent input groups from inheriting border styles from table cells when
|
|
13
|
+
// placed within a table.
|
|
14
|
+
border-collapse: separate;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.form-control {
|
|
18
|
+
// Ensure that the input is always above the *appended* addon button for
|
|
19
|
+
// proper border colors.
|
|
20
|
+
position: relative;
|
|
21
|
+
z-index: 2;
|
|
22
|
+
@if $enable-flex {
|
|
23
|
+
flex: 1;
|
|
24
|
+
} @else {
|
|
25
|
+
// IE9 fubars the placeholder attribute in text inputs and the arrows on
|
|
26
|
+
// select elements in input groups. To fix it, we float the input. Details:
|
|
27
|
+
// https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
|
|
28
|
+
float: left;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
margin-bottom: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.input-group-addon,
|
|
36
|
+
.input-group-btn,
|
|
37
|
+
.input-group .form-control {
|
|
38
|
+
@if $enable-flex {
|
|
39
|
+
// do nothing
|
|
40
|
+
} @else {
|
|
41
|
+
display: table-cell;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:not(:first-child):not(:last-child) {
|
|
45
|
+
@include border-radius(0);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.input-group-addon,
|
|
50
|
+
.input-group-btn {
|
|
51
|
+
@if $enable-flex {
|
|
52
|
+
// do nothing
|
|
53
|
+
} @else {
|
|
54
|
+
width: 1%;
|
|
55
|
+
}
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
vertical-align: middle; // Match the inputs
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
// Sizing options
|
|
62
|
+
//
|
|
63
|
+
// Remix the default form control sizing classes into new ones for easier
|
|
64
|
+
// manipulation.
|
|
65
|
+
|
|
66
|
+
.input-group-lg > .form-control,
|
|
67
|
+
.input-group-lg > .input-group-addon,
|
|
68
|
+
.input-group-lg > .input-group-btn > .btn {
|
|
69
|
+
@extend .form-control-lg;
|
|
70
|
+
}
|
|
71
|
+
.input-group-sm > .form-control,
|
|
72
|
+
.input-group-sm > .input-group-addon,
|
|
73
|
+
.input-group-sm > .input-group-btn > .btn {
|
|
74
|
+
@extend .form-control-sm;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
//
|
|
79
|
+
// Text input groups
|
|
80
|
+
//
|
|
81
|
+
|
|
82
|
+
.input-group-addon {
|
|
83
|
+
padding: $input-padding-y $input-padding-x;
|
|
84
|
+
font-size: $font-size-base;
|
|
85
|
+
font-weight: normal;
|
|
86
|
+
line-height: 1;
|
|
87
|
+
color: $input-color;
|
|
88
|
+
text-align: center;
|
|
89
|
+
background-color: $input-group-addon-bg;
|
|
90
|
+
border: 1px solid $input-group-addon-border-color;
|
|
91
|
+
@include border-radius($border-radius);
|
|
92
|
+
|
|
93
|
+
// Sizing
|
|
94
|
+
&.form-control-sm {
|
|
95
|
+
padding: $input-padding-y-sm $input-padding-x-sm;
|
|
96
|
+
font-size: $font-size-sm;
|
|
97
|
+
@include border-radius($border-radius-sm);
|
|
98
|
+
}
|
|
99
|
+
&.form-control-lg {
|
|
100
|
+
padding: $input-padding-y-lg $input-padding-x-lg;
|
|
101
|
+
font-size: $font-size-lg;
|
|
102
|
+
@include border-radius($border-radius-lg);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Nuke default margins from checkboxes and radios to vertically center within.
|
|
106
|
+
input[type="radio"],
|
|
107
|
+
input[type="checkbox"] {
|
|
108
|
+
margin-top: 0;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
//
|
|
114
|
+
// Reset rounded corners
|
|
115
|
+
//
|
|
116
|
+
|
|
117
|
+
.input-group .form-control:first-child,
|
|
118
|
+
.input-group-addon:first-child,
|
|
119
|
+
.input-group-btn:first-child > .btn,
|
|
120
|
+
.input-group-btn:first-child > .btn-group > .btn,
|
|
121
|
+
.input-group-btn:first-child > .dropdown-toggle,
|
|
122
|
+
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
|
|
123
|
+
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
|
|
124
|
+
@include border-right-radius(0);
|
|
125
|
+
}
|
|
126
|
+
.input-group-addon:first-child {
|
|
127
|
+
border-right: 0;
|
|
128
|
+
}
|
|
129
|
+
.input-group .form-control:last-child,
|
|
130
|
+
.input-group-addon:last-child,
|
|
131
|
+
.input-group-btn:last-child > .btn,
|
|
132
|
+
.input-group-btn:last-child > .btn-group > .btn,
|
|
133
|
+
.input-group-btn:last-child > .dropdown-toggle,
|
|
134
|
+
.input-group-btn:first-child > .btn:not(:first-child),
|
|
135
|
+
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
|
|
136
|
+
@include border-left-radius(0);
|
|
137
|
+
}
|
|
138
|
+
.input-group-addon:last-child {
|
|
139
|
+
border-left: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
//
|
|
144
|
+
// Button input groups
|
|
145
|
+
//
|
|
146
|
+
|
|
147
|
+
.input-group-btn {
|
|
148
|
+
position: relative;
|
|
149
|
+
// Jankily prevent input button groups from wrapping with `white-space` and
|
|
150
|
+
// `font-size` in combination with `inline-block` on buttons.
|
|
151
|
+
font-size: 0;
|
|
152
|
+
white-space: nowrap;
|
|
153
|
+
|
|
154
|
+
// Negative margin for spacing, position for bringing hovered/focused/actived
|
|
155
|
+
// element above the siblings.
|
|
156
|
+
> .btn {
|
|
157
|
+
position: relative;
|
|
158
|
+
+ .btn {
|
|
159
|
+
margin-left: -1px;
|
|
160
|
+
}
|
|
161
|
+
// Bring the "active" button to the front
|
|
162
|
+
@include hover-focus-active {
|
|
163
|
+
z-index: 2;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Negative margin to only have a 1px border between the two
|
|
168
|
+
&:first-child {
|
|
169
|
+
> .btn,
|
|
170
|
+
> .btn-group {
|
|
171
|
+
margin-right: -1px;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
&:last-child {
|
|
175
|
+
> .btn,
|
|
176
|
+
> .btn-group {
|
|
177
|
+
z-index: 2;
|
|
178
|
+
margin-left: -1px;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.jumbotron {
|
|
2
|
+
padding: $jumbotron-padding ($jumbotron-padding / 2);
|
|
3
|
+
margin-bottom: $jumbotron-padding;
|
|
4
|
+
background-color: $jumbotron-bg;
|
|
5
|
+
@include border-radius($border-radius-lg);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.jumbotron-hr {
|
|
9
|
+
border-top-color: darken($jumbotron-bg, 10%);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@include media-breakpoint-up(sm) {
|
|
13
|
+
.jumbotron {
|
|
14
|
+
padding: ($jumbotron-padding * 2) $jumbotron-padding;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.jumbotron-fluid {
|
|
19
|
+
padding-right: 0;
|
|
20
|
+
padding-left: 0;
|
|
21
|
+
@include border-radius(0);
|
|
22
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Base class
|
|
2
|
+
//
|
|
3
|
+
// Requires one of the contextual, color modifier classes for `color` and
|
|
4
|
+
// `background-color`.
|
|
5
|
+
|
|
6
|
+
.label {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
padding: .25em .4em;
|
|
9
|
+
font-size: 75%;
|
|
10
|
+
font-weight: bold;
|
|
11
|
+
line-height: 1;
|
|
12
|
+
color: $label-color;
|
|
13
|
+
text-align: center;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
vertical-align: baseline;
|
|
16
|
+
@include border-radius();
|
|
17
|
+
|
|
18
|
+
// Empty labels collapse automatically
|
|
19
|
+
&:empty {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Quick fix for labels in buttons
|
|
25
|
+
.btn .label {
|
|
26
|
+
position: relative;
|
|
27
|
+
top: -1px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Add hover effects, but only for links
|
|
31
|
+
a.label {
|
|
32
|
+
@include hover-focus {
|
|
33
|
+
color: $label-link-hover-color;
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Pill labels
|
|
40
|
+
//
|
|
41
|
+
// Make them extra rounded with a modifier to replace v3's badges.
|
|
42
|
+
|
|
43
|
+
.label-pill {
|
|
44
|
+
padding-right: .6em;
|
|
45
|
+
padding-left: .6em;
|
|
46
|
+
@include border-radius(1rem);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Colors
|
|
50
|
+
//
|
|
51
|
+
// Contextual variations (linked labels get darker on :hover).
|
|
52
|
+
|
|
53
|
+
.label-default {
|
|
54
|
+
@include label-variant($label-default-bg);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.label-primary {
|
|
58
|
+
@include label-variant($label-primary-bg);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.label-success {
|
|
62
|
+
@include label-variant($label-success-bg);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.label-info {
|
|
66
|
+
@include label-variant($label-info-bg);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.label-warning {
|
|
70
|
+
@include label-variant($label-warning-bg);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.label-danger {
|
|
74
|
+
@include label-variant($label-danger-bg);
|
|
75
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// Base class
|
|
2
|
+
//
|
|
3
|
+
// Easily usable on <ul>, <ol>, or <div>.
|
|
4
|
+
|
|
5
|
+
.list-group {
|
|
6
|
+
// No need to set list-style: none; since .list-group-item is block level
|
|
7
|
+
padding-left: 0; // reset padding because ul and ol
|
|
8
|
+
margin-bottom: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
// Individual list items
|
|
13
|
+
//
|
|
14
|
+
// Use on `li`s or `div`s within the `.list-group` parent.
|
|
15
|
+
|
|
16
|
+
.list-group-item {
|
|
17
|
+
position: relative;
|
|
18
|
+
display: block;
|
|
19
|
+
padding: .75rem 1.25rem;
|
|
20
|
+
// Place the border on the list items and negative margin up for better styling
|
|
21
|
+
margin-bottom: -$border-width;
|
|
22
|
+
background-color: $list-group-bg;
|
|
23
|
+
border: $border-width solid $list-group-border;
|
|
24
|
+
|
|
25
|
+
// Round the first and last items
|
|
26
|
+
&:first-child {
|
|
27
|
+
@include border-top-radius($list-group-border-radius);
|
|
28
|
+
}
|
|
29
|
+
&:last-child {
|
|
30
|
+
margin-bottom: 0;
|
|
31
|
+
@include border-bottom-radius($list-group-border-radius);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.list-group-flush {
|
|
36
|
+
.list-group-item {
|
|
37
|
+
border-width: $border-width 0;
|
|
38
|
+
border-radius: 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// Interactive list items
|
|
44
|
+
//
|
|
45
|
+
// Use anchor or button elements instead of `li`s or `div`s to create interactive
|
|
46
|
+
// list items. Includes an extra `.active` modifier class for selected items.
|
|
47
|
+
|
|
48
|
+
a.list-group-item,
|
|
49
|
+
button.list-group-item {
|
|
50
|
+
width: 100%;
|
|
51
|
+
color: $list-group-link-color;
|
|
52
|
+
text-align: inherit;
|
|
53
|
+
|
|
54
|
+
.list-group-item-heading {
|
|
55
|
+
color: $list-group-link-heading-color;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Hover state
|
|
59
|
+
@include hover-focus {
|
|
60
|
+
color: $list-group-link-hover-color;
|
|
61
|
+
text-decoration: none;
|
|
62
|
+
background-color: $list-group-hover-bg;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.list-group-item {
|
|
67
|
+
// Disabled state
|
|
68
|
+
&.disabled {
|
|
69
|
+
@include plain-hover-focus {
|
|
70
|
+
color: $list-group-disabled-color;
|
|
71
|
+
cursor: $cursor-disabled;
|
|
72
|
+
background-color: $list-group-disabled-bg;
|
|
73
|
+
|
|
74
|
+
// Force color to inherit for custom content
|
|
75
|
+
.list-group-item-heading {
|
|
76
|
+
color: inherit;
|
|
77
|
+
}
|
|
78
|
+
.list-group-item-text {
|
|
79
|
+
color: $list-group-disabled-text-color;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Active class on item itself, not parent
|
|
85
|
+
&.active {
|
|
86
|
+
@include plain-hover-focus {
|
|
87
|
+
z-index: 2; // Place active items above their siblings for proper border styling
|
|
88
|
+
color: $list-group-active-color;
|
|
89
|
+
background-color: $list-group-active-bg;
|
|
90
|
+
border-color: $list-group-active-border;
|
|
91
|
+
|
|
92
|
+
// Force color to inherit for custom content
|
|
93
|
+
.list-group-item-heading,
|
|
94
|
+
.list-group-item-heading > small,
|
|
95
|
+
.list-group-item-heading > .small {
|
|
96
|
+
color: inherit;
|
|
97
|
+
}
|
|
98
|
+
.list-group-item-text {
|
|
99
|
+
color: $list-group-active-text-color;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
// Contextual variants
|
|
107
|
+
//
|
|
108
|
+
// Add modifier classes to change text and background color on individual items.
|
|
109
|
+
// Organizationally, this must come after the `:hover` states.
|
|
110
|
+
|
|
111
|
+
@include list-group-item-variant(success, $state-success-bg, $state-success-text);
|
|
112
|
+
@include list-group-item-variant(info, $state-info-bg, $state-info-text);
|
|
113
|
+
@include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
|
|
114
|
+
@include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
// Custom content options
|
|
118
|
+
//
|
|
119
|
+
// Extra classes for creating well-formatted content within `.list-group-item`s.
|
|
120
|
+
|
|
121
|
+
.list-group-item-heading {
|
|
122
|
+
margin-top: 0;
|
|
123
|
+
margin-bottom: 5px;
|
|
124
|
+
}
|
|
125
|
+
.list-group-item-text {
|
|
126
|
+
margin-bottom: 0;
|
|
127
|
+
line-height: 1.3;
|
|
128
|
+
}
|