bootstrap 4.3.0 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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 +173 -137
- data/assets/javascripts/bootstrap/base-component.js +182 -0
- data/assets/javascripts/bootstrap/button.js +102 -143
- data/assets/javascripts/bootstrap/carousel.js +481 -410
- data/assets/javascripts/bootstrap/collapse.js +340 -274
- data/assets/javascripts/bootstrap/dom/data.js +68 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +322 -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 +494 -400
- data/assets/javascripts/bootstrap/modal.js +834 -450
- data/assets/javascripts/bootstrap/offcanvas.js +866 -0
- data/assets/javascripts/bootstrap/popover.js +122 -199
- data/assets/javascripts/bootstrap/scrollspy.js +257 -241
- data/assets/javascripts/bootstrap/tab.js +219 -155
- data/assets/javascripts/bootstrap/toast.js +330 -190
- data/assets/javascripts/bootstrap/tooltip.js +710 -472
- 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 +3547 -2809
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/stylesheets/_bootstrap-grid.scss +54 -18
- data/assets/stylesheets/_bootstrap-reboot.scss +7 -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 +237 -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 +42 -8
- data/assets/stylesheets/bootstrap/_spinners.scss +21 -7
- data/assets/stylesheets/bootstrap/_tables.scss +80 -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 +993 -487
- 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 +70 -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 +131 -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 +274 -132
- 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
@@ -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
|
-
}
|