bootstrap 4.3.1 → 5.1.3
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 +4 -4
- data/.travis.yml +17 -2
- data/CHANGELOG.md +2 -14
- data/README.md +7 -4
- data/assets/javascripts/bootstrap/alert.js +172 -136
- data/assets/javascripts/bootstrap/base-component.js +182 -0
- data/assets/javascripts/bootstrap/button.js +101 -142
- data/assets/javascripts/bootstrap/carousel.js +483 -408
- data/assets/javascripts/bootstrap/collapse.js +340 -273
- data/assets/javascripts/bootstrap/dom/data.js +68 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +321 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +127 -0
- data/assets/javascripts/bootstrap/dropdown.js +491 -399
- data/assets/javascripts/bootstrap/modal.js +841 -449
- data/assets/javascripts/bootstrap/offcanvas.js +866 -0
- data/assets/javascripts/bootstrap/popover.js +121 -198
- data/assets/javascripts/bootstrap/scrollspy.js +256 -240
- data/assets/javascripts/bootstrap/tab.js +218 -154
- data/assets/javascripts/bootstrap/toast.js +329 -189
- data/assets/javascripts/bootstrap/tooltip.js +651 -552
- data/assets/javascripts/bootstrap-global-this-define.js +6 -0
- data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
- data/assets/javascripts/bootstrap-sprockets.js +8 -1
- data/assets/javascripts/bootstrap.js +3503 -2892
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/stylesheets/_bootstrap-grid.scss +56 -18
- data/assets/stylesheets/_bootstrap-reboot.scss +5 -4
- data/assets/stylesheets/_bootstrap.scss +20 -11
- data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
- data/assets/stylesheets/bootstrap/_alert.scss +15 -9
- data/assets/stylesheets/bootstrap/_badge.scss +2 -27
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -18
- data/assets/stylesheets/bootstrap/_button-group.scss +21 -45
- data/assets/stylesheets/bootstrap/_buttons.scss +28 -54
- data/assets/stylesheets/bootstrap/_card.scss +52 -125
- data/assets/stylesheets/bootstrap/_carousel.scss +70 -38
- data/assets/stylesheets/bootstrap/_close.scss +30 -31
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +88 -39
- data/assets/stylesheets/bootstrap/_forms.scss +9 -330
- data/assets/stylesheets/bootstrap/_functions.scss +243 -27
- data/assets/stylesheets/bootstrap/_grid.scss +14 -33
- data/assets/stylesheets/bootstrap/_helpers.scss +9 -0
- data/assets/stylesheets/bootstrap/_images.scss +3 -3
- data/assets/stylesheets/bootstrap/_list-group.scss +61 -36
- data/assets/stylesheets/bootstrap/_mixins.scss +12 -16
- data/assets/stylesheets/bootstrap/_modal.scss +64 -84
- data/assets/stylesheets/bootstrap/_nav.scss +29 -10
- data/assets/stylesheets/bootstrap/_navbar.scss +93 -52
- data/assets/stylesheets/bootstrap/_offcanvas.scss +83 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +13 -22
- data/assets/stylesheets/bootstrap/_placeholders.scss +51 -0
- data/assets/stylesheets/bootstrap/_popover.scss +29 -42
- data/assets/stylesheets/bootstrap/_progress.scss +10 -5
- data/assets/stylesheets/bootstrap/_reboot.scss +350 -208
- data/assets/stylesheets/bootstrap/_root.scss +43 -8
- data/assets/stylesheets/bootstrap/_spinners.scss +21 -7
- data/assets/stylesheets/bootstrap/_tables.scss +84 -114
- data/assets/stylesheets/bootstrap/_toasts.scss +21 -14
- data/assets/stylesheets/bootstrap/_tooltip.scss +21 -21
- data/assets/stylesheets/bootstrap/_transitions.scss +8 -1
- data/assets/stylesheets/bootstrap/_type.scss +40 -61
- data/assets/stylesheets/bootstrap/_utilities.scss +630 -17
- data/assets/stylesheets/bootstrap/_variables.scss +1007 -489
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +63 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +72 -0
- data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
- data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
- data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
- data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
- data/assets/stylesheets/bootstrap/helpers/_stacks.scss +15 -0
- data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
- data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
- data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
- data/assets/stylesheets/bootstrap/helpers/_vr.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
- data/assets/stylesheets/bootstrap/mixins/_backdrop.scss +14 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +37 -22
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +77 -51
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +10 -8
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
- data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +67 -115
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +132 -32
- data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +17 -8
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +18 -8
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +89 -0
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
- data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +278 -128
- data/bootstrap.gemspec +4 -6
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +25 -6
- data/tasks/updater/network.rb +8 -2
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
- data/test/dummy_rails/app/views/pages/root.html +89 -0
- data/test/dummy_rails/config/application.rb +0 -3
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/gemfiles/rails_6_1.gemfile +7 -0
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +18 -13
- metadata +61 -79
- data/assets/javascripts/bootstrap/util.js +0 -171
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -507
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -193
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
- data/assets/stylesheets/bootstrap/_media.scss +0 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -141
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -21
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -66
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -33
- data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -16
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
- data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
- data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
- data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
- data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
|
@@ -27,25 +27,31 @@
|
|
|
27
27
|
// Expand the right padding and account for the close button's positioning.
|
|
28
28
|
|
|
29
29
|
.alert-dismissible {
|
|
30
|
-
padding-right: $
|
|
30
|
+
padding-right: $alert-dismissible-padding-r;
|
|
31
31
|
|
|
32
32
|
// Adjust close link position
|
|
33
|
-
.close {
|
|
33
|
+
.btn-close {
|
|
34
34
|
position: absolute;
|
|
35
35
|
top: 0;
|
|
36
36
|
right: 0;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
z-index: $stretched-link-z-index + 1;
|
|
38
|
+
padding: $alert-padding-y * 1.25 $alert-padding-x;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
//
|
|
44
|
-
//
|
|
43
|
+
// scss-docs-start alert-modifiers
|
|
45
44
|
// Generate contextual modifier classes for colorizing the alert.
|
|
46
45
|
|
|
47
|
-
@each $
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
@each $state, $value in $theme-colors {
|
|
47
|
+
$alert-background: shift-color($value, $alert-bg-scale);
|
|
48
|
+
$alert-border: shift-color($value, $alert-border-scale);
|
|
49
|
+
$alert-color: shift-color($value, $alert-color-scale);
|
|
50
|
+
@if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) {
|
|
51
|
+
$alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
|
|
52
|
+
}
|
|
53
|
+
.alert-#{$state} {
|
|
54
|
+
@include alert-variant($alert-background, $alert-border, $alert-color);
|
|
50
55
|
}
|
|
51
56
|
}
|
|
57
|
+
// scss-docs-end alert-modifiers
|
|
@@ -9,17 +9,12 @@
|
|
|
9
9
|
@include font-size($badge-font-size);
|
|
10
10
|
font-weight: $badge-font-weight;
|
|
11
11
|
line-height: 1;
|
|
12
|
+
color: $badge-color;
|
|
12
13
|
text-align: center;
|
|
13
14
|
white-space: nowrap;
|
|
14
15
|
vertical-align: baseline;
|
|
15
16
|
@include border-radius($badge-border-radius);
|
|
16
|
-
@include
|
|
17
|
-
|
|
18
|
-
@at-root a#{&} {
|
|
19
|
-
@include hover-focus {
|
|
20
|
-
text-decoration: none;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
17
|
+
@include gradient-bg();
|
|
23
18
|
|
|
24
19
|
// Empty badges collapse automatically
|
|
25
20
|
&:empty {
|
|
@@ -32,23 +27,3 @@
|
|
|
32
27
|
position: relative;
|
|
33
28
|
top: -1px;
|
|
34
29
|
}
|
|
35
|
-
|
|
36
|
-
// Pill badges
|
|
37
|
-
//
|
|
38
|
-
// Make them extra rounded with a modifier to replace v3's badges.
|
|
39
|
-
|
|
40
|
-
.badge-pill {
|
|
41
|
-
padding-right: $badge-pill-padding-x;
|
|
42
|
-
padding-left: $badge-pill-padding-x;
|
|
43
|
-
@include border-radius($badge-pill-border-radius);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Colors
|
|
47
|
-
//
|
|
48
|
-
// Contextual variations (linked badges get darker on :hover).
|
|
49
|
-
|
|
50
|
-
@each $color, $value in $theme-colors {
|
|
51
|
-
.badge-#{$color} {
|
|
52
|
-
@include badge-variant($value);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
flex-wrap: wrap;
|
|
4
4
|
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
|
|
5
5
|
margin-bottom: $breadcrumb-margin-bottom;
|
|
6
|
+
@include font-size($breadcrumb-font-size);
|
|
6
7
|
list-style: none;
|
|
7
8
|
background-color: $breadcrumb-bg;
|
|
8
9
|
@include border-radius($breadcrumb-border-radius);
|
|
@@ -11,30 +12,16 @@
|
|
|
11
12
|
.breadcrumb-item {
|
|
12
13
|
// The separator between breadcrumbs (by default, a forward-slash: "/")
|
|
13
14
|
+ .breadcrumb-item {
|
|
14
|
-
padding-left: $breadcrumb-item-padding;
|
|
15
|
+
padding-left: $breadcrumb-item-padding-x;
|
|
15
16
|
|
|
16
17
|
&::before {
|
|
17
|
-
|
|
18
|
-
padding-right: $breadcrumb-item-padding;
|
|
18
|
+
float: left; // Suppress inline spacings and underlining of the separator
|
|
19
|
+
padding-right: $breadcrumb-item-padding-x;
|
|
19
20
|
color: $breadcrumb-divider-color;
|
|
20
|
-
content: $breadcrumb-divider;
|
|
21
|
+
content: var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
// IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
|
|
25
|
-
// without `<ul>`s. The `::before` pseudo-element generates an element
|
|
26
|
-
// *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
|
|
27
|
-
//
|
|
28
|
-
// To trick IE into suppressing the underline, we give the pseudo-element an
|
|
29
|
-
// underline and then immediately remove it.
|
|
30
|
-
+ .breadcrumb-item:hover::before {
|
|
31
|
-
text-decoration: underline;
|
|
32
|
-
}
|
|
33
|
-
// stylelint-disable-next-line no-duplicate-selectors
|
|
34
|
-
+ .breadcrumb-item:hover::before {
|
|
35
|
-
text-decoration: none;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
25
|
&.active {
|
|
39
26
|
color: $breadcrumb-active-color;
|
|
40
27
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// stylelint-disable selector-no-qualifying-type
|
|
2
|
-
|
|
3
1
|
// Make the div behave like a button
|
|
4
2
|
.btn-group,
|
|
5
3
|
.btn-group-vertical {
|
|
@@ -10,17 +8,17 @@
|
|
|
10
8
|
> .btn {
|
|
11
9
|
position: relative;
|
|
12
10
|
flex: 1 1 auto;
|
|
11
|
+
}
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
13
|
+
// Bring the hover, focused, and "active" buttons to the front to overlay
|
|
14
|
+
// the borders properly
|
|
15
|
+
> .btn-check:checked + .btn,
|
|
16
|
+
> .btn-check:focus + .btn,
|
|
17
|
+
> .btn:hover,
|
|
18
|
+
> .btn:focus,
|
|
19
|
+
> .btn:active,
|
|
20
|
+
> .btn.active {
|
|
21
|
+
z-index: 1;
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
24
|
|
|
@@ -45,12 +43,17 @@
|
|
|
45
43
|
// Reset rounded corners
|
|
46
44
|
> .btn:not(:last-child):not(.dropdown-toggle),
|
|
47
45
|
> .btn-group:not(:last-child) > .btn {
|
|
48
|
-
@include border-
|
|
46
|
+
@include border-end-radius(0);
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
// The left radius should be 0 if the button is:
|
|
50
|
+
// - the "third or more" child
|
|
51
|
+
// - the second child and the previous element isn't `.btn-check` (making it the first child visually)
|
|
52
|
+
// - part of a btn-group which isn't the first child
|
|
53
|
+
> .btn:nth-child(n + 3),
|
|
54
|
+
> :not(.btn-check) + .btn,
|
|
52
55
|
> .btn-group:not(:first-child) > .btn {
|
|
53
|
-
@include border-
|
|
56
|
+
@include border-start-radius(0);
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
59
|
|
|
@@ -72,11 +75,11 @@
|
|
|
72
75
|
|
|
73
76
|
&::after,
|
|
74
77
|
.dropup &::after,
|
|
75
|
-
.
|
|
78
|
+
.dropend &::after {
|
|
76
79
|
margin-left: 0;
|
|
77
80
|
}
|
|
78
81
|
|
|
79
|
-
.
|
|
82
|
+
.dropstart &::before {
|
|
80
83
|
margin-right: 0;
|
|
81
84
|
}
|
|
82
85
|
}
|
|
@@ -129,35 +132,8 @@
|
|
|
129
132
|
@include border-bottom-radius(0);
|
|
130
133
|
}
|
|
131
134
|
|
|
132
|
-
> .btn
|
|
135
|
+
> .btn ~ .btn,
|
|
133
136
|
> .btn-group:not(:first-child) > .btn {
|
|
134
137
|
@include border-top-radius(0);
|
|
135
138
|
}
|
|
136
139
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
// Checkbox and radio options
|
|
140
|
-
//
|
|
141
|
-
// In order to support the browser's form validation feedback, powered by the
|
|
142
|
-
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
|
|
143
|
-
// `display: none;` or `visibility: hidden;` as that also hides the popover.
|
|
144
|
-
// Simply visually hiding the inputs via `opacity` would leave them clickable in
|
|
145
|
-
// certain cases which is prevented by using `clip` and `pointer-events`.
|
|
146
|
-
// This way, we ensure a DOM element is visible to position the popover from.
|
|
147
|
-
//
|
|
148
|
-
// See https://github.com/twbs/bootstrap/pull/12794 and
|
|
149
|
-
// https://github.com/twbs/bootstrap/pull/14559 for more information.
|
|
150
|
-
|
|
151
|
-
.btn-group-toggle {
|
|
152
|
-
> .btn,
|
|
153
|
-
> .btn-group > .btn {
|
|
154
|
-
margin-bottom: 0; // Override default `<label>` value
|
|
155
|
-
|
|
156
|
-
input[type="radio"],
|
|
157
|
-
input[type="checkbox"] {
|
|
158
|
-
position: absolute;
|
|
159
|
-
clip: rect(0, 0, 0, 0);
|
|
160
|
-
pointer-events: none;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// stylelint-disable selector-no-qualifying-type
|
|
2
|
-
|
|
3
1
|
//
|
|
4
2
|
// Base styles
|
|
5
3
|
//
|
|
@@ -8,47 +6,48 @@
|
|
|
8
6
|
display: inline-block;
|
|
9
7
|
font-family: $btn-font-family;
|
|
10
8
|
font-weight: $btn-font-weight;
|
|
9
|
+
line-height: $btn-line-height;
|
|
11
10
|
color: $body-color;
|
|
12
11
|
text-align: center;
|
|
12
|
+
text-decoration: if($link-decoration == none, null, none);
|
|
13
|
+
white-space: $btn-white-space;
|
|
13
14
|
vertical-align: middle;
|
|
15
|
+
cursor: if($enable-button-pointers, pointer, null);
|
|
14
16
|
user-select: none;
|
|
15
17
|
background-color: transparent;
|
|
16
18
|
border: $btn-border-width solid transparent;
|
|
17
|
-
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-
|
|
19
|
+
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-border-radius);
|
|
18
20
|
@include transition($btn-transition);
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
&:hover {
|
|
21
23
|
color: $body-color;
|
|
22
|
-
text-decoration: none;
|
|
24
|
+
text-decoration: if($link-hover-decoration == underline, none, null);
|
|
23
25
|
}
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
.btn-check:focus + &,
|
|
28
|
+
&:focus {
|
|
27
29
|
outline: 0;
|
|
28
30
|
box-shadow: $btn-focus-box-shadow;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
&:
|
|
34
|
-
|
|
35
|
-
@include box-shadow(none);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&:not(:disabled):not(.disabled):active,
|
|
39
|
-
&:not(:disabled):not(.disabled).active {
|
|
33
|
+
.btn-check:checked + &,
|
|
34
|
+
.btn-check:active + &,
|
|
35
|
+
&:active,
|
|
36
|
+
&.active {
|
|
40
37
|
@include box-shadow($btn-active-box-shadow);
|
|
41
38
|
|
|
42
39
|
&:focus {
|
|
43
40
|
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
|
|
44
41
|
}
|
|
45
42
|
}
|
|
46
|
-
}
|
|
47
43
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
fieldset:disabled
|
|
51
|
-
|
|
44
|
+
&:disabled,
|
|
45
|
+
&.disabled,
|
|
46
|
+
fieldset:disabled & {
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
opacity: $btn-disabled-opacity;
|
|
49
|
+
@include box-shadow(none);
|
|
50
|
+
}
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
|
|
@@ -56,6 +55,7 @@ fieldset:disabled a.btn {
|
|
|
56
55
|
// Alternate buttons
|
|
57
56
|
//
|
|
58
57
|
|
|
58
|
+
// scss-docs-start btn-variant-loops
|
|
59
59
|
@each $color, $value in $theme-colors {
|
|
60
60
|
.btn-#{$color} {
|
|
61
61
|
@include button-variant($value, $value);
|
|
@@ -67,6 +67,7 @@ fieldset:disabled a.btn {
|
|
|
67
67
|
@include button-outline-variant($value);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
+
// scss-docs-end btn-variant-loops
|
|
70
71
|
|
|
71
72
|
|
|
72
73
|
//
|
|
@@ -76,24 +77,21 @@ fieldset:disabled a.btn {
|
|
|
76
77
|
// Make a button look and behave like a link
|
|
77
78
|
.btn-link {
|
|
78
79
|
font-weight: $font-weight-normal;
|
|
79
|
-
color: $link-color;
|
|
80
|
+
color: $btn-link-color;
|
|
80
81
|
text-decoration: $link-decoration;
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
color: $link-hover-color;
|
|
83
|
+
&:hover {
|
|
84
|
+
color: $btn-link-hover-color;
|
|
84
85
|
text-decoration: $link-hover-decoration;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
&:focus
|
|
88
|
-
&.focus {
|
|
88
|
+
&:focus {
|
|
89
89
|
text-decoration: $link-hover-decoration;
|
|
90
|
-
box-shadow: none;
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
&:disabled,
|
|
94
93
|
&.disabled {
|
|
95
94
|
color: $btn-link-disabled-color;
|
|
96
|
-
pointer-events: none;
|
|
97
95
|
}
|
|
98
96
|
|
|
99
97
|
// No need for an active state here
|
|
@@ -105,33 +103,9 @@ fieldset:disabled a.btn {
|
|
|
105
103
|
//
|
|
106
104
|
|
|
107
105
|
.btn-lg {
|
|
108
|
-
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-
|
|
106
|
+
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
|
|
109
107
|
}
|
|
110
108
|
|
|
111
109
|
.btn-sm {
|
|
112
|
-
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
//
|
|
117
|
-
// Block button
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
.btn-block {
|
|
121
|
-
display: block;
|
|
122
|
-
width: 100%;
|
|
123
|
-
|
|
124
|
-
// Vertically space out multiple block buttons
|
|
125
|
-
+ .btn-block {
|
|
126
|
-
margin-top: $btn-block-spacing-y;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// Specificity overrides
|
|
131
|
-
input[type="submit"],
|
|
132
|
-
input[type="reset"],
|
|
133
|
-
input[type="button"] {
|
|
134
|
-
&.btn-block {
|
|
135
|
-
width: 100%;
|
|
136
|
-
}
|
|
110
|
+
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
|
|
137
111
|
}
|
|
@@ -7,44 +7,56 @@
|
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
|
|
10
|
+
height: $card-height;
|
|
10
11
|
word-wrap: break-word;
|
|
11
12
|
background-color: $card-bg;
|
|
12
13
|
background-clip: border-box;
|
|
13
14
|
border: $card-border-width solid $card-border-color;
|
|
14
15
|
@include border-radius($card-border-radius);
|
|
16
|
+
@include box-shadow($card-box-shadow);
|
|
15
17
|
|
|
16
18
|
> hr {
|
|
17
19
|
margin-right: 0;
|
|
18
20
|
margin-left: 0;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
|
-
> .list-group
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
> .list-group {
|
|
24
|
+
border-top: inherit;
|
|
25
|
+
border-bottom: inherit;
|
|
26
|
+
|
|
27
|
+
&:first-child {
|
|
28
|
+
border-top-width: 0;
|
|
29
|
+
@include border-top-radius($card-inner-border-radius);
|
|
24
30
|
}
|
|
25
|
-
}
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
@include border-bottom-radius($card-border-radius);
|
|
32
|
+
&:last-child {
|
|
33
|
+
border-bottom-width: 0;
|
|
34
|
+
@include border-bottom-radius($card-inner-border-radius);
|
|
30
35
|
}
|
|
31
36
|
}
|
|
37
|
+
|
|
38
|
+
// Due to specificity of the above selector (`.card > .list-group`), we must
|
|
39
|
+
// use a child selector here to prevent double borders.
|
|
40
|
+
> .card-header + .list-group,
|
|
41
|
+
> .list-group + .card-footer {
|
|
42
|
+
border-top: 0;
|
|
43
|
+
}
|
|
32
44
|
}
|
|
33
45
|
|
|
34
46
|
.card-body {
|
|
35
47
|
// Enable `flex-grow: 1` for decks and groups so that card blocks take up
|
|
36
48
|
// as much space as possible, ensuring footers are aligned to the bottom.
|
|
37
49
|
flex: 1 1 auto;
|
|
38
|
-
padding: $card-spacer-x;
|
|
50
|
+
padding: $card-spacer-y $card-spacer-x;
|
|
39
51
|
color: $card-color;
|
|
40
52
|
}
|
|
41
53
|
|
|
42
54
|
.card-title {
|
|
43
|
-
margin-bottom: $card-spacer-y;
|
|
55
|
+
margin-bottom: $card-title-spacer-y;
|
|
44
56
|
}
|
|
45
57
|
|
|
46
58
|
.card-subtitle {
|
|
47
|
-
margin-top: -$card-spacer-y
|
|
59
|
+
margin-top: -$card-title-spacer-y * .5;
|
|
48
60
|
margin-bottom: 0;
|
|
49
61
|
}
|
|
50
62
|
|
|
@@ -53,8 +65,8 @@
|
|
|
53
65
|
}
|
|
54
66
|
|
|
55
67
|
.card-link {
|
|
56
|
-
|
|
57
|
-
text-decoration: none;
|
|
68
|
+
&:hover {
|
|
69
|
+
text-decoration: if($link-hover-decoration == underline, none, null);
|
|
58
70
|
}
|
|
59
71
|
|
|
60
72
|
+ .card-link {
|
|
@@ -67,7 +79,7 @@
|
|
|
67
79
|
//
|
|
68
80
|
|
|
69
81
|
.card-header {
|
|
70
|
-
padding: $card-
|
|
82
|
+
padding: $card-cap-padding-y $card-cap-padding-x;
|
|
71
83
|
margin-bottom: 0; // Removes the default margin-bottom of <hN>
|
|
72
84
|
color: $card-cap-color;
|
|
73
85
|
background-color: $card-cap-bg;
|
|
@@ -76,16 +88,11 @@
|
|
|
76
88
|
&:first-child {
|
|
77
89
|
@include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
|
|
78
90
|
}
|
|
79
|
-
|
|
80
|
-
+ .list-group {
|
|
81
|
-
.list-group-item:first-child {
|
|
82
|
-
border-top: 0;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
.card-footer {
|
|
88
|
-
padding: $card-
|
|
94
|
+
padding: $card-cap-padding-y $card-cap-padding-x;
|
|
95
|
+
color: $card-cap-color;
|
|
89
96
|
background-color: $card-cap-bg;
|
|
90
97
|
border-top: $card-border-width solid $card-border-color;
|
|
91
98
|
|
|
@@ -100,15 +107,22 @@
|
|
|
100
107
|
//
|
|
101
108
|
|
|
102
109
|
.card-header-tabs {
|
|
103
|
-
margin-right: -$card-
|
|
104
|
-
margin-bottom: -$card-
|
|
105
|
-
margin-left: -$card-
|
|
110
|
+
margin-right: -$card-cap-padding-x * .5;
|
|
111
|
+
margin-bottom: -$card-cap-padding-y;
|
|
112
|
+
margin-left: -$card-cap-padding-x * .5;
|
|
106
113
|
border-bottom: 0;
|
|
114
|
+
|
|
115
|
+
@if $nav-tabs-link-active-bg != $card-bg {
|
|
116
|
+
.nav-link.active {
|
|
117
|
+
background-color: $card-bg;
|
|
118
|
+
border-bottom-color: $card-bg;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
107
121
|
}
|
|
108
122
|
|
|
109
123
|
.card-header-pills {
|
|
110
|
-
margin-right: -$card-
|
|
111
|
-
margin-left: -$card-
|
|
124
|
+
margin-right: -$card-cap-padding-x * .5;
|
|
125
|
+
margin-left: -$card-cap-padding-x * .5;
|
|
112
126
|
}
|
|
113
127
|
|
|
114
128
|
// Card image
|
|
@@ -119,61 +133,31 @@
|
|
|
119
133
|
bottom: 0;
|
|
120
134
|
left: 0;
|
|
121
135
|
padding: $card-img-overlay-padding;
|
|
136
|
+
@include border-radius($card-inner-border-radius);
|
|
122
137
|
}
|
|
123
138
|
|
|
124
|
-
.card-img
|
|
139
|
+
.card-img,
|
|
140
|
+
.card-img-top,
|
|
141
|
+
.card-img-bottom {
|
|
125
142
|
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
|
|
126
|
-
@include border-radius($card-inner-border-radius);
|
|
127
143
|
}
|
|
128
144
|
|
|
129
|
-
|
|
145
|
+
.card-img,
|
|
130
146
|
.card-img-top {
|
|
131
|
-
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
|
|
132
147
|
@include border-top-radius($card-inner-border-radius);
|
|
133
148
|
}
|
|
134
149
|
|
|
150
|
+
.card-img,
|
|
135
151
|
.card-img-bottom {
|
|
136
|
-
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
|
|
137
152
|
@include border-bottom-radius($card-inner-border-radius);
|
|
138
153
|
}
|
|
139
154
|
|
|
140
155
|
|
|
141
|
-
// Card deck
|
|
142
|
-
|
|
143
|
-
.card-deck {
|
|
144
|
-
display: flex;
|
|
145
|
-
flex-direction: column;
|
|
146
|
-
|
|
147
|
-
.card {
|
|
148
|
-
margin-bottom: $card-deck-margin;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
@include media-breakpoint-up(sm) {
|
|
152
|
-
flex-flow: row wrap;
|
|
153
|
-
margin-right: -$card-deck-margin;
|
|
154
|
-
margin-left: -$card-deck-margin;
|
|
155
|
-
|
|
156
|
-
.card {
|
|
157
|
-
display: flex;
|
|
158
|
-
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
|
159
|
-
flex: 1 0 0%;
|
|
160
|
-
flex-direction: column;
|
|
161
|
-
margin-right: $card-deck-margin;
|
|
162
|
-
margin-bottom: 0; // Override the default
|
|
163
|
-
margin-left: $card-deck-margin;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
156
|
//
|
|
170
157
|
// Card groups
|
|
171
158
|
//
|
|
172
159
|
|
|
173
160
|
.card-group {
|
|
174
|
-
display: flex;
|
|
175
|
-
flex-direction: column;
|
|
176
|
-
|
|
177
161
|
// The child selector allows nested `.card` within `.card-group`
|
|
178
162
|
// to display properly.
|
|
179
163
|
> .card {
|
|
@@ -181,6 +165,7 @@
|
|
|
181
165
|
}
|
|
182
166
|
|
|
183
167
|
@include media-breakpoint-up(sm) {
|
|
168
|
+
display: flex;
|
|
184
169
|
flex-flow: row wrap;
|
|
185
170
|
// The child selector allows nested `.card` within `.card-group`
|
|
186
171
|
// to display properly.
|
|
@@ -197,31 +182,31 @@
|
|
|
197
182
|
// Handle rounded corners
|
|
198
183
|
@if $enable-rounded {
|
|
199
184
|
&:not(:last-child) {
|
|
200
|
-
@include border-
|
|
185
|
+
@include border-end-radius(0);
|
|
201
186
|
|
|
202
187
|
.card-img-top,
|
|
203
188
|
.card-header {
|
|
204
|
-
// stylelint-disable-next-line property-
|
|
189
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
205
190
|
border-top-right-radius: 0;
|
|
206
191
|
}
|
|
207
192
|
.card-img-bottom,
|
|
208
193
|
.card-footer {
|
|
209
|
-
// stylelint-disable-next-line property-
|
|
194
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
210
195
|
border-bottom-right-radius: 0;
|
|
211
196
|
}
|
|
212
197
|
}
|
|
213
198
|
|
|
214
199
|
&:not(:first-child) {
|
|
215
|
-
@include border-
|
|
200
|
+
@include border-start-radius(0);
|
|
216
201
|
|
|
217
202
|
.card-img-top,
|
|
218
203
|
.card-header {
|
|
219
|
-
// stylelint-disable-next-line property-
|
|
204
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
220
205
|
border-top-left-radius: 0;
|
|
221
206
|
}
|
|
222
207
|
.card-img-bottom,
|
|
223
208
|
.card-footer {
|
|
224
|
-
// stylelint-disable-next-line property-
|
|
209
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
225
210
|
border-bottom-left-radius: 0;
|
|
226
211
|
}
|
|
227
212
|
}
|
|
@@ -229,61 +214,3 @@
|
|
|
229
214
|
}
|
|
230
215
|
}
|
|
231
216
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
//
|
|
235
|
-
// Columns
|
|
236
|
-
//
|
|
237
|
-
|
|
238
|
-
.card-columns {
|
|
239
|
-
.card {
|
|
240
|
-
margin-bottom: $card-columns-margin;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
@include media-breakpoint-up(sm) {
|
|
244
|
-
column-count: $card-columns-count;
|
|
245
|
-
column-gap: $card-columns-gap;
|
|
246
|
-
orphans: 1;
|
|
247
|
-
widows: 1;
|
|
248
|
-
|
|
249
|
-
.card {
|
|
250
|
-
display: inline-block; // Don't let them vertically span multiple columns
|
|
251
|
-
width: 100%; // Don't let their width change
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
//
|
|
258
|
-
// Accordion
|
|
259
|
-
//
|
|
260
|
-
|
|
261
|
-
.accordion {
|
|
262
|
-
> .card {
|
|
263
|
-
overflow: hidden;
|
|
264
|
-
|
|
265
|
-
&:not(:first-of-type) {
|
|
266
|
-
.card-header:first-child {
|
|
267
|
-
@include border-radius(0);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
&:not(:last-of-type) {
|
|
271
|
-
border-bottom: 0;
|
|
272
|
-
@include border-radius(0);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
&:first-of-type {
|
|
277
|
-
border-bottom: 0;
|
|
278
|
-
@include border-bottom-radius(0);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
&:last-of-type {
|
|
282
|
-
@include border-top-radius(0);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.card-header {
|
|
286
|
-
margin-bottom: -$card-border-width;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|