bootstrap 4.3.1 → 5.3.0
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/CHANGELOG.md +2 -14
- data/README.md +28 -5
- data/assets/javascripts/bootstrap/alert.js +54 -163
- data/assets/javascripts/bootstrap/base-component.js +83 -0
- data/assets/javascripts/bootstrap/button.js +44 -152
- data/assets/javascripts/bootstrap/carousel.js +289 -569
- data/assets/javascripts/bootstrap/collapse.js +170 -349
- 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 +303 -496
- data/assets/javascripts/bootstrap/modal.js +229 -559
- data/assets/javascripts/bootstrap/offcanvas.js +245 -0
- data/assets/javascripts/bootstrap/popover.js +61 -226
- data/assets/javascripts/bootstrap/scrollspy.js +217 -317
- data/assets/javascripts/bootstrap/tab.js +220 -212
- data/assets/javascripts/bootstrap/toast.js +145 -229
- data/assets/javascripts/bootstrap/tooltip.js +421 -782
- 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 +3690 -3639
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/stylesheets/_bootstrap-grid.scss +53 -20
- data/assets/stylesheets/_bootstrap-reboot.scss +5 -7
- data/assets/stylesheets/_bootstrap.scss +21 -13
- data/assets/stylesheets/bootstrap/_accordion.scss +158 -0
- data/assets/stylesheets/bootstrap/_alert.scss +32 -15
- data/assets/stylesheets/bootstrap/_badge.scss +15 -31
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +23 -24
- data/assets/stylesheets/bootstrap/_button-group.scss +27 -48
- data/assets/stylesheets/bootstrap/_buttons.scss +139 -69
- data/assets/stylesheets/bootstrap/_card.scss +91 -141
- data/assets/stylesheets/bootstrap/_carousel.scss +86 -39
- data/assets/stylesheets/bootstrap/_close.scss +51 -29
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +131 -72
- data/assets/stylesheets/bootstrap/_forms.scss +9 -330
- data/assets/stylesheets/bootstrap/_functions.scss +244 -28
- data/assets/stylesheets/bootstrap/_grid.scss +18 -31
- data/assets/stylesheets/bootstrap/_helpers.scss +12 -0
- data/assets/stylesheets/bootstrap/_images.scss +3 -3
- data/assets/stylesheets/bootstrap/_list-group.scss +101 -53
- data/assets/stylesheets/bootstrap/_maps.scss +174 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +13 -18
- data/assets/stylesheets/bootstrap/_modal.scss +120 -112
- data/assets/stylesheets/bootstrap/_nav.scss +113 -24
- data/assets/stylesheets/bootstrap/_navbar.scss +145 -150
- data/assets/stylesheets/bootstrap/_offcanvas.scss +146 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +74 -38
- data/assets/stylesheets/bootstrap/_placeholders.scss +51 -0
- data/assets/stylesheets/bootstrap/_popover.scss +99 -74
- data/assets/stylesheets/bootstrap/_progress.scss +40 -15
- data/assets/stylesheets/bootstrap/_reboot.scss +342 -215
- data/assets/stylesheets/bootstrap/_root.scss +174 -9
- data/assets/stylesheets/bootstrap/_spinners.scss +52 -22
- data/assets/stylesheets/bootstrap/_tables.scss +101 -115
- data/assets/stylesheets/bootstrap/_toasts.scss +54 -25
- data/assets/stylesheets/bootstrap/_tooltip.scss +67 -63
- data/assets/stylesheets/bootstrap/_transitions.scss +8 -1
- data/assets/stylesheets/bootstrap/_type.scss +42 -61
- data/assets/stylesheets/bootstrap/_utilities.scss +806 -17
- data/assets/stylesheets/bootstrap/_variables-dark.scss +85 -0
- data/assets/stylesheets/bootstrap/_variables.scss +1235 -615
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +19 -0
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +94 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +188 -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 +8 -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 +37 -22
- 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 -97
- 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 +77 -116
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +133 -33
- data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +7 -2
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +7 -19
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +18 -8
- 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 +4 -6
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +31 -7
- data/tasks/updater/network.rb +10 -4
- data/tasks/updater/scss.rb +1 -1
- data/tasks/updater.rb +2 -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_5_2.gemfile +8 -0
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/gemfiles/rails_6_1.gemfile +7 -0
- data/test/gemfiles/rails_7_0.gemfile +7 -0
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +18 -12
- metadata +86 -84
- data/.travis.yml +0 -17
- 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
- /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
|
|
@@ -48,22 +65,21 @@
|
|
48
65
|
.modal.show & {
|
49
66
|
transform: $modal-show-transform;
|
50
67
|
}
|
68
|
+
|
69
|
+
// When trying to close, animate focus to scale
|
70
|
+
.modal.modal-static & {
|
71
|
+
transform: $modal-scale-transform;
|
72
|
+
}
|
51
73
|
}
|
52
74
|
|
53
75
|
.modal-dialog-scrollable {
|
54
|
-
|
55
|
-
max-height: calc(100% - #{$modal-dialog-margin * 2});
|
76
|
+
height: calc(100% - var(--#{$prefix}modal-margin) * 2);
|
56
77
|
|
57
78
|
.modal-content {
|
58
|
-
max-height:
|
79
|
+
max-height: 100%;
|
59
80
|
overflow: hidden;
|
60
81
|
}
|
61
82
|
|
62
|
-
.modal-header,
|
63
|
-
.modal-footer {
|
64
|
-
flex-shrink: 0;
|
65
|
-
}
|
66
|
-
|
67
83
|
.modal-body {
|
68
84
|
overflow-y: auto;
|
69
85
|
}
|
@@ -72,29 +88,7 @@
|
|
72
88
|
.modal-dialog-centered {
|
73
89
|
display: flex;
|
74
90
|
align-items: center;
|
75
|
-
min-height: calc(100% -
|
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
|
-
}
|
91
|
+
min-height: calc(100% - var(--#{$prefix}modal-margin) * 2);
|
98
92
|
}
|
99
93
|
|
100
94
|
// Actual modal
|
@@ -104,53 +98,49 @@
|
|
104
98
|
flex-direction: column;
|
105
99
|
width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
|
106
100
|
// counteract the pointer-events: none; in the .modal-dialog
|
107
|
-
color: $modal-
|
101
|
+
color: var(--#{$prefix}modal-color);
|
108
102
|
pointer-events: auto;
|
109
|
-
background-color: $modal-
|
103
|
+
background-color: var(--#{$prefix}modal-bg);
|
110
104
|
background-clip: padding-box;
|
111
|
-
border: $modal-
|
112
|
-
@include border-radius($modal-
|
113
|
-
@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));
|
114
108
|
// Remove focus outline from opened modal
|
115
109
|
outline: 0;
|
116
110
|
}
|
117
111
|
|
118
112
|
// Modal background
|
119
113
|
.modal-backdrop {
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
// Fade for backdrop
|
129
|
-
&.fade { opacity: 0; }
|
130
|
-
&.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));
|
131
121
|
}
|
132
122
|
|
133
123
|
// Modal header
|
134
124
|
// Top section of the modal w/ title and dismiss
|
135
125
|
.modal-header {
|
136
126
|
display: flex;
|
137
|
-
|
127
|
+
flex-shrink: 0;
|
128
|
+
align-items: center;
|
138
129
|
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
|
139
|
-
padding: $modal-header-padding;
|
140
|
-
border-bottom: $modal-header-border-width solid $modal-header-border-color;
|
141
|
-
@include border-top-radius($modal-
|
142
|
-
|
143
|
-
.close {
|
144
|
-
padding: $modal-header-padding;
|
145
|
-
|
146
|
-
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;
|
147
137
|
}
|
148
138
|
}
|
149
139
|
|
150
140
|
// Title text within header
|
151
141
|
.modal-title {
|
152
142
|
margin-bottom: 0;
|
153
|
-
line-height: $modal-title-line-height;
|
143
|
+
line-height: var(--#{$prefix}modal-title-line-height);
|
154
144
|
}
|
155
145
|
|
156
146
|
// Modal body
|
@@ -158,72 +148,90 @@
|
|
158
148
|
.modal-body {
|
159
149
|
position: relative;
|
160
150
|
// Enable `flex-grow: 1` so that the body take up as much space as possible
|
161
|
-
// when should
|
151
|
+
// when there should be a fixed height on `.modal-dialog`.
|
162
152
|
flex: 1 1 auto;
|
163
|
-
padding: $modal-
|
153
|
+
padding: var(--#{$prefix}modal-padding);
|
164
154
|
}
|
165
155
|
|
166
156
|
// Footer (for actions)
|
167
157
|
.modal-footer {
|
168
158
|
display: flex;
|
159
|
+
flex-shrink: 0;
|
160
|
+
flex-wrap: wrap;
|
169
161
|
align-items: center; // vertically center
|
170
162
|
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
|
171
|
-
padding: $modal-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
//
|
181
|
-
|
182
|
-
position: absolute;
|
183
|
-
top: -9999px;
|
184
|
-
width: 50px;
|
185
|
-
height: 50px;
|
186
|
-
overflow: scroll;
|
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));
|
167
|
+
|
168
|
+
// Place margin between footer elements
|
169
|
+
// This solution is far from ideal because of the universal selector usage,
|
170
|
+
// but is needed to fix https://github.com/twbs/bootstrap/issues/24800
|
171
|
+
> * {
|
172
|
+
margin: calc(var(--#{$prefix}modal-footer-gap) * .5); // Todo in v6: replace with gap on parent class
|
173
|
+
}
|
187
174
|
}
|
188
175
|
|
189
176
|
// Scale up the modal
|
190
177
|
@include media-breakpoint-up(sm) {
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
margin: $modal-dialog-margin-y-sm-up auto;
|
195
|
-
}
|
196
|
-
|
197
|
-
.modal-dialog-scrollable {
|
198
|
-
max-height: calc(100% - #{$modal-dialog-margin-y-sm-up * 2});
|
199
|
-
|
200
|
-
.modal-content {
|
201
|
-
max-height: calc(100vh - #{$modal-dialog-margin-y-sm-up * 2});
|
202
|
-
}
|
178
|
+
.modal {
|
179
|
+
--#{$prefix}modal-margin: #{$modal-dialog-margin-y-sm-up};
|
180
|
+
--#{$prefix}modal-box-shadow: #{$modal-content-box-shadow-sm-up};
|
203
181
|
}
|
204
182
|
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
}
|
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;
|
211
188
|
}
|
212
189
|
|
213
|
-
.modal-
|
214
|
-
|
190
|
+
.modal-sm {
|
191
|
+
--#{$prefix}modal-width: #{$modal-sm};
|
215
192
|
}
|
216
|
-
|
217
|
-
.modal-sm { max-width: $modal-sm; }
|
218
193
|
}
|
219
194
|
|
220
195
|
@include media-breakpoint-up(lg) {
|
221
196
|
.modal-lg,
|
222
197
|
.modal-xl {
|
223
|
-
|
198
|
+
--#{$prefix}modal-width: #{$modal-lg};
|
224
199
|
}
|
225
200
|
}
|
226
201
|
|
227
202
|
@include media-breakpoint-up(xl) {
|
228
|
-
.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
|
+
}
|
229
236
|
}
|
237
|
+
// scss-docs-end modal-fullscreen-loop
|
@@ -1,9 +1,19 @@
|
|
1
1
|
// Base class
|
2
2
|
//
|
3
3
|
// Kickstart any navigation component with a set of style resets. Works with
|
4
|
-
// `<nav>`s or `<
|
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,15 +23,29 @@
|
|
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);
|
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
|
+
}
|
17
40
|
|
18
|
-
|
19
|
-
|
41
|
+
&:focus-visible {
|
42
|
+
outline: 0;
|
43
|
+
box-shadow: $nav-link-focus-box-shadow;
|
20
44
|
}
|
21
45
|
|
22
46
|
// Disabled state lightens text
|
23
47
|
&.disabled {
|
24
|
-
color: $nav-link-disabled-color;
|
48
|
+
color: var(--#{$prefix}nav-link-disabled-color);
|
25
49
|
pointer-events: none;
|
26
50
|
cursor: default;
|
27
51
|
}
|
@@ -32,22 +56,33 @@
|
|
32
56
|
//
|
33
57
|
|
34
58
|
.nav-tabs {
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
}
|
59
|
+
// scss-docs-start nav-tabs-css-vars
|
60
|
+
--#{$prefix}nav-tabs-border-width: #{$nav-tabs-border-width};
|
61
|
+
--#{$prefix}nav-tabs-border-color: #{$nav-tabs-border-color};
|
62
|
+
--#{$prefix}nav-tabs-border-radius: #{$nav-tabs-border-radius};
|
63
|
+
--#{$prefix}nav-tabs-link-hover-border-color: #{$nav-tabs-link-hover-border-color};
|
64
|
+
--#{$prefix}nav-tabs-link-active-color: #{$nav-tabs-link-active-color};
|
65
|
+
--#{$prefix}nav-tabs-link-active-bg: #{$nav-tabs-link-active-bg};
|
66
|
+
--#{$prefix}nav-tabs-link-active-border-color: #{$nav-tabs-link-active-border-color};
|
67
|
+
// scss-docs-end nav-tabs-css-vars
|
68
|
+
|
69
|
+
border-bottom: var(--#{$prefix}nav-tabs-border-width) solid var(--#{$prefix}nav-tabs-border-color);
|
40
70
|
|
41
71
|
.nav-link {
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
72
|
+
margin-bottom: calc(-1 * var(--#{$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
|
73
|
+
border: var(--#{$prefix}nav-tabs-border-width) solid transparent;
|
74
|
+
@include border-top-radius(var(--#{$prefix}nav-tabs-border-radius));
|
75
|
+
|
76
|
+
&:hover,
|
77
|
+
&:focus {
|
78
|
+
// Prevents active .nav-link tab overlapping focus outline of previous/next .nav-link
|
79
|
+
isolation: isolate;
|
80
|
+
border-color: var(--#{$prefix}nav-tabs-link-hover-border-color);
|
47
81
|
}
|
48
82
|
|
49
|
-
&.disabled
|
50
|
-
|
83
|
+
&.disabled,
|
84
|
+
&:disabled {
|
85
|
+
color: var(--#{$prefix}nav-link-disabled-color);
|
51
86
|
background-color: transparent;
|
52
87
|
border-color: transparent;
|
53
88
|
}
|
@@ -55,14 +90,14 @@
|
|
55
90
|
|
56
91
|
.nav-link.active,
|
57
92
|
.nav-item.show .nav-link {
|
58
|
-
color: $nav-tabs-link-active-color;
|
59
|
-
background-color: $nav-tabs-link-active-bg;
|
60
|
-
border-color: $nav-tabs-link-active-border-color;
|
93
|
+
color: var(--#{$prefix}nav-tabs-link-active-color);
|
94
|
+
background-color: var(--#{$prefix}nav-tabs-link-active-bg);
|
95
|
+
border-color: var(--#{$prefix}nav-tabs-link-active-border-color);
|
61
96
|
}
|
62
97
|
|
63
98
|
.dropdown-menu {
|
64
99
|
// Make dropdown border overlap tab border
|
65
|
-
margin-top:
|
100
|
+
margin-top: calc(-1 * var(--#{$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
|
66
101
|
// Remove the top rounded corners here since there is a hard edge above the menu
|
67
102
|
@include border-top-radius(0);
|
68
103
|
}
|
@@ -74,14 +109,59 @@
|
|
74
109
|
//
|
75
110
|
|
76
111
|
.nav-pills {
|
112
|
+
// scss-docs-start nav-pills-css-vars
|
113
|
+
--#{$prefix}nav-pills-border-radius: #{$nav-pills-border-radius};
|
114
|
+
--#{$prefix}nav-pills-link-active-color: #{$nav-pills-link-active-color};
|
115
|
+
--#{$prefix}nav-pills-link-active-bg: #{$nav-pills-link-active-bg};
|
116
|
+
// scss-docs-end nav-pills-css-vars
|
117
|
+
|
77
118
|
.nav-link {
|
78
|
-
@include border-radius($nav-pills-border-radius);
|
119
|
+
@include border-radius(var(--#{$prefix}nav-pills-border-radius));
|
120
|
+
|
121
|
+
&:disabled {
|
122
|
+
color: var(--#{$prefix}nav-link-disabled-color);
|
123
|
+
background-color: transparent;
|
124
|
+
border-color: transparent;
|
125
|
+
}
|
79
126
|
}
|
80
127
|
|
81
128
|
.nav-link.active,
|
82
129
|
.show > .nav-link {
|
83
|
-
color: $nav-pills-link-active-color;
|
84
|
-
|
130
|
+
color: var(--#{$prefix}nav-pills-link-active-color);
|
131
|
+
@include gradient-bg(var(--#{$prefix}nav-pills-link-active-bg));
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
|
136
|
+
//
|
137
|
+
// Underline
|
138
|
+
//
|
139
|
+
|
140
|
+
.nav-underline {
|
141
|
+
// scss-docs-start nav-underline-css-vars
|
142
|
+
--#{$prefix}nav-underline-gap: #{$nav-underline-gap};
|
143
|
+
--#{$prefix}nav-underline-border-width: #{$nav-underline-border-width};
|
144
|
+
--#{$prefix}nav-underline-link-active-color: #{$nav-underline-link-active-color};
|
145
|
+
// scss-docs-end nav-underline-css-vars
|
146
|
+
|
147
|
+
gap: var(--#{$prefix}nav-underline-gap);
|
148
|
+
|
149
|
+
.nav-link {
|
150
|
+
padding-right: 0;
|
151
|
+
padding-left: 0;
|
152
|
+
border-bottom: var(--#{$prefix}nav-underline-border-width) solid transparent;
|
153
|
+
|
154
|
+
&:hover,
|
155
|
+
&:focus {
|
156
|
+
border-bottom-color: currentcolor;
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
.nav-link.active,
|
161
|
+
.show > .nav-link {
|
162
|
+
font-weight: $font-weight-bold;
|
163
|
+
color: var(--#{$prefix}nav-underline-link-active-color);
|
164
|
+
border-bottom-color: currentcolor;
|
85
165
|
}
|
86
166
|
}
|
87
167
|
|
@@ -91,6 +171,7 @@
|
|
91
171
|
//
|
92
172
|
|
93
173
|
.nav-fill {
|
174
|
+
> .nav-link,
|
94
175
|
.nav-item {
|
95
176
|
flex: 1 1 auto;
|
96
177
|
text-align: center;
|
@@ -98,6 +179,7 @@
|
|
98
179
|
}
|
99
180
|
|
100
181
|
.nav-justified {
|
182
|
+
> .nav-link,
|
101
183
|
.nav-item {
|
102
184
|
flex-basis: 0;
|
103
185
|
flex-grow: 1;
|
@@ -105,6 +187,13 @@
|
|
105
187
|
}
|
106
188
|
}
|
107
189
|
|
190
|
+
.nav-fill,
|
191
|
+
.nav-justified {
|
192
|
+
.nav-item .nav-link {
|
193
|
+
width: 100%; // Make sure button will grow
|
194
|
+
}
|
195
|
+
}
|
196
|
+
|
108
197
|
|
109
198
|
// Tabbable tabs
|
110
199
|
//
|