bootstrap 4.5.3 → 5.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +55 -0
- data/README.md +28 -5
- data/assets/javascripts/bootstrap/alert.js +54 -133
- data/assets/javascripts/bootstrap/base-component.js +99 -0
- data/assets/javascripts/bootstrap/button.js +44 -183
- data/assets/javascripts/bootstrap/carousel.js +308 -450
- data/assets/javascripts/bootstrap/collapse.js +180 -243
- data/assets/javascripts/bootstrap/dom/data.js +66 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +283 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +84 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +85 -0
- data/assets/javascripts/bootstrap/dropdown.js +320 -387
- data/assets/javascripts/bootstrap/modal.js +238 -478
- data/assets/javascripts/bootstrap/offcanvas.js +297 -0
- data/assets/javascripts/bootstrap/popover.js +58 -163
- data/assets/javascripts/bootstrap/scrollspy.js +223 -228
- data/assets/javascripts/bootstrap/tab.js +251 -166
- data/assets/javascripts/bootstrap/toast.js +147 -149
- data/assets/javascripts/bootstrap/tooltip.js +434 -646
- data/assets/javascripts/bootstrap/util/backdrop.js +165 -0
- data/assets/javascripts/bootstrap/util/component-functions.js +46 -0
- data/assets/javascripts/bootstrap/util/config.js +79 -0
- data/assets/javascripts/bootstrap/util/focustrap.js +129 -0
- data/assets/javascripts/bootstrap/util/index.js +350 -0
- data/assets/javascripts/bootstrap/util/sanitizer.js +122 -0
- data/assets/javascripts/bootstrap/util/scrollbar.js +138 -0
- data/assets/javascripts/bootstrap/util/swipe.js +155 -0
- data/assets/javascripts/bootstrap/util/template-factory.js +177 -0
- 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 +24 -8
- data/assets/javascripts/bootstrap.js +4037 -3206
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +56 -21
- data/assets/stylesheets/_bootstrap-reboot.scss +4 -7
- data/assets/stylesheets/_bootstrap.scss +20 -13
- data/assets/stylesheets/bootstrap/_accordion.scss +149 -0
- data/assets/stylesheets/bootstrap/_alert.scss +33 -14
- data/assets/stylesheets/bootstrap/_badge.scss +15 -31
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +23 -27
- data/assets/stylesheets/bootstrap/_button-group.scss +25 -46
- data/assets/stylesheets/bootstrap/_buttons.scss +136 -71
- data/assets/stylesheets/bootstrap/_card.scss +61 -113
- data/assets/stylesheets/bootstrap/_carousel.scss +64 -35
- data/assets/stylesheets/bootstrap/_close.scss +30 -30
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +128 -71
- data/assets/stylesheets/bootstrap/_forms.scss +9 -347
- data/assets/stylesheets/bootstrap/_functions.scss +181 -23
- data/assets/stylesheets/bootstrap/_grid.scss +13 -53
- data/assets/stylesheets/bootstrap/_helpers.scss +10 -0
- data/assets/stylesheets/bootstrap/_images.scss +1 -1
- data/assets/stylesheets/bootstrap/_list-group.scss +72 -34
- data/assets/stylesheets/bootstrap/_maps.scss +54 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +9 -13
- data/assets/stylesheets/bootstrap/_modal.scss +107 -110
- data/assets/stylesheets/bootstrap/_nav.scss +72 -23
- data/assets/stylesheets/bootstrap/_navbar.scss +127 -173
- data/assets/stylesheets/bootstrap/_offcanvas.scss +144 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +72 -37
- data/assets/stylesheets/bootstrap/_placeholders.scss +51 -0
- data/assets/stylesheets/bootstrap/_popover.scss +99 -73
- data/assets/stylesheets/bootstrap/_progress.scss +26 -14
- data/assets/stylesheets/bootstrap/_reboot.scss +326 -200
- data/assets/stylesheets/bootstrap/_root.scss +62 -9
- data/assets/stylesheets/bootstrap/_spinners.scss +51 -22
- data/assets/stylesheets/bootstrap/_tables.scss +94 -115
- data/assets/stylesheets/bootstrap/_toasts.scss +54 -27
- data/assets/stylesheets/bootstrap/_tooltip.scss +68 -63
- data/assets/stylesheets/bootstrap/_transitions.scss +8 -1
- data/assets/stylesheets/bootstrap/_type.scss +40 -59
- data/assets/stylesheets/bootstrap/_utilities.scss +647 -18
- data/assets/stylesheets/bootstrap/_variables.scss +1018 -526
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +75 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +175 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +194 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +71 -0
- data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +132 -0
- data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
- data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +10 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_position.scss +36 -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 +8 -6
- data/assets/stylesheets/bootstrap/mixins/_backdrop.scss +14 -0
- data/assets/stylesheets/bootstrap/mixins/_banner.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +10 -8
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +20 -16
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +60 -100
- 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 +11 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +48 -74
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +119 -37
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +7 -19
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +97 -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 +3 -5
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +31 -7
- data/tasks/updater/network.rb +9 -3
- data/tasks/updater.rb +2 -2
- data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
- 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_5_2.gemfile +8 -0
- data/test/gemfiles/rails_6_1.gemfile +7 -0
- data/test/gemfiles/rails_7_0.gemfile +7 -0
- data/test/test_helper.rb +3 -2
- metadata +70 -78
- data/.travis.yml +0 -31
- data/assets/javascripts/bootstrap/util.js +0 -192
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -524
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -192
- 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 -23
- 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 -80
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
- 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 -17
- 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/_interactions.scss +0 -5
- 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
- /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -3,15 +3,45 @@
|
|
3
3
|
// Easily usable on <ul>, <ol>, or <div>.
|
4
4
|
|
5
5
|
.list-group {
|
6
|
+
// scss-docs-start list-group-css-vars
|
7
|
+
--#{$prefix}list-group-color: #{$list-group-color};
|
8
|
+
--#{$prefix}list-group-bg: #{$list-group-bg};
|
9
|
+
--#{$prefix}list-group-border-color: #{$list-group-border-color};
|
10
|
+
--#{$prefix}list-group-border-width: #{$list-group-border-width};
|
11
|
+
--#{$prefix}list-group-border-radius: #{$list-group-border-radius};
|
12
|
+
--#{$prefix}list-group-item-padding-x: #{$list-group-item-padding-x};
|
13
|
+
--#{$prefix}list-group-item-padding-y: #{$list-group-item-padding-y};
|
14
|
+
--#{$prefix}list-group-action-color: #{$list-group-action-color};
|
15
|
+
--#{$prefix}list-group-action-hover-color: #{$list-group-action-hover-color};
|
16
|
+
--#{$prefix}list-group-action-hover-bg: #{$list-group-hover-bg};
|
17
|
+
--#{$prefix}list-group-action-active-color: #{$list-group-action-active-color};
|
18
|
+
--#{$prefix}list-group-action-active-bg: #{$list-group-action-active-bg};
|
19
|
+
--#{$prefix}list-group-disabled-color: #{$list-group-disabled-color};
|
20
|
+
--#{$prefix}list-group-disabled-bg: #{$list-group-disabled-bg};
|
21
|
+
--#{$prefix}list-group-active-color: #{$list-group-active-color};
|
22
|
+
--#{$prefix}list-group-active-bg: #{$list-group-active-bg};
|
23
|
+
--#{$prefix}list-group-active-border-color: #{$list-group-active-border-color};
|
24
|
+
// scss-docs-end list-group-css-vars
|
25
|
+
|
6
26
|
display: flex;
|
7
27
|
flex-direction: column;
|
8
28
|
|
9
29
|
// No need to set list-style: none; since .list-group-item is block level
|
10
30
|
padding-left: 0; // reset padding because ul and ol
|
11
31
|
margin-bottom: 0;
|
12
|
-
@include border-radius($list-group-border-radius);
|
32
|
+
@include border-radius(var(--#{$prefix}list-group-border-radius));
|
13
33
|
}
|
14
34
|
|
35
|
+
.list-group-numbered {
|
36
|
+
list-style-type: none;
|
37
|
+
counter-reset: section;
|
38
|
+
|
39
|
+
> .list-group-item::before {
|
40
|
+
// Increments only this instance of the section counter
|
41
|
+
content: counters(section, ".") ". ";
|
42
|
+
counter-increment: section;
|
43
|
+
}
|
44
|
+
}
|
15
45
|
|
16
46
|
// Interactive list items
|
17
47
|
//
|
@@ -20,24 +50,24 @@
|
|
20
50
|
|
21
51
|
.list-group-item-action {
|
22
52
|
width: 100%; // For `<button>`s (anchors become 100% by default though)
|
23
|
-
color: $list-group-action-color;
|
53
|
+
color: var(--#{$prefix}list-group-action-color);
|
24
54
|
text-align: inherit; // For `<button>`s (anchors inherit)
|
25
55
|
|
26
56
|
// Hover state
|
27
|
-
|
57
|
+
&:hover,
|
58
|
+
&:focus {
|
28
59
|
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
29
|
-
color: $list-group-action-hover-color;
|
60
|
+
color: var(--#{$prefix}list-group-action-hover-color);
|
30
61
|
text-decoration: none;
|
31
|
-
background-color: $list-group-hover-bg;
|
62
|
+
background-color: var(--#{$prefix}list-group-action-hover-bg);
|
32
63
|
}
|
33
64
|
|
34
65
|
&:active {
|
35
|
-
color: $list-group-action-active-color;
|
36
|
-
background-color: $list-group-action-active-bg;
|
66
|
+
color: var(--#{$prefix}list-group-action-active-color);
|
67
|
+
background-color: var(--#{$prefix}list-group-action-active-bg);
|
37
68
|
}
|
38
69
|
}
|
39
70
|
|
40
|
-
|
41
71
|
// Individual list items
|
42
72
|
//
|
43
73
|
// Use on `li`s or `div`s within the `.list-group` parent.
|
@@ -45,11 +75,11 @@
|
|
45
75
|
.list-group-item {
|
46
76
|
position: relative;
|
47
77
|
display: block;
|
48
|
-
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
49
|
-
color: $list-group-color;
|
78
|
+
padding: var(--#{$prefix}list-group-item-padding-y) var(--#{$prefix}list-group-item-padding-x);
|
79
|
+
color: var(--#{$prefix}list-group-color);
|
50
80
|
text-decoration: if($link-decoration == none, null, none);
|
51
|
-
background-color: $list-group-bg;
|
52
|
-
border: $list-group-border-width solid $list-group-border-color;
|
81
|
+
background-color: var(--#{$prefix}list-group-bg);
|
82
|
+
border: var(--#{$prefix}list-group-border-width) solid var(--#{$prefix}list-group-border-color);
|
53
83
|
|
54
84
|
&:first-child {
|
55
85
|
@include border-top-radius(inherit);
|
@@ -61,30 +91,30 @@
|
|
61
91
|
|
62
92
|
&.disabled,
|
63
93
|
&:disabled {
|
64
|
-
color: $list-group-disabled-color;
|
94
|
+
color: var(--#{$prefix}list-group-disabled-color);
|
65
95
|
pointer-events: none;
|
66
|
-
background-color: $list-group-disabled-bg;
|
96
|
+
background-color: var(--#{$prefix}list-group-disabled-bg);
|
67
97
|
}
|
68
98
|
|
69
99
|
// Include both here for `<a>`s and `<button>`s
|
70
100
|
&.active {
|
71
101
|
z-index: 2; // Place active items above their siblings for proper border styling
|
72
|
-
color: $list-group-active-color;
|
73
|
-
background-color: $list-group-active-bg;
|
74
|
-
border-color: $list-group-active-border-color;
|
102
|
+
color: var(--#{$prefix}list-group-active-color);
|
103
|
+
background-color: var(--#{$prefix}list-group-active-bg);
|
104
|
+
border-color: var(--#{$prefix}list-group-active-border-color);
|
75
105
|
}
|
76
106
|
|
77
|
-
|
107
|
+
// stylelint-disable-next-line scss/selector-no-redundant-nesting-selector
|
108
|
+
& + .list-group-item {
|
78
109
|
border-top-width: 0;
|
79
110
|
|
80
111
|
&.active {
|
81
|
-
margin-top:
|
82
|
-
border-top-width: $list-group-border-width;
|
112
|
+
margin-top: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
|
113
|
+
border-top-width: var(--#{$prefix}list-group-border-width);
|
83
114
|
}
|
84
115
|
}
|
85
116
|
}
|
86
117
|
|
87
|
-
|
88
118
|
// Horizontal
|
89
119
|
//
|
90
120
|
// Change the layout of list group items from vertical (default) to horizontal.
|
@@ -97,14 +127,14 @@
|
|
97
127
|
flex-direction: row;
|
98
128
|
|
99
129
|
> .list-group-item {
|
100
|
-
&:first-child {
|
101
|
-
@include border-bottom-
|
102
|
-
@include border-top-
|
130
|
+
&:first-child:not(:last-child) {
|
131
|
+
@include border-bottom-start-radius(var(--#{$prefix}list-group-border-radius));
|
132
|
+
@include border-top-end-radius(0);
|
103
133
|
}
|
104
134
|
|
105
|
-
&:last-child {
|
106
|
-
@include border-top-
|
107
|
-
@include border-bottom-
|
135
|
+
&:last-child:not(:first-child) {
|
136
|
+
@include border-top-end-radius(var(--#{$prefix}list-group-border-radius));
|
137
|
+
@include border-bottom-start-radius(0);
|
108
138
|
}
|
109
139
|
|
110
140
|
&.active {
|
@@ -112,12 +142,12 @@
|
|
112
142
|
}
|
113
143
|
|
114
144
|
+ .list-group-item {
|
115
|
-
border-top-width: $list-group-border-width;
|
145
|
+
border-top-width: var(--#{$prefix}list-group-border-width);
|
116
146
|
border-left-width: 0;
|
117
147
|
|
118
148
|
&.active {
|
119
|
-
margin-left:
|
120
|
-
border-left-width: $list-group-border-width;
|
149
|
+
margin-left: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
|
150
|
+
border-left-width: var(--#{$prefix}list-group-border-width);
|
121
151
|
}
|
122
152
|
}
|
123
153
|
}
|
@@ -135,7 +165,7 @@
|
|
135
165
|
@include border-radius(0);
|
136
166
|
|
137
167
|
> .list-group-item {
|
138
|
-
border-width: 0 0 $list-group-border-width;
|
168
|
+
border-width: 0 0 var(--#{$prefix}list-group-border-width);
|
139
169
|
|
140
170
|
&:last-child {
|
141
171
|
border-bottom-width: 0;
|
@@ -144,11 +174,19 @@
|
|
144
174
|
}
|
145
175
|
|
146
176
|
|
147
|
-
//
|
177
|
+
// scss-docs-start list-group-modifiers
|
178
|
+
// List group contextual variants
|
148
179
|
//
|
149
180
|
// Add modifier classes to change text and background color on individual items.
|
150
181
|
// Organizationally, this must come after the `:hover` states.
|
151
182
|
|
152
|
-
@each $
|
153
|
-
|
183
|
+
@each $state, $value in $theme-colors {
|
184
|
+
$list-group-variant-bg: shift-color($value, $list-group-item-bg-scale);
|
185
|
+
$list-group-variant-color: shift-color($value, $list-group-item-color-scale);
|
186
|
+
@if (contrast-ratio($list-group-variant-bg, $list-group-variant-color) < $min-contrast-ratio) {
|
187
|
+
$list-group-variant-color: mix($value, color-contrast($list-group-variant-bg), abs($list-group-item-color-scale));
|
188
|
+
}
|
189
|
+
|
190
|
+
@include list-group-item-variant($state, $list-group-variant-bg, $list-group-variant-color);
|
154
191
|
}
|
192
|
+
// scss-docs-end list-group-modifiers
|
@@ -0,0 +1,54 @@
|
|
1
|
+
// Re-assigned maps
|
2
|
+
//
|
3
|
+
// Placed here so that others can override the default Sass maps and see automatic updates to utilities and more.
|
4
|
+
|
5
|
+
// scss-docs-start theme-colors-rgb
|
6
|
+
$theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value") !default;
|
7
|
+
// scss-docs-end theme-colors-rgb
|
8
|
+
|
9
|
+
// Utilities maps
|
10
|
+
//
|
11
|
+
// Extends the default `$theme-colors` maps to help create our utilities.
|
12
|
+
|
13
|
+
// Come v6, we'll de-dupe these variables. Until then, for backward compatibility, we keep them to reassign.
|
14
|
+
// scss-docs-start utilities-colors
|
15
|
+
$utilities-colors: $theme-colors-rgb !default;
|
16
|
+
// scss-docs-end utilities-colors
|
17
|
+
|
18
|
+
// scss-docs-start utilities-text-colors
|
19
|
+
$utilities-text: map-merge(
|
20
|
+
$utilities-colors,
|
21
|
+
(
|
22
|
+
"black": to-rgb($black),
|
23
|
+
"white": to-rgb($white),
|
24
|
+
"body": to-rgb($body-color)
|
25
|
+
)
|
26
|
+
) !default;
|
27
|
+
$utilities-text-colors: map-loop($utilities-text, rgba-css-var, "$key", "text") !default;
|
28
|
+
// scss-docs-end utilities-text-colors
|
29
|
+
|
30
|
+
// scss-docs-start utilities-bg-colors
|
31
|
+
$utilities-bg: map-merge(
|
32
|
+
$utilities-colors,
|
33
|
+
(
|
34
|
+
"black": to-rgb($black),
|
35
|
+
"white": to-rgb($white),
|
36
|
+
"body": to-rgb($body-bg)
|
37
|
+
)
|
38
|
+
) !default;
|
39
|
+
$utilities-bg-colors: map-loop($utilities-bg, rgba-css-var, "$key", "bg") !default;
|
40
|
+
// scss-docs-end utilities-bg-colors
|
41
|
+
|
42
|
+
// scss-docs-start utilities-border-colors
|
43
|
+
$utilities-border: map-merge(
|
44
|
+
$utilities-colors,
|
45
|
+
(
|
46
|
+
"white": to-rgb($white)
|
47
|
+
)
|
48
|
+
) !default;
|
49
|
+
$utilities-border-colors: map-loop($utilities-border, rgba-css-var, "$key", "border") !default;
|
50
|
+
// scss-docs-end utilities-border-colors
|
51
|
+
|
52
|
+
$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;
|
53
|
+
|
54
|
+
$gutters: $spacers !default;
|
@@ -8,33 +8,30 @@
|
|
8
8
|
// Deprecate
|
9
9
|
@import "mixins/deprecate";
|
10
10
|
|
11
|
-
//
|
11
|
+
// Helpers
|
12
12
|
@import "mixins/breakpoints";
|
13
|
-
@import "mixins/
|
13
|
+
@import "mixins/color-scheme";
|
14
14
|
@import "mixins/image";
|
15
|
-
@import "mixins/badge";
|
16
15
|
@import "mixins/resize";
|
17
|
-
@import "mixins/
|
18
|
-
@import "mixins/size";
|
16
|
+
@import "mixins/visually-hidden";
|
19
17
|
@import "mixins/reset-text";
|
20
|
-
@import "mixins/text-emphasis";
|
21
|
-
@import "mixins/text-hide";
|
22
18
|
@import "mixins/text-truncate";
|
23
|
-
|
19
|
+
|
20
|
+
// Utilities
|
21
|
+
@import "mixins/utilities";
|
24
22
|
|
25
23
|
// Components
|
26
24
|
@import "mixins/alert";
|
25
|
+
@import "mixins/backdrop";
|
27
26
|
@import "mixins/buttons";
|
28
27
|
@import "mixins/caret";
|
29
28
|
@import "mixins/pagination";
|
30
29
|
@import "mixins/lists";
|
31
30
|
@import "mixins/list-group";
|
32
|
-
@import "mixins/nav-divider";
|
33
31
|
@import "mixins/forms";
|
34
|
-
@import "mixins/table-
|
32
|
+
@import "mixins/table-variants";
|
35
33
|
|
36
34
|
// Skins
|
37
|
-
@import "mixins/background-variant";
|
38
35
|
@import "mixins/border-radius";
|
39
36
|
@import "mixins/box-shadow";
|
40
37
|
@import "mixins/gradients";
|
@@ -42,6 +39,5 @@
|
|
42
39
|
|
43
40
|
// Layout
|
44
41
|
@import "mixins/clearfix";
|
45
|
-
@import "mixins/
|
42
|
+
@import "mixins/container";
|
46
43
|
@import "mixins/grid";
|
47
|
-
@import "mixins/float";
|
@@ -1,29 +1,46 @@
|
|
1
|
+
// stylelint-disable function-disallowed-list
|
2
|
+
|
1
3
|
// .modal-open - body class for killing the scroll
|
2
4
|
// .modal - container to scroll within
|
3
5
|
// .modal-dialog - positioning shell for the actual modal
|
4
6
|
// .modal-content - actual modal w/ bg and corners and stuff
|
5
7
|
|
6
8
|
|
7
|
-
.modal-open {
|
8
|
-
// Kill the scroll on the body
|
9
|
-
overflow: hidden;
|
10
|
-
|
11
|
-
.modal {
|
12
|
-
overflow-x: hidden;
|
13
|
-
overflow-y: auto;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
9
|
// Container that the modal scrolls within
|
18
10
|
.modal {
|
11
|
+
// scss-docs-start modal-css-vars
|
12
|
+
--#{$prefix}modal-zindex: #{$zindex-modal};
|
13
|
+
--#{$prefix}modal-width: #{$modal-md};
|
14
|
+
--#{$prefix}modal-padding: #{$modal-inner-padding};
|
15
|
+
--#{$prefix}modal-margin: #{$modal-dialog-margin};
|
16
|
+
--#{$prefix}modal-color: #{$modal-content-color};
|
17
|
+
--#{$prefix}modal-bg: #{$modal-content-bg};
|
18
|
+
--#{$prefix}modal-border-color: #{$modal-content-border-color};
|
19
|
+
--#{$prefix}modal-border-width: #{$modal-content-border-width};
|
20
|
+
--#{$prefix}modal-border-radius: #{$modal-content-border-radius};
|
21
|
+
--#{$prefix}modal-box-shadow: #{$modal-content-box-shadow-xs};
|
22
|
+
--#{$prefix}modal-inner-border-radius: #{$modal-content-inner-border-radius};
|
23
|
+
--#{$prefix}modal-header-padding-x: #{$modal-header-padding-x};
|
24
|
+
--#{$prefix}modal-header-padding-y: #{$modal-header-padding-y};
|
25
|
+
--#{$prefix}modal-header-padding: #{$modal-header-padding}; // Todo in v6: Split this padding into x and y
|
26
|
+
--#{$prefix}modal-header-border-color: #{$modal-header-border-color};
|
27
|
+
--#{$prefix}modal-header-border-width: #{$modal-header-border-width};
|
28
|
+
--#{$prefix}modal-title-line-height: #{$modal-title-line-height};
|
29
|
+
--#{$prefix}modal-footer-gap: #{$modal-footer-margin-between};
|
30
|
+
--#{$prefix}modal-footer-bg: #{$modal-footer-bg};
|
31
|
+
--#{$prefix}modal-footer-border-color: #{$modal-footer-border-color};
|
32
|
+
--#{$prefix}modal-footer-border-width: #{$modal-footer-border-width};
|
33
|
+
// scss-docs-end modal-css-vars
|
34
|
+
|
19
35
|
position: fixed;
|
20
36
|
top: 0;
|
21
37
|
left: 0;
|
22
|
-
z-index: $zindex
|
38
|
+
z-index: var(--#{$prefix}modal-zindex);
|
23
39
|
display: none;
|
24
40
|
width: 100%;
|
25
41
|
height: 100%;
|
26
|
-
overflow: hidden;
|
42
|
+
overflow-x: hidden;
|
43
|
+
overflow-y: auto;
|
27
44
|
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
28
45
|
// https://github.com/twbs/bootstrap/pull/10951.
|
29
46
|
outline: 0;
|
@@ -36,7 +53,7 @@
|
|
36
53
|
.modal-dialog {
|
37
54
|
position: relative;
|
38
55
|
width: auto;
|
39
|
-
margin: $modal-
|
56
|
+
margin: var(--#{$prefix}modal-margin);
|
40
57
|
// allow clicks to pass through for custom click handling to close modal
|
41
58
|
pointer-events: none;
|
42
59
|
|
@@ -56,19 +73,13 @@
|
|
56
73
|
}
|
57
74
|
|
58
75
|
.modal-dialog-scrollable {
|
59
|
-
|
60
|
-
max-height: subtract(100%, $modal-dialog-margin * 2);
|
76
|
+
height: calc(100% - var(--#{$prefix}modal-margin) * 2);
|
61
77
|
|
62
78
|
.modal-content {
|
63
|
-
max-height:
|
79
|
+
max-height: 100%;
|
64
80
|
overflow: hidden;
|
65
81
|
}
|
66
82
|
|
67
|
-
.modal-header,
|
68
|
-
.modal-footer {
|
69
|
-
flex-shrink: 0;
|
70
|
-
}
|
71
|
-
|
72
83
|
.modal-body {
|
73
84
|
overflow-y: auto;
|
74
85
|
}
|
@@ -77,30 +88,7 @@
|
|
77
88
|
.modal-dialog-centered {
|
78
89
|
display: flex;
|
79
90
|
align-items: center;
|
80
|
-
min-height:
|
81
|
-
|
82
|
-
// Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
|
83
|
-
&::before {
|
84
|
-
display: block; // IE10
|
85
|
-
height: subtract(100vh, $modal-dialog-margin * 2);
|
86
|
-
height: min-content; // Reset height to 0 except on IE
|
87
|
-
content: "";
|
88
|
-
}
|
89
|
-
|
90
|
-
// Ensure `.modal-body` shows scrollbar (IE10/11)
|
91
|
-
&.modal-dialog-scrollable {
|
92
|
-
flex-direction: column;
|
93
|
-
justify-content: center;
|
94
|
-
height: 100%;
|
95
|
-
|
96
|
-
.modal-content {
|
97
|
-
max-height: none;
|
98
|
-
}
|
99
|
-
|
100
|
-
&::before {
|
101
|
-
content: none;
|
102
|
-
}
|
103
|
-
}
|
91
|
+
min-height: calc(100% - var(--#{$prefix}modal-margin) * 2);
|
104
92
|
}
|
105
93
|
|
106
94
|
// Actual modal
|
@@ -110,53 +98,49 @@
|
|
110
98
|
flex-direction: column;
|
111
99
|
width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
|
112
100
|
// counteract the pointer-events: none; in the .modal-dialog
|
113
|
-
color: $modal-
|
101
|
+
color: var(--#{$prefix}modal-color);
|
114
102
|
pointer-events: auto;
|
115
|
-
background-color: $modal-
|
103
|
+
background-color: var(--#{$prefix}modal-bg);
|
116
104
|
background-clip: padding-box;
|
117
|
-
border: $modal-
|
118
|
-
@include border-radius($modal-
|
119
|
-
@include box-shadow($modal-
|
105
|
+
border: var(--#{$prefix}modal-border-width) solid var(--#{$prefix}modal-border-color);
|
106
|
+
@include border-radius(var(--#{$prefix}modal-border-radius));
|
107
|
+
@include box-shadow(var(--#{$prefix}modal-box-shadow));
|
120
108
|
// Remove focus outline from opened modal
|
121
109
|
outline: 0;
|
122
110
|
}
|
123
111
|
|
124
112
|
// Modal background
|
125
113
|
.modal-backdrop {
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
// Fade for backdrop
|
135
|
-
&.fade { opacity: 0; }
|
136
|
-
&.show { opacity: $modal-backdrop-opacity; }
|
114
|
+
// scss-docs-start modal-backdrop-css-vars
|
115
|
+
--#{$prefix}backdrop-zindex: #{$zindex-modal-backdrop};
|
116
|
+
--#{$prefix}backdrop-bg: #{$modal-backdrop-bg};
|
117
|
+
--#{$prefix}backdrop-opacity: #{$modal-backdrop-opacity};
|
118
|
+
// scss-docs-end modal-backdrop-css-vars
|
119
|
+
|
120
|
+
@include overlay-backdrop(var(--#{$prefix}backdrop-zindex), var(--#{$prefix}backdrop-bg), var(--#{$prefix}backdrop-opacity));
|
137
121
|
}
|
138
122
|
|
139
123
|
// Modal header
|
140
124
|
// Top section of the modal w/ title and dismiss
|
141
125
|
.modal-header {
|
142
126
|
display: flex;
|
143
|
-
|
127
|
+
flex-shrink: 0;
|
128
|
+
align-items: center;
|
144
129
|
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
|
145
|
-
padding: $modal-header-padding;
|
146
|
-
border-bottom: $modal-header-border-width solid $modal-header-border-color;
|
147
|
-
@include border-top-radius($modal-
|
148
|
-
|
149
|
-
.close {
|
150
|
-
padding: $modal-header-padding;
|
151
|
-
|
152
|
-
margin: (-$modal-header-padding-y) (-$modal-header-padding-x) (-$modal-header-padding-y) auto;
|
130
|
+
padding: var(--#{$prefix}modal-header-padding);
|
131
|
+
border-bottom: var(--#{$prefix}modal-header-border-width) solid var(--#{$prefix}modal-header-border-color);
|
132
|
+
@include border-top-radius(var(--#{$prefix}modal-inner-border-radius));
|
133
|
+
|
134
|
+
.btn-close {
|
135
|
+
padding: calc(var(--#{$prefix}modal-header-padding-y) * .5) calc(var(--#{$prefix}modal-header-padding-x) * .5);
|
136
|
+
margin: calc(-.5 * var(--#{$prefix}modal-header-padding-y)) calc(-.5 * var(--#{$prefix}modal-header-padding-x)) calc(-.5 * var(--#{$prefix}modal-header-padding-y)) auto;
|
153
137
|
}
|
154
138
|
}
|
155
139
|
|
156
140
|
// Title text within header
|
157
141
|
.modal-title {
|
158
142
|
margin-bottom: 0;
|
159
|
-
line-height: $modal-title-line-height;
|
143
|
+
line-height: var(--#{$prefix}modal-title-line-height);
|
160
144
|
}
|
161
145
|
|
162
146
|
// Modal body
|
@@ -166,75 +150,88 @@
|
|
166
150
|
// Enable `flex-grow: 1` so that the body take up as much space as possible
|
167
151
|
// when there should be a fixed height on `.modal-dialog`.
|
168
152
|
flex: 1 1 auto;
|
169
|
-
padding: $modal-
|
153
|
+
padding: var(--#{$prefix}modal-padding);
|
170
154
|
}
|
171
155
|
|
172
156
|
// Footer (for actions)
|
173
157
|
.modal-footer {
|
174
158
|
display: flex;
|
159
|
+
flex-shrink: 0;
|
175
160
|
flex-wrap: wrap;
|
176
161
|
align-items: center; // vertically center
|
177
162
|
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
|
178
|
-
padding: $modal-
|
179
|
-
|
180
|
-
|
163
|
+
padding: calc(var(--#{$prefix}modal-padding) - var(--#{$prefix}modal-footer-gap) * .5);
|
164
|
+
background-color: var(--#{$prefix}modal-footer-bg);
|
165
|
+
border-top: var(--#{$prefix}modal-footer-border-width) solid var(--#{$prefix}modal-footer-border-color);
|
166
|
+
@include border-bottom-radius(var(--#{$prefix}modal-inner-border-radius));
|
181
167
|
|
182
168
|
// Place margin between footer elements
|
183
169
|
// This solution is far from ideal because of the universal selector usage,
|
184
170
|
// but is needed to fix https://github.com/twbs/bootstrap/issues/24800
|
185
171
|
> * {
|
186
|
-
margin: $modal-footer-
|
172
|
+
margin: calc(var(--#{$prefix}modal-footer-gap) * .5); // Todo in v6: replace with gap on parent class
|
187
173
|
}
|
188
174
|
}
|
189
175
|
|
190
|
-
// Measure scrollbar width for padding body during modal show/hide
|
191
|
-
.modal-scrollbar-measure {
|
192
|
-
position: absolute;
|
193
|
-
top: -9999px;
|
194
|
-
width: 50px;
|
195
|
-
height: 50px;
|
196
|
-
overflow: scroll;
|
197
|
-
}
|
198
|
-
|
199
176
|
// Scale up the modal
|
200
177
|
@include media-breakpoint-up(sm) {
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
margin: $modal-dialog-margin-y-sm-up auto;
|
205
|
-
}
|
206
|
-
|
207
|
-
.modal-dialog-scrollable {
|
208
|
-
max-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
|
209
|
-
|
210
|
-
.modal-content {
|
211
|
-
max-height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
|
212
|
-
}
|
178
|
+
.modal {
|
179
|
+
--#{$prefix}modal-margin: #{$modal-dialog-margin-y-sm-up};
|
180
|
+
--#{$prefix}modal-box-shadow: #{$modal-content-box-shadow-sm-up};
|
213
181
|
}
|
214
182
|
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
height: min-content;
|
221
|
-
}
|
183
|
+
// Automatically set modal's width for larger viewports
|
184
|
+
.modal-dialog {
|
185
|
+
max-width: var(--#{$prefix}modal-width);
|
186
|
+
margin-right: auto;
|
187
|
+
margin-left: auto;
|
222
188
|
}
|
223
189
|
|
224
|
-
.modal-
|
225
|
-
|
190
|
+
.modal-sm {
|
191
|
+
--#{$prefix}modal-width: #{$modal-sm};
|
226
192
|
}
|
227
|
-
|
228
|
-
.modal-sm { max-width: $modal-sm; }
|
229
193
|
}
|
230
194
|
|
231
195
|
@include media-breakpoint-up(lg) {
|
232
196
|
.modal-lg,
|
233
197
|
.modal-xl {
|
234
|
-
|
198
|
+
--#{$prefix}modal-width: #{$modal-lg};
|
235
199
|
}
|
236
200
|
}
|
237
201
|
|
238
202
|
@include media-breakpoint-up(xl) {
|
239
|
-
.modal-xl {
|
203
|
+
.modal-xl {
|
204
|
+
--#{$prefix}modal-width: #{$modal-xl};
|
205
|
+
}
|
206
|
+
}
|
207
|
+
|
208
|
+
// scss-docs-start modal-fullscreen-loop
|
209
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
210
|
+
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
211
|
+
$postfix: if($infix != "", $infix + "-down", "");
|
212
|
+
|
213
|
+
@include media-breakpoint-down($breakpoint) {
|
214
|
+
.modal-fullscreen#{$postfix} {
|
215
|
+
width: 100vw;
|
216
|
+
max-width: none;
|
217
|
+
height: 100%;
|
218
|
+
margin: 0;
|
219
|
+
|
220
|
+
.modal-content {
|
221
|
+
height: 100%;
|
222
|
+
border: 0;
|
223
|
+
@include border-radius(0);
|
224
|
+
}
|
225
|
+
|
226
|
+
.modal-header,
|
227
|
+
.modal-footer {
|
228
|
+
@include border-radius(0);
|
229
|
+
}
|
230
|
+
|
231
|
+
.modal-body {
|
232
|
+
overflow-y: auto;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
}
|
240
236
|
}
|
237
|
+
// scss-docs-end modal-fullscreen-loop
|