bootstrap 4.6.0 → 5.3.2
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 +61 -0
- data/Gemfile +1 -0
- data/README.md +33 -6
- data/Rakefile +10 -1
- data/assets/javascripts/bootstrap/alert.js +53 -155
- data/assets/javascripts/bootstrap/base-component.js +83 -0
- data/assets/javascripts/bootstrap/button.js +43 -198
- data/assets/javascripts/bootstrap/carousel.js +285 -550
- data/assets/javascripts/bootstrap/collapse.js +169 -323
- data/assets/javascripts/bootstrap/dom/data.js +62 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +236 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +71 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +103 -0
- data/assets/javascripts/bootstrap/dropdown.js +300 -467
- data/assets/javascripts/bootstrap/modal.js +226 -575
- data/assets/javascripts/bootstrap/offcanvas.js +245 -0
- data/assets/javascripts/bootstrap/popover.js +61 -205
- data/assets/javascripts/bootstrap/scrollspy.js +216 -287
- data/assets/javascripts/bootstrap/tab.js +226 -203
- data/assets/javascripts/bootstrap/toast.js +136 -209
- data/assets/javascripts/bootstrap/tooltip.js +411 -757
- data/assets/javascripts/bootstrap/util/backdrop.js +139 -0
- data/assets/javascripts/bootstrap/util/component-functions.js +41 -0
- data/assets/javascripts/bootstrap/util/config.js +67 -0
- data/assets/javascripts/bootstrap/util/focustrap.js +113 -0
- data/assets/javascripts/bootstrap/util/index.js +281 -0
- data/assets/javascripts/bootstrap/util/sanitizer.js +110 -0
- data/assets/javascripts/bootstrap/util/scrollbar.js +112 -0
- data/assets/javascripts/bootstrap/util/swipe.js +134 -0
- data/assets/javascripts/bootstrap/util/template-factory.js +150 -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 +23 -7
- data/assets/javascripts/bootstrap.js +3649 -3587
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +53 -21
- data/assets/stylesheets/_bootstrap-reboot.scss +5 -7
- data/assets/stylesheets/_bootstrap-utilities.scss +19 -0
- data/assets/stylesheets/_bootstrap.scss +21 -13
- data/assets/stylesheets/bootstrap/_accordion.scss +158 -0
- data/assets/stylesheets/bootstrap/_alert.scss +32 -16
- data/assets/stylesheets/bootstrap/_badge.scss +15 -31
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +22 -24
- data/assets/stylesheets/bootstrap/_button-group.scss +27 -48
- data/assets/stylesheets/bootstrap/_buttons.scss +136 -71
- data/assets/stylesheets/bootstrap/_card.scss +66 -113
- data/assets/stylesheets/bootstrap/_carousel.scss +83 -36
- data/assets/stylesheets/bootstrap/_close.scss +51 -28
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +129 -71
- data/assets/stylesheets/bootstrap/_forms.scss +9 -347
- data/assets/stylesheets/bootstrap/_functions.scss +181 -23
- data/assets/stylesheets/bootstrap/_grid.scss +18 -52
- data/assets/stylesheets/bootstrap/_helpers.scss +12 -0
- data/assets/stylesheets/bootstrap/_images.scss +1 -1
- data/assets/stylesheets/bootstrap/_list-group.scss +77 -34
- data/assets/stylesheets/bootstrap/_maps.scss +174 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +10 -15
- data/assets/stylesheets/bootstrap/_modal.scss +107 -110
- data/assets/stylesheets/bootstrap/_nav.scss +102 -25
- data/assets/stylesheets/bootstrap/_navbar.scss +129 -172
- data/assets/stylesheets/bootstrap/_offcanvas.scss +146 -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 +35 -14
- data/assets/stylesheets/bootstrap/_reboot.scss +319 -192
- data/assets/stylesheets/bootstrap/_root.scss +177 -9
- data/assets/stylesheets/bootstrap/_spinners.scss +44 -24
- data/assets/stylesheets/bootstrap/_tables.scss +101 -115
- data/assets/stylesheets/bootstrap/_toasts.scss +54 -27
- data/assets/stylesheets/bootstrap/_tooltip.scss +67 -63
- data/assets/stylesheets/bootstrap/_transitions.scss +8 -1
- data/assets/stylesheets/bootstrap/_type.scss +40 -59
- data/assets/stylesheets/bootstrap/_utilities.scss +806 -18
- data/assets/stylesheets/bootstrap/_variables-dark.scss +87 -0
- data/assets/stylesheets/bootstrap/_variables.scss +1216 -615
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +95 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +189 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +214 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +80 -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 +7 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +30 -0
- data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
- data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -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 +11 -6
- data/assets/stylesheets/bootstrap/mixins/_backdrop.scss +14 -0
- data/assets/stylesheets/bootstrap/mixins/_banner.scss +7 -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 +34 -27
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
- data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -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 +53 -85
- 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 +7 -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 +33 -0
- data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +276 -132
- data/bootstrap.gemspec +6 -7
- data/lib/bootstrap/engine.rb +7 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +31 -7
- data/tasks/updater/network.rb +9 -3
- data/tasks/updater/scss.rb +2 -2
- 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_4_2.gemfile +1 -1
- data/test/gemfiles/rails_5_0.gemfile +1 -1
- data/test/gemfiles/rails_5_1.gemfile +1 -1
- data/test/gemfiles/rails_5_2.gemfile +8 -0
- data/test/gemfiles/rails_6_0.gemfile +1 -0
- data/test/gemfiles/rails_6_1.gemfile +8 -0
- data/test/gemfiles/rails_7_0_dartsass.gemfile +8 -0
- data/test/gemfiles/rails_7_0_sassc.gemfile +8 -0
- data/test/test_helper.rb +3 -2
- metadata +97 -85
- 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 -526
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -208
- 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
@@ -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
|
@@ -4,6 +4,16 @@
|
|
4
4
|
// `<nav>`s, `<ul>`s or `<ol>`s.
|
5
5
|
|
6
6
|
.nav {
|
7
|
+
// scss-docs-start nav-css-vars
|
8
|
+
--#{$prefix}nav-link-padding-x: #{$nav-link-padding-x};
|
9
|
+
--#{$prefix}nav-link-padding-y: #{$nav-link-padding-y};
|
10
|
+
@include rfs($nav-link-font-size, --#{$prefix}nav-link-font-size);
|
11
|
+
--#{$prefix}nav-link-font-weight: #{$nav-link-font-weight};
|
12
|
+
--#{$prefix}nav-link-color: #{$nav-link-color};
|
13
|
+
--#{$prefix}nav-link-hover-color: #{$nav-link-hover-color};
|
14
|
+
--#{$prefix}nav-link-disabled-color: #{$nav-link-disabled-color};
|
15
|
+
// scss-docs-end nav-css-vars
|
16
|
+
|
7
17
|
display: flex;
|
8
18
|
flex-wrap: wrap;
|
9
19
|
padding-left: 0;
|
@@ -13,16 +23,30 @@
|
|
13
23
|
|
14
24
|
.nav-link {
|
15
25
|
display: block;
|
16
|
-
padding: $nav-link-padding-y $nav-link-padding-x;
|
26
|
+
padding: var(--#{$prefix}nav-link-padding-y) var(--#{$prefix}nav-link-padding-x);
|
27
|
+
@include font-size(var(--#{$prefix}nav-link-font-size));
|
28
|
+
font-weight: var(--#{$prefix}nav-link-font-weight);
|
29
|
+
color: var(--#{$prefix}nav-link-color);
|
17
30
|
text-decoration: if($link-decoration == none, null, none);
|
31
|
+
background: none;
|
32
|
+
border: 0;
|
33
|
+
@include transition($nav-link-transition);
|
34
|
+
|
35
|
+
&:hover,
|
36
|
+
&:focus {
|
37
|
+
color: var(--#{$prefix}nav-link-hover-color);
|
38
|
+
text-decoration: if($link-hover-decoration == underline, none, null);
|
39
|
+
}
|
18
40
|
|
19
|
-
|
20
|
-
|
41
|
+
&:focus-visible {
|
42
|
+
outline: 0;
|
43
|
+
box-shadow: $nav-link-focus-box-shadow;
|
21
44
|
}
|
22
45
|
|
23
46
|
// Disabled state lightens text
|
24
|
-
&.disabled
|
25
|
-
|
47
|
+
&.disabled,
|
48
|
+
&:disabled {
|
49
|
+
color: var(--#{$prefix}nav-link-disabled-color);
|
26
50
|
pointer-events: none;
|
27
51
|
cursor: default;
|
28
52
|
}
|
@@ -33,34 +57,41 @@
|
|
33
57
|
//
|
34
58
|
|
35
59
|
.nav-tabs {
|
36
|
-
|
60
|
+
// scss-docs-start nav-tabs-css-vars
|
61
|
+
--#{$prefix}nav-tabs-border-width: #{$nav-tabs-border-width};
|
62
|
+
--#{$prefix}nav-tabs-border-color: #{$nav-tabs-border-color};
|
63
|
+
--#{$prefix}nav-tabs-border-radius: #{$nav-tabs-border-radius};
|
64
|
+
--#{$prefix}nav-tabs-link-hover-border-color: #{$nav-tabs-link-hover-border-color};
|
65
|
+
--#{$prefix}nav-tabs-link-active-color: #{$nav-tabs-link-active-color};
|
66
|
+
--#{$prefix}nav-tabs-link-active-bg: #{$nav-tabs-link-active-bg};
|
67
|
+
--#{$prefix}nav-tabs-link-active-border-color: #{$nav-tabs-link-active-border-color};
|
68
|
+
// scss-docs-end nav-tabs-css-vars
|
69
|
+
|
70
|
+
border-bottom: var(--#{$prefix}nav-tabs-border-width) solid var(--#{$prefix}nav-tabs-border-color);
|
37
71
|
|
38
72
|
.nav-link {
|
39
|
-
margin-bottom:
|
40
|
-
border: $nav-tabs-border-width solid transparent;
|
41
|
-
@include border-top-radius($nav-tabs-border-radius);
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
color: $nav-link-disabled-color;
|
49
|
-
background-color: transparent;
|
50
|
-
border-color: transparent;
|
73
|
+
margin-bottom: calc(-1 * var(--#{$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
|
74
|
+
border: var(--#{$prefix}nav-tabs-border-width) solid transparent;
|
75
|
+
@include border-top-radius(var(--#{$prefix}nav-tabs-border-radius));
|
76
|
+
|
77
|
+
&:hover,
|
78
|
+
&:focus {
|
79
|
+
// Prevents active .nav-link tab overlapping focus outline of previous/next .nav-link
|
80
|
+
isolation: isolate;
|
81
|
+
border-color: var(--#{$prefix}nav-tabs-link-hover-border-color);
|
51
82
|
}
|
52
83
|
}
|
53
84
|
|
54
85
|
.nav-link.active,
|
55
86
|
.nav-item.show .nav-link {
|
56
|
-
color: $nav-tabs-link-active-color;
|
57
|
-
background-color: $nav-tabs-link-active-bg;
|
58
|
-
border-color: $nav-tabs-link-active-border-color;
|
87
|
+
color: var(--#{$prefix}nav-tabs-link-active-color);
|
88
|
+
background-color: var(--#{$prefix}nav-tabs-link-active-bg);
|
89
|
+
border-color: var(--#{$prefix}nav-tabs-link-active-border-color);
|
59
90
|
}
|
60
91
|
|
61
92
|
.dropdown-menu {
|
62
93
|
// Make dropdown border overlap tab border
|
63
|
-
margin-top:
|
94
|
+
margin-top: calc(-1 * var(--#{$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
|
64
95
|
// Remove the top rounded corners here since there is a hard edge above the menu
|
65
96
|
@include border-top-radius(0);
|
66
97
|
}
|
@@ -72,14 +103,53 @@
|
|
72
103
|
//
|
73
104
|
|
74
105
|
.nav-pills {
|
106
|
+
// scss-docs-start nav-pills-css-vars
|
107
|
+
--#{$prefix}nav-pills-border-radius: #{$nav-pills-border-radius};
|
108
|
+
--#{$prefix}nav-pills-link-active-color: #{$nav-pills-link-active-color};
|
109
|
+
--#{$prefix}nav-pills-link-active-bg: #{$nav-pills-link-active-bg};
|
110
|
+
// scss-docs-end nav-pills-css-vars
|
111
|
+
|
112
|
+
.nav-link {
|
113
|
+
@include border-radius(var(--#{$prefix}nav-pills-border-radius));
|
114
|
+
}
|
115
|
+
|
116
|
+
.nav-link.active,
|
117
|
+
.show > .nav-link {
|
118
|
+
color: var(--#{$prefix}nav-pills-link-active-color);
|
119
|
+
@include gradient-bg(var(--#{$prefix}nav-pills-link-active-bg));
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
|
124
|
+
//
|
125
|
+
// Underline
|
126
|
+
//
|
127
|
+
|
128
|
+
.nav-underline {
|
129
|
+
// scss-docs-start nav-underline-css-vars
|
130
|
+
--#{$prefix}nav-underline-gap: #{$nav-underline-gap};
|
131
|
+
--#{$prefix}nav-underline-border-width: #{$nav-underline-border-width};
|
132
|
+
--#{$prefix}nav-underline-link-active-color: #{$nav-underline-link-active-color};
|
133
|
+
// scss-docs-end nav-underline-css-vars
|
134
|
+
|
135
|
+
gap: var(--#{$prefix}nav-underline-gap);
|
136
|
+
|
75
137
|
.nav-link {
|
76
|
-
|
138
|
+
padding-right: 0;
|
139
|
+
padding-left: 0;
|
140
|
+
border-bottom: var(--#{$prefix}nav-underline-border-width) solid transparent;
|
141
|
+
|
142
|
+
&:hover,
|
143
|
+
&:focus {
|
144
|
+
border-bottom-color: currentcolor;
|
145
|
+
}
|
77
146
|
}
|
78
147
|
|
79
148
|
.nav-link.active,
|
80
149
|
.show > .nav-link {
|
81
|
-
|
82
|
-
|
150
|
+
font-weight: $font-weight-bold;
|
151
|
+
color: var(--#{$prefix}nav-underline-link-active-color);
|
152
|
+
border-bottom-color: currentcolor;
|
83
153
|
}
|
84
154
|
}
|
85
155
|
|
@@ -105,6 +175,13 @@
|
|
105
175
|
}
|
106
176
|
}
|
107
177
|
|
178
|
+
.nav-fill,
|
179
|
+
.nav-justified {
|
180
|
+
.nav-item .nav-link {
|
181
|
+
width: 100%; // Make sure button will grow
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
108
185
|
|
109
186
|
// Tabbable tabs
|
110
187
|
//
|