bootstrap 4.3.0 → 5.1.0
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 +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,48 +1,29 @@
|
|
|
1
|
-
// Container widths
|
|
2
|
-
//
|
|
3
|
-
// Set the container width, and override it for fixed navbars in media queries.
|
|
4
|
-
|
|
5
|
-
@if $enable-grid-classes {
|
|
6
|
-
.container {
|
|
7
|
-
@include make-container();
|
|
8
|
-
@include make-container-max-widths();
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// Fluid container
|
|
13
|
-
//
|
|
14
|
-
// Utilizes the mixin meant for fixed width containers, but with 100% width for
|
|
15
|
-
// fluid, full width layouts.
|
|
16
|
-
|
|
17
|
-
@if $enable-grid-classes {
|
|
18
|
-
.container-fluid {
|
|
19
|
-
@include make-container();
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
1
|
// Row
|
|
24
2
|
//
|
|
25
|
-
// Rows contain
|
|
3
|
+
// Rows contain your columns.
|
|
26
4
|
|
|
27
5
|
@if $enable-grid-classes {
|
|
28
6
|
.row {
|
|
29
7
|
@include make-row();
|
|
8
|
+
|
|
9
|
+
> * {
|
|
10
|
+
@include make-col-ready();
|
|
11
|
+
}
|
|
30
12
|
}
|
|
13
|
+
}
|
|
31
14
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
15
|
+
@if $enable-cssgrid {
|
|
16
|
+
.grid {
|
|
17
|
+
display: grid;
|
|
18
|
+
grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);
|
|
19
|
+
grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);
|
|
20
|
+
gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});
|
|
37
21
|
|
|
38
|
-
|
|
39
|
-
> [class*="col-"] {
|
|
40
|
-
padding-right: 0;
|
|
41
|
-
padding-left: 0;
|
|
42
|
-
}
|
|
22
|
+
@include make-cssgrid();
|
|
43
23
|
}
|
|
44
24
|
}
|
|
45
25
|
|
|
26
|
+
|
|
46
27
|
// Columns
|
|
47
28
|
//
|
|
48
29
|
// Common styles for small and large grid columns
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@import "helpers/clearfix";
|
|
2
|
+
@import "helpers/colored-links";
|
|
3
|
+
@import "helpers/ratio";
|
|
4
|
+
@import "helpers/position";
|
|
5
|
+
@import "helpers/stacks";
|
|
6
|
+
@import "helpers/visually-hidden";
|
|
7
|
+
@import "helpers/stretched-link";
|
|
8
|
+
@import "helpers/text-truncation";
|
|
9
|
+
@import "helpers/vr";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// which weren't expecting the images within themselves to be involuntarily resized.
|
|
7
7
|
// See also https://github.com/twbs/bootstrap/issues/18178
|
|
8
8
|
.img-fluid {
|
|
9
|
-
@include img-fluid;
|
|
9
|
+
@include img-fluid();
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
@include box-shadow($thumbnail-box-shadow);
|
|
20
20
|
|
|
21
21
|
// Keep them at most 100% wide
|
|
22
|
-
@include img-fluid;
|
|
22
|
+
@include img-fluid();
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
//
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.figure-img {
|
|
35
|
-
margin-bottom: $spacer
|
|
35
|
+
margin-bottom: $spacer * .5;
|
|
36
36
|
line-height: 1;
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -9,6 +9,18 @@
|
|
|
9
9
|
// No need to set list-style: none; since .list-group-item is block level
|
|
10
10
|
padding-left: 0; // reset padding because ul and ol
|
|
11
11
|
margin-bottom: 0;
|
|
12
|
+
@include border-radius($list-group-border-radius);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.list-group-numbered {
|
|
16
|
+
list-style-type: none;
|
|
17
|
+
counter-reset: section;
|
|
18
|
+
|
|
19
|
+
> li::before {
|
|
20
|
+
// Increments only this instance of the section counter
|
|
21
|
+
content: counters(section, ".") ". ";
|
|
22
|
+
counter-increment: section;
|
|
23
|
+
}
|
|
12
24
|
}
|
|
13
25
|
|
|
14
26
|
|
|
@@ -23,7 +35,8 @@
|
|
|
23
35
|
text-align: inherit; // For `<button>`s (anchors inherit)
|
|
24
36
|
|
|
25
37
|
// Hover state
|
|
26
|
-
|
|
38
|
+
&:hover,
|
|
39
|
+
&:focus {
|
|
27
40
|
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
|
28
41
|
color: $list-group-action-hover-color;
|
|
29
42
|
text-decoration: none;
|
|
@@ -45,19 +58,17 @@
|
|
|
45
58
|
position: relative;
|
|
46
59
|
display: block;
|
|
47
60
|
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
|
48
|
-
// Place the border on the list items and negative margin up for better styling
|
|
49
|
-
margin-bottom: -$list-group-border-width;
|
|
50
61
|
color: $list-group-color;
|
|
62
|
+
text-decoration: if($link-decoration == none, null, none);
|
|
51
63
|
background-color: $list-group-bg;
|
|
52
64
|
border: $list-group-border-width solid $list-group-border-color;
|
|
53
65
|
|
|
54
66
|
&:first-child {
|
|
55
|
-
@include border-top-radius(
|
|
67
|
+
@include border-top-radius(inherit);
|
|
56
68
|
}
|
|
57
69
|
|
|
58
70
|
&:last-child {
|
|
59
|
-
|
|
60
|
-
@include border-bottom-radius($list-group-border-radius);
|
|
71
|
+
@include border-bottom-radius(inherit);
|
|
61
72
|
}
|
|
62
73
|
|
|
63
74
|
&.disabled,
|
|
@@ -74,6 +85,15 @@
|
|
|
74
85
|
background-color: $list-group-active-bg;
|
|
75
86
|
border-color: $list-group-active-border-color;
|
|
76
87
|
}
|
|
88
|
+
|
|
89
|
+
& + & {
|
|
90
|
+
border-top-width: 0;
|
|
91
|
+
|
|
92
|
+
&.active {
|
|
93
|
+
margin-top: -$list-group-border-width;
|
|
94
|
+
border-top-width: $list-group-border-width;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
77
97
|
}
|
|
78
98
|
|
|
79
99
|
|
|
@@ -88,19 +108,29 @@
|
|
|
88
108
|
.list-group-horizontal#{$infix} {
|
|
89
109
|
flex-direction: row;
|
|
90
110
|
|
|
91
|
-
.list-group-item {
|
|
92
|
-
margin-right: -$list-group-border-width;
|
|
93
|
-
margin-bottom: 0;
|
|
94
|
-
|
|
111
|
+
> .list-group-item {
|
|
95
112
|
&:first-child {
|
|
96
|
-
@include border-
|
|
97
|
-
@include border-top-
|
|
113
|
+
@include border-bottom-start-radius($list-group-border-radius);
|
|
114
|
+
@include border-top-end-radius(0);
|
|
98
115
|
}
|
|
99
116
|
|
|
100
117
|
&:last-child {
|
|
101
|
-
|
|
102
|
-
@include border-
|
|
103
|
-
|
|
118
|
+
@include border-top-end-radius($list-group-border-radius);
|
|
119
|
+
@include border-bottom-start-radius(0);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&.active {
|
|
123
|
+
margin-top: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
+ .list-group-item {
|
|
127
|
+
border-top-width: $list-group-border-width;
|
|
128
|
+
border-left-width: 0;
|
|
129
|
+
|
|
130
|
+
&.active {
|
|
131
|
+
margin-left: -$list-group-border-width;
|
|
132
|
+
border-left-width: $list-group-border-width;
|
|
133
|
+
}
|
|
104
134
|
}
|
|
105
135
|
}
|
|
106
136
|
}
|
|
@@ -114,36 +144,31 @@
|
|
|
114
144
|
// useful within other components (e.g., cards).
|
|
115
145
|
|
|
116
146
|
.list-group-flush {
|
|
117
|
-
|
|
118
|
-
border-right: 0;
|
|
119
|
-
border-left: 0;
|
|
120
|
-
@include border-radius(0);
|
|
121
|
-
|
|
122
|
-
&:last-child {
|
|
123
|
-
margin-bottom: -$list-group-border-width;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
147
|
+
@include border-radius(0);
|
|
126
148
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
border-top: 0;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
149
|
+
> .list-group-item {
|
|
150
|
+
border-width: 0 0 $list-group-border-width;
|
|
132
151
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
margin-bottom: 0;
|
|
136
|
-
border-bottom: 0;
|
|
152
|
+
&:last-child {
|
|
153
|
+
border-bottom-width: 0;
|
|
137
154
|
}
|
|
138
155
|
}
|
|
139
156
|
}
|
|
140
157
|
|
|
141
158
|
|
|
142
|
-
//
|
|
159
|
+
// scss-docs-start list-group-modifiers
|
|
160
|
+
// List group contextual variants
|
|
143
161
|
//
|
|
144
162
|
// Add modifier classes to change text and background color on individual items.
|
|
145
163
|
// Organizationally, this must come after the `:hover` states.
|
|
146
164
|
|
|
147
|
-
@each $
|
|
148
|
-
|
|
165
|
+
@each $state, $value in $theme-colors {
|
|
166
|
+
$list-group-variant-bg: shift-color($value, $list-group-item-bg-scale);
|
|
167
|
+
$list-group-variant-color: shift-color($value, $list-group-item-color-scale);
|
|
168
|
+
@if (contrast-ratio($list-group-variant-bg, $list-group-variant-color) < $min-contrast-ratio) {
|
|
169
|
+
$list-group-variant-color: mix($value, color-contrast($list-group-variant-bg), abs($list-group-item-color-scale));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@include list-group-item-variant($state, $list-group-variant-bg, $list-group-variant-color);
|
|
149
173
|
}
|
|
174
|
+
// scss-docs-end list-group-modifiers
|
|
@@ -8,40 +8,36 @@
|
|
|
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
|
-
@import "mixins/visibility";
|
|
24
19
|
|
|
25
|
-
//
|
|
20
|
+
// Utilities
|
|
21
|
+
@import "mixins/utilities";
|
|
22
|
+
|
|
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
|
-
//
|
|
37
|
-
@import "mixins/background-variant";
|
|
34
|
+
// Skins
|
|
38
35
|
@import "mixins/border-radius";
|
|
39
36
|
@import "mixins/box-shadow";
|
|
40
37
|
@import "mixins/gradients";
|
|
41
38
|
@import "mixins/transition";
|
|
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";
|
|
@@ -4,16 +4,6 @@
|
|
|
4
4
|
// .modal-content - actual modal w/ bg and corners and stuff
|
|
5
5
|
|
|
6
6
|
|
|
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
7
|
// Container that the modal scrolls within
|
|
18
8
|
.modal {
|
|
19
9
|
position: fixed;
|
|
@@ -23,7 +13,8 @@
|
|
|
23
13
|
display: none;
|
|
24
14
|
width: 100%;
|
|
25
15
|
height: 100%;
|
|
26
|
-
overflow: hidden;
|
|
16
|
+
overflow-x: hidden;
|
|
17
|
+
overflow-y: auto;
|
|
27
18
|
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
|
28
19
|
// https://github.com/twbs/bootstrap/pull/10951.
|
|
29
20
|
outline: 0;
|
|
@@ -48,22 +39,21 @@
|
|
|
48
39
|
.modal.show & {
|
|
49
40
|
transform: $modal-show-transform;
|
|
50
41
|
}
|
|
42
|
+
|
|
43
|
+
// When trying to close, animate focus to scale
|
|
44
|
+
.modal.modal-static & {
|
|
45
|
+
transform: $modal-scale-transform;
|
|
46
|
+
}
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
.modal-dialog-scrollable {
|
|
54
|
-
|
|
55
|
-
max-height: calc(100% - #{$modal-dialog-margin * 2});
|
|
50
|
+
height: subtract(100%, $modal-dialog-margin * 2);
|
|
56
51
|
|
|
57
52
|
.modal-content {
|
|
58
|
-
max-height:
|
|
53
|
+
max-height: 100%;
|
|
59
54
|
overflow: hidden;
|
|
60
55
|
}
|
|
61
56
|
|
|
62
|
-
.modal-header,
|
|
63
|
-
.modal-footer {
|
|
64
|
-
flex-shrink: 0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
57
|
.modal-body {
|
|
68
58
|
overflow-y: auto;
|
|
69
59
|
}
|
|
@@ -72,29 +62,7 @@
|
|
|
72
62
|
.modal-dialog-centered {
|
|
73
63
|
display: flex;
|
|
74
64
|
align-items: center;
|
|
75
|
-
min-height:
|
|
76
|
-
|
|
77
|
-
// Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
|
|
78
|
-
&::before {
|
|
79
|
-
display: block; // IE10
|
|
80
|
-
height: calc(100vh - #{$modal-dialog-margin * 2});
|
|
81
|
-
content: "";
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// Ensure `.modal-body` shows scrollbar (IE10/11)
|
|
85
|
-
&.modal-dialog-scrollable {
|
|
86
|
-
flex-direction: column;
|
|
87
|
-
justify-content: center;
|
|
88
|
-
height: 100%;
|
|
89
|
-
|
|
90
|
-
.modal-content {
|
|
91
|
-
max-height: none;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&::before {
|
|
95
|
-
content: none;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
65
|
+
min-height: subtract(100%, $modal-dialog-margin * 2);
|
|
98
66
|
}
|
|
99
67
|
|
|
100
68
|
// Actual modal
|
|
@@ -117,33 +85,23 @@
|
|
|
117
85
|
|
|
118
86
|
// Modal background
|
|
119
87
|
.modal-backdrop {
|
|
120
|
-
|
|
121
|
-
top: 0;
|
|
122
|
-
left: 0;
|
|
123
|
-
z-index: $zindex-modal-backdrop;
|
|
124
|
-
width: 100vw;
|
|
125
|
-
height: 100vh;
|
|
126
|
-
background-color: $modal-backdrop-bg;
|
|
127
|
-
|
|
128
|
-
// Fade for backdrop
|
|
129
|
-
&.fade { opacity: 0; }
|
|
130
|
-
&.show { opacity: $modal-backdrop-opacity; }
|
|
88
|
+
@include overlay-backdrop($zindex-modal-backdrop, $modal-backdrop-bg, $modal-backdrop-opacity);
|
|
131
89
|
}
|
|
132
90
|
|
|
133
91
|
// Modal header
|
|
134
92
|
// Top section of the modal w/ title and dismiss
|
|
135
93
|
.modal-header {
|
|
136
94
|
display: flex;
|
|
137
|
-
|
|
95
|
+
flex-shrink: 0;
|
|
96
|
+
align-items: center;
|
|
138
97
|
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
|
|
139
98
|
padding: $modal-header-padding;
|
|
140
99
|
border-bottom: $modal-header-border-width solid $modal-header-border-color;
|
|
141
|
-
@include border-top-radius($modal-content-border-radius);
|
|
100
|
+
@include border-top-radius($modal-content-inner-border-radius);
|
|
142
101
|
|
|
143
|
-
.close {
|
|
144
|
-
padding: $modal-header-padding;
|
|
145
|
-
|
|
146
|
-
margin: (-$modal-header-padding-y) (-$modal-header-padding-x) (-$modal-header-padding-y) auto;
|
|
102
|
+
.btn-close {
|
|
103
|
+
padding: ($modal-header-padding-y * .5) ($modal-header-padding-x * .5);
|
|
104
|
+
margin: ($modal-header-padding-y * -.5) ($modal-header-padding-x * -.5) ($modal-header-padding-y * -.5) auto;
|
|
147
105
|
}
|
|
148
106
|
}
|
|
149
107
|
|
|
@@ -158,7 +116,7 @@
|
|
|
158
116
|
.modal-body {
|
|
159
117
|
position: relative;
|
|
160
118
|
// Enable `flex-grow: 1` so that the body take up as much space as possible
|
|
161
|
-
// when should
|
|
119
|
+
// when there should be a fixed height on `.modal-dialog`.
|
|
162
120
|
flex: 1 1 auto;
|
|
163
121
|
padding: $modal-inner-padding;
|
|
164
122
|
}
|
|
@@ -166,24 +124,20 @@
|
|
|
166
124
|
// Footer (for actions)
|
|
167
125
|
.modal-footer {
|
|
168
126
|
display: flex;
|
|
127
|
+
flex-wrap: wrap;
|
|
128
|
+
flex-shrink: 0;
|
|
169
129
|
align-items: center; // vertically center
|
|
170
130
|
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
|
|
171
|
-
padding: $modal-inner-padding;
|
|
131
|
+
padding: $modal-inner-padding - $modal-footer-margin-between * .5;
|
|
172
132
|
border-top: $modal-footer-border-width solid $modal-footer-border-color;
|
|
173
|
-
@include border-bottom-radius($modal-content-border-radius);
|
|
174
|
-
|
|
175
|
-
// Easily place margin between footer elements
|
|
176
|
-
> :not(:first-child) { margin-left: .25rem; }
|
|
177
|
-
> :not(:last-child) { margin-right: .25rem; }
|
|
178
|
-
}
|
|
133
|
+
@include border-bottom-radius($modal-content-inner-border-radius);
|
|
179
134
|
|
|
180
|
-
//
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
overflow: scroll;
|
|
135
|
+
// Place margin between footer elements
|
|
136
|
+
// This solution is far from ideal because of the universal selector usage,
|
|
137
|
+
// but is needed to fix https://github.com/twbs/bootstrap/issues/24800
|
|
138
|
+
> * {
|
|
139
|
+
margin: $modal-footer-margin-between * .5;
|
|
140
|
+
}
|
|
187
141
|
}
|
|
188
142
|
|
|
189
143
|
// Scale up the modal
|
|
@@ -195,19 +149,11 @@
|
|
|
195
149
|
}
|
|
196
150
|
|
|
197
151
|
.modal-dialog-scrollable {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
.modal-content {
|
|
201
|
-
max-height: calc(100vh - #{$modal-dialog-margin-y-sm-up * 2});
|
|
202
|
-
}
|
|
152
|
+
height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
|
|
203
153
|
}
|
|
204
154
|
|
|
205
155
|
.modal-dialog-centered {
|
|
206
|
-
min-height:
|
|
207
|
-
|
|
208
|
-
&::before {
|
|
209
|
-
height: calc(100vh - #{$modal-dialog-margin-y-sm-up * 2});
|
|
210
|
-
}
|
|
156
|
+
min-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
|
|
211
157
|
}
|
|
212
158
|
|
|
213
159
|
.modal-content {
|
|
@@ -227,3 +173,37 @@
|
|
|
227
173
|
@include media-breakpoint-up(xl) {
|
|
228
174
|
.modal-xl { max-width: $modal-xl; }
|
|
229
175
|
}
|
|
176
|
+
|
|
177
|
+
// scss-docs-start modal-fullscreen-loop
|
|
178
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
179
|
+
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
|
180
|
+
$postfix: if($infix != "", $infix + "-down", "");
|
|
181
|
+
|
|
182
|
+
@include media-breakpoint-down($breakpoint) {
|
|
183
|
+
.modal-fullscreen#{$postfix} {
|
|
184
|
+
width: 100vw;
|
|
185
|
+
max-width: none;
|
|
186
|
+
height: 100%;
|
|
187
|
+
margin: 0;
|
|
188
|
+
|
|
189
|
+
.modal-content {
|
|
190
|
+
height: 100%;
|
|
191
|
+
border: 0;
|
|
192
|
+
@include border-radius(0);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.modal-header {
|
|
196
|
+
@include border-radius(0);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.modal-body {
|
|
200
|
+
overflow-y: auto;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.modal-footer {
|
|
204
|
+
@include border-radius(0);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// scss-docs-end modal-fullscreen-loop
|