bootstrap 5.1.1 → 5.2.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/README.md +1 -1
- data/assets/javascripts/bootstrap/alert.js +18 -153
- data/assets/javascripts/bootstrap/base-component.js +44 -127
- data/assets/javascripts/bootstrap/button.js +16 -80
- data/assets/javascripts/bootstrap/carousel.js +225 -497
- data/assets/javascripts/bootstrap/collapse.js +79 -262
- data/assets/javascripts/bootstrap/dom/data.js +6 -8
- data/assets/javascripts/bootstrap/dom/event-handler.js +95 -133
- data/assets/javascripts/bootstrap/dom/manipulator.js +25 -29
- data/assets/javascripts/bootstrap/dom/selector-engine.js +17 -59
- data/assets/javascripts/bootstrap/dropdown.js +124 -342
- data/assets/javascripts/bootstrap/modal.js +122 -767
- data/assets/javascripts/bootstrap/offcanvas.js +102 -671
- data/assets/javascripts/bootstrap/popover.js +42 -124
- data/assets/javascripts/bootstrap/scrollspy.js +186 -269
- data/assets/javascripts/bootstrap/tab.js +222 -221
- data/assets/javascripts/bootstrap/toast.js +41 -227
- data/assets/javascripts/bootstrap/tooltip.js +283 -629
- 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 +1 -1
- data/assets/javascripts/bootstrap-sprockets.js +16 -7
- data/assets/javascripts/bootstrap.js +2094 -1891
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +3 -6
- data/assets/stylesheets/_bootstrap-reboot.scss +3 -7
- data/assets/stylesheets/_bootstrap.scss +4 -6
- data/assets/stylesheets/bootstrap/_accordion.scss +52 -24
- data/assets/stylesheets/bootstrap/_alert.scss +18 -4
- data/assets/stylesheets/bootstrap/_badge.scss +14 -5
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +22 -10
- data/assets/stylesheets/bootstrap/_button-group.scss +3 -0
- data/assets/stylesheets/bootstrap/_buttons.scss +97 -22
- data/assets/stylesheets/bootstrap/_card.scss +55 -37
- data/assets/stylesheets/bootstrap/_close.scss +1 -1
- data/assets/stylesheets/bootstrap/_containers.scss +1 -1
- data/assets/stylesheets/bootstrap/_dropdown.scss +83 -75
- data/assets/stylesheets/bootstrap/_functions.scss +7 -7
- data/assets/stylesheets/bootstrap/_grid.scss +3 -3
- data/assets/stylesheets/bootstrap/_helpers.scss +1 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +44 -27
- data/assets/stylesheets/bootstrap/_maps.scss +54 -0
- data/assets/stylesheets/bootstrap/_modal.scss +71 -43
- data/assets/stylesheets/bootstrap/_nav.scss +53 -20
- data/assets/stylesheets/bootstrap/_navbar.scss +91 -150
- data/assets/stylesheets/bootstrap/_offcanvas.scss +119 -59
- data/assets/stylesheets/bootstrap/_pagination.scss +66 -21
- data/assets/stylesheets/bootstrap/_placeholders.scss +1 -1
- data/assets/stylesheets/bootstrap/_popover.scss +90 -52
- data/assets/stylesheets/bootstrap/_progress.scss +20 -9
- data/assets/stylesheets/bootstrap/_reboot.scss +25 -40
- data/assets/stylesheets/bootstrap/_root.scss +40 -21
- data/assets/stylesheets/bootstrap/_spinners.scss +38 -22
- data/assets/stylesheets/bootstrap/_tables.scss +38 -25
- data/assets/stylesheets/bootstrap/_toasts.scss +35 -16
- data/assets/stylesheets/bootstrap/_tooltip.scss +61 -56
- data/assets/stylesheets/bootstrap/_type.scss +2 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +43 -26
- data/assets/stylesheets/bootstrap/_variables.scss +118 -124
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +3 -6
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +14 -3
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +28 -5
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +12 -37
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +2 -1
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +15 -7
- data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +10 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +2 -2
- data/assets/stylesheets/bootstrap/helpers/_position.scss +7 -1
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +2 -2
- data/assets/stylesheets/bootstrap/helpers/_vr.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +7 -3
- data/assets/stylesheets/bootstrap/mixins/_banner.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +8 -8
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +32 -95
- data/assets/stylesheets/bootstrap/mixins/_container.scss +4 -2
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +13 -12
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +4 -25
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +12 -9
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +12 -4
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +1 -1
- data/bootstrap.gemspec +1 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +9 -4
- metadata +16 -4
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
.dropup,
|
|
3
3
|
.dropend,
|
|
4
4
|
.dropdown,
|
|
5
|
-
.dropstart
|
|
5
|
+
.dropstart,
|
|
6
|
+
.dropup-center,
|
|
7
|
+
.dropdown-center {
|
|
6
8
|
position: relative;
|
|
7
9
|
}
|
|
8
10
|
|
|
@@ -15,26 +17,66 @@
|
|
|
15
17
|
|
|
16
18
|
// The dropdown menu
|
|
17
19
|
.dropdown-menu {
|
|
20
|
+
// scss-docs-start dropdown-css-vars
|
|
21
|
+
--#{$prefix}dropdown-min-width: #{$dropdown-min-width};
|
|
22
|
+
--#{$prefix}dropdown-padding-x: #{$dropdown-padding-x};
|
|
23
|
+
--#{$prefix}dropdown-padding-y: #{$dropdown-padding-y};
|
|
24
|
+
--#{$prefix}dropdown-spacer: #{$dropdown-spacer};
|
|
25
|
+
@include rfs($dropdown-font-size, --#{$prefix}dropdown-font-size);
|
|
26
|
+
--#{$prefix}dropdown-color: #{$dropdown-color};
|
|
27
|
+
--#{$prefix}dropdown-bg: #{$dropdown-bg};
|
|
28
|
+
--#{$prefix}dropdown-border-color: #{$dropdown-border-color};
|
|
29
|
+
--#{$prefix}dropdown-border-radius: #{$dropdown-border-radius};
|
|
30
|
+
--#{$prefix}dropdown-border-width: #{$dropdown-border-width};
|
|
31
|
+
--#{$prefix}dropdown-inner-border-radius: #{$dropdown-inner-border-radius};
|
|
32
|
+
--#{$prefix}dropdown-divider-bg: #{$dropdown-divider-bg};
|
|
33
|
+
--#{$prefix}dropdown-divider-margin-y: #{$dropdown-divider-margin-y};
|
|
34
|
+
--#{$prefix}dropdown-box-shadow: #{$dropdown-box-shadow};
|
|
35
|
+
--#{$prefix}dropdown-link-color: #{$dropdown-link-color};
|
|
36
|
+
--#{$prefix}dropdown-link-hover-color: #{$dropdown-link-hover-color};
|
|
37
|
+
--#{$prefix}dropdown-link-hover-bg: #{$dropdown-link-hover-bg};
|
|
38
|
+
--#{$prefix}dropdown-link-active-color: #{$dropdown-link-active-color};
|
|
39
|
+
--#{$prefix}dropdown-link-active-bg: #{$dropdown-link-active-bg};
|
|
40
|
+
--#{$prefix}dropdown-link-disabled-color: #{$dropdown-link-disabled-color};
|
|
41
|
+
--#{$prefix}dropdown-item-padding-x: #{$dropdown-item-padding-x};
|
|
42
|
+
--#{$prefix}dropdown-item-padding-y: #{$dropdown-item-padding-y};
|
|
43
|
+
--#{$prefix}dropdown-header-color: #{$dropdown-header-color};
|
|
44
|
+
--#{$prefix}dropdown-header-padding-x: #{$dropdown-header-padding-x};
|
|
45
|
+
--#{$prefix}dropdown-header-padding-y: #{$dropdown-header-padding-y};
|
|
46
|
+
// scss-docs-end dropdown-css-vars
|
|
47
|
+
|
|
18
48
|
position: absolute;
|
|
19
49
|
z-index: $zindex-dropdown;
|
|
20
50
|
display: none; // none by default, but block on "open" of the menu
|
|
21
|
-
min-width: $dropdown-min-width;
|
|
22
|
-
padding: $dropdown-padding-y $dropdown-padding-x;
|
|
51
|
+
min-width: var(--#{$prefix}dropdown-min-width);
|
|
52
|
+
padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-x);
|
|
23
53
|
margin: 0; // Override default margin of ul
|
|
24
|
-
@include font-size($dropdown-font-size);
|
|
25
|
-
color: $dropdown-color;
|
|
54
|
+
@include font-size(var(--#{$prefix}dropdown-font-size));
|
|
55
|
+
color: var(--#{$prefix}dropdown-color);
|
|
26
56
|
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
|
27
57
|
list-style: none;
|
|
28
|
-
background-color: $dropdown-bg;
|
|
58
|
+
background-color: var(--#{$prefix}dropdown-bg);
|
|
29
59
|
background-clip: padding-box;
|
|
30
|
-
border: $dropdown-border-width solid $dropdown-border-color;
|
|
31
|
-
@include border-radius($dropdown-border-radius);
|
|
32
|
-
@include box-shadow($dropdown-box-shadow);
|
|
60
|
+
border: var(--#{$prefix}dropdown-border-width) solid var(--#{$prefix}dropdown-border-color);
|
|
61
|
+
@include border-radius(var(--#{$prefix}dropdown-border-radius));
|
|
62
|
+
@include box-shadow(var(--#{$prefix}dropdown-box-shadow));
|
|
33
63
|
|
|
34
64
|
&[data-bs-popper] {
|
|
35
65
|
top: 100%;
|
|
36
66
|
left: 0;
|
|
37
|
-
margin-top: $dropdown-spacer;
|
|
67
|
+
margin-top: var(--#{$prefix}dropdown-spacer);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@if $dropdown-padding-y == 0 {
|
|
71
|
+
> .dropdown-item:first-child,
|
|
72
|
+
> li:first-child .dropdown-item {
|
|
73
|
+
@include border-top-radius(var(--#{$prefix}dropdown-inner-border-radius));
|
|
74
|
+
}
|
|
75
|
+
> .dropdown-item:last-child,
|
|
76
|
+
> li:last-child .dropdown-item {
|
|
77
|
+
@include border-bottom-radius(var(--#{$prefix}dropdown-inner-border-radius));
|
|
78
|
+
}
|
|
79
|
+
|
|
38
80
|
}
|
|
39
81
|
}
|
|
40
82
|
|
|
@@ -74,7 +116,7 @@
|
|
|
74
116
|
top: auto;
|
|
75
117
|
bottom: 100%;
|
|
76
118
|
margin-top: 0;
|
|
77
|
-
margin-bottom: $dropdown-spacer;
|
|
119
|
+
margin-bottom: var(--#{$prefix}dropdown-spacer);
|
|
78
120
|
}
|
|
79
121
|
|
|
80
122
|
.dropdown-toggle {
|
|
@@ -88,7 +130,7 @@
|
|
|
88
130
|
right: auto;
|
|
89
131
|
left: 100%;
|
|
90
132
|
margin-top: 0;
|
|
91
|
-
margin-left: $dropdown-spacer;
|
|
133
|
+
margin-left: var(--#{$prefix}dropdown-spacer);
|
|
92
134
|
}
|
|
93
135
|
|
|
94
136
|
.dropdown-toggle {
|
|
@@ -105,7 +147,7 @@
|
|
|
105
147
|
right: 100%;
|
|
106
148
|
left: auto;
|
|
107
149
|
margin-top: 0;
|
|
108
|
-
margin-right: $dropdown-spacer;
|
|
150
|
+
margin-right: var(--#{$prefix}dropdown-spacer);
|
|
109
151
|
}
|
|
110
152
|
|
|
111
153
|
.dropdown-toggle {
|
|
@@ -120,9 +162,10 @@
|
|
|
120
162
|
// Dividers (basically an `<hr>`) within the dropdown
|
|
121
163
|
.dropdown-divider {
|
|
122
164
|
height: 0;
|
|
123
|
-
margin: $dropdown-divider-margin-y 0;
|
|
165
|
+
margin: var(--#{$prefix}dropdown-divider-margin-y) 0;
|
|
124
166
|
overflow: hidden;
|
|
125
|
-
border-top: 1px solid $dropdown-divider-bg;
|
|
167
|
+
border-top: 1px solid var(--#{$prefix}dropdown-divider-bg);
|
|
168
|
+
opacity: 1; // Revisit in v6 to de-dupe styles that conflict with <hr> element
|
|
126
169
|
}
|
|
127
170
|
|
|
128
171
|
// Links, buttons, and more within the dropdown menu
|
|
@@ -131,45 +174,33 @@
|
|
|
131
174
|
.dropdown-item {
|
|
132
175
|
display: block;
|
|
133
176
|
width: 100%; // For `<button>`s
|
|
134
|
-
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
|
177
|
+
padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
|
|
135
178
|
clear: both;
|
|
136
179
|
font-weight: $font-weight-normal;
|
|
137
|
-
color: $dropdown-link-color;
|
|
180
|
+
color: var(--#{$prefix}dropdown-link-color);
|
|
138
181
|
text-align: inherit; // For `<button>`s
|
|
139
182
|
text-decoration: if($link-decoration == none, null, none);
|
|
140
183
|
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
|
141
184
|
background-color: transparent; // For `<button>`s
|
|
142
185
|
border: 0; // For `<button>`s
|
|
143
186
|
|
|
144
|
-
// Prevent dropdown overflow if there's no padding
|
|
145
|
-
// See https://github.com/twbs/bootstrap/pull/27703
|
|
146
|
-
@if $dropdown-padding-y == 0 {
|
|
147
|
-
&:first-child {
|
|
148
|
-
@include border-top-radius($dropdown-inner-border-radius);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
&:last-child {
|
|
152
|
-
@include border-bottom-radius($dropdown-inner-border-radius);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
187
|
&:hover,
|
|
157
188
|
&:focus {
|
|
158
|
-
color: $dropdown-link-hover-color;
|
|
189
|
+
color: var(--#{$prefix}dropdown-link-hover-color);
|
|
159
190
|
text-decoration: if($link-hover-decoration == underline, none, null);
|
|
160
|
-
@include gradient-bg($dropdown-link-hover-bg);
|
|
191
|
+
@include gradient-bg(var(--#{$prefix}dropdown-link-hover-bg));
|
|
161
192
|
}
|
|
162
193
|
|
|
163
194
|
&.active,
|
|
164
195
|
&:active {
|
|
165
|
-
color: $dropdown-link-active-color;
|
|
196
|
+
color: var(--#{$prefix}dropdown-link-active-color);
|
|
166
197
|
text-decoration: none;
|
|
167
|
-
@include gradient-bg($dropdown-link-active-bg);
|
|
198
|
+
@include gradient-bg(var(--#{$prefix}dropdown-link-active-bg));
|
|
168
199
|
}
|
|
169
200
|
|
|
170
201
|
&.disabled,
|
|
171
202
|
&:disabled {
|
|
172
|
-
color: $dropdown-link-disabled-color;
|
|
203
|
+
color: var(--#{$prefix}dropdown-link-disabled-color);
|
|
173
204
|
pointer-events: none;
|
|
174
205
|
background-color: transparent;
|
|
175
206
|
// Remove CSS gradients if they're enabled
|
|
@@ -184,57 +215,34 @@
|
|
|
184
215
|
// Dropdown section headers
|
|
185
216
|
.dropdown-header {
|
|
186
217
|
display: block;
|
|
187
|
-
padding: $dropdown-header-padding;
|
|
218
|
+
padding: var(--#{$prefix}dropdown-header-padding-y) var(--#{$prefix}dropdown-header-padding-x);
|
|
188
219
|
margin-bottom: 0; // for use with heading elements
|
|
189
220
|
@include font-size($font-size-sm);
|
|
190
|
-
color: $dropdown-header-color;
|
|
221
|
+
color: var(--#{$prefix}dropdown-header-color);
|
|
191
222
|
white-space: nowrap; // as with > li > a
|
|
192
223
|
}
|
|
193
224
|
|
|
194
225
|
// Dropdown text
|
|
195
226
|
.dropdown-item-text {
|
|
196
227
|
display: block;
|
|
197
|
-
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
|
198
|
-
color: $dropdown-link-color;
|
|
228
|
+
padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
|
|
229
|
+
color: var(--#{$prefix}dropdown-link-color);
|
|
199
230
|
}
|
|
200
231
|
|
|
201
232
|
// Dark dropdowns
|
|
202
233
|
.dropdown-menu-dark {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
&.active,
|
|
218
|
-
&:active {
|
|
219
|
-
color: $dropdown-dark-link-active-color;
|
|
220
|
-
@include gradient-bg($dropdown-dark-link-active-bg);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
&.disabled,
|
|
224
|
-
&:disabled {
|
|
225
|
-
color: $dropdown-dark-link-disabled-color;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.dropdown-divider {
|
|
230
|
-
border-color: $dropdown-dark-divider-bg;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.dropdown-item-text {
|
|
234
|
-
color: $dropdown-dark-link-color;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.dropdown-header {
|
|
238
|
-
color: $dropdown-dark-header-color;
|
|
239
|
-
}
|
|
234
|
+
// scss-docs-start dropdown-dark-css-vars
|
|
235
|
+
--#{$prefix}dropdown-color: #{$dropdown-dark-color};
|
|
236
|
+
--#{$prefix}dropdown-bg: #{$dropdown-dark-bg};
|
|
237
|
+
--#{$prefix}dropdown-border-color: #{$dropdown-dark-border-color};
|
|
238
|
+
--#{$prefix}dropdown-box-shadow: #{$dropdown-dark-box-shadow};
|
|
239
|
+
--#{$prefix}dropdown-link-color: #{$dropdown-dark-link-color};
|
|
240
|
+
--#{$prefix}dropdown-link-hover-color: #{$dropdown-dark-link-hover-color};
|
|
241
|
+
--#{$prefix}dropdown-divider-bg: #{$dropdown-dark-divider-bg};
|
|
242
|
+
--#{$prefix}dropdown-link-hover-bg: #{$dropdown-dark-link-hover-bg};
|
|
243
|
+
--#{$prefix}dropdown-link-active-color: #{$dropdown-dark-link-active-color};
|
|
244
|
+
--#{$prefix}dropdown-link-active-bg: #{$dropdown-dark-link-active-bg};
|
|
245
|
+
--#{$prefix}dropdown-link-disabled-color: #{$dropdown-dark-link-disabled-color};
|
|
246
|
+
--#{$prefix}dropdown-header-color: #{$dropdown-dark-header-color};
|
|
247
|
+
// scss-docs-end dropdown-dark-css-vars
|
|
240
248
|
}
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
// stylelint-disable scss/dollar-variable-pattern
|
|
41
41
|
@function rgba-css-var($identifier, $target) {
|
|
42
42
|
@if $identifier == "body" and $target == "bg" {
|
|
43
|
-
@return rgba(var(--#{$
|
|
43
|
+
@return rgba(var(--#{$prefix}#{$identifier}-bg-rgb), var(--#{$prefix}#{$target}-opacity));
|
|
44
44
|
} @if $identifier == "body" and $target == "text" {
|
|
45
|
-
@return rgba(var(--#{$
|
|
45
|
+
@return rgba(var(--#{$prefix}#{$identifier}-color-rgb), var(--#{$prefix}#{$target}-opacity));
|
|
46
46
|
} @else {
|
|
47
|
-
@return rgba(var(--#{$
|
|
47
|
+
@return rgba(var(--#{$prefix}#{$identifier}-rgb), var(--#{$prefix}#{$target}-opacity));
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
@function varify($list) {
|
|
69
69
|
$result: null;
|
|
70
70
|
@each $entry in $list {
|
|
71
|
-
$result: append($result, var(--#{$
|
|
71
|
+
$result: append($result, var(--#{$prefix}#{$entry}), space);
|
|
72
72
|
}
|
|
73
73
|
@return $result;
|
|
74
74
|
}
|
|
@@ -177,9 +177,9 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
|
|
|
177
177
|
@return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
// Return WCAG2.
|
|
181
|
-
// See https://www.w3.org/
|
|
182
|
-
// See https://www.w3.org/TR/
|
|
180
|
+
// Return WCAG2.1 relative luminance
|
|
181
|
+
// See https://www.w3.org/TR/WCAG/#dfn-relative-luminance
|
|
182
|
+
// See https://www.w3.org/TR/WCAG/#dfn-contrast-ratio
|
|
183
183
|
@function luminance($color) {
|
|
184
184
|
$rgb: (
|
|
185
185
|
"r": red($color),
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
@if $enable-cssgrid {
|
|
16
16
|
.grid {
|
|
17
17
|
display: grid;
|
|
18
|
-
grid-template-rows: repeat(var(--#{$
|
|
19
|
-
grid-template-columns: repeat(var(--#{$
|
|
20
|
-
gap: var(--#{$
|
|
18
|
+
grid-template-rows: repeat(var(--#{$prefix}rows, 1), 1fr);
|
|
19
|
+
grid-template-columns: repeat(var(--#{$prefix}columns, #{$grid-columns}), 1fr);
|
|
20
|
+
gap: var(--#{$prefix}gap, #{$grid-gutter-width});
|
|
21
21
|
|
|
22
22
|
@include make-cssgrid();
|
|
23
23
|
}
|
|
@@ -3,27 +3,46 @@
|
|
|
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
|
|
|
15
35
|
.list-group-numbered {
|
|
16
36
|
list-style-type: none;
|
|
17
37
|
counter-reset: section;
|
|
18
38
|
|
|
19
|
-
>
|
|
39
|
+
> .list-group-item::before {
|
|
20
40
|
// Increments only this instance of the section counter
|
|
21
41
|
content: counters(section, ".") ". ";
|
|
22
42
|
counter-increment: section;
|
|
23
43
|
}
|
|
24
44
|
}
|
|
25
45
|
|
|
26
|
-
|
|
27
46
|
// Interactive list items
|
|
28
47
|
//
|
|
29
48
|
// Use anchor or button elements instead of `li`s or `div`s to create interactive
|
|
@@ -31,25 +50,24 @@
|
|
|
31
50
|
|
|
32
51
|
.list-group-item-action {
|
|
33
52
|
width: 100%; // For `<button>`s (anchors become 100% by default though)
|
|
34
|
-
color: $list-group-action-color;
|
|
53
|
+
color: var(--#{$prefix}list-group-action-color);
|
|
35
54
|
text-align: inherit; // For `<button>`s (anchors inherit)
|
|
36
55
|
|
|
37
56
|
// Hover state
|
|
38
57
|
&:hover,
|
|
39
58
|
&:focus {
|
|
40
59
|
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
|
41
|
-
color: $list-group-action-hover-color;
|
|
60
|
+
color: var(--#{$prefix}list-group-action-hover-color);
|
|
42
61
|
text-decoration: none;
|
|
43
|
-
background-color: $list-group-hover-bg;
|
|
62
|
+
background-color: var(--#{$prefix}list-group-action-hover-bg);
|
|
44
63
|
}
|
|
45
64
|
|
|
46
65
|
&:active {
|
|
47
|
-
color: $list-group-action-active-color;
|
|
48
|
-
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);
|
|
49
68
|
}
|
|
50
69
|
}
|
|
51
70
|
|
|
52
|
-
|
|
53
71
|
// Individual list items
|
|
54
72
|
//
|
|
55
73
|
// Use on `li`s or `div`s within the `.list-group` parent.
|
|
@@ -57,11 +75,11 @@
|
|
|
57
75
|
.list-group-item {
|
|
58
76
|
position: relative;
|
|
59
77
|
display: block;
|
|
60
|
-
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
|
61
|
-
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);
|
|
62
80
|
text-decoration: if($link-decoration == none, null, none);
|
|
63
|
-
background-color: $list-group-bg;
|
|
64
|
-
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);
|
|
65
83
|
|
|
66
84
|
&:first-child {
|
|
67
85
|
@include border-top-radius(inherit);
|
|
@@ -73,30 +91,29 @@
|
|
|
73
91
|
|
|
74
92
|
&.disabled,
|
|
75
93
|
&:disabled {
|
|
76
|
-
color: $list-group-disabled-color;
|
|
94
|
+
color: var(--#{$prefix}list-group-disabled-color);
|
|
77
95
|
pointer-events: none;
|
|
78
|
-
background-color: $list-group-disabled-bg;
|
|
96
|
+
background-color: var(--#{$prefix}list-group-disabled-bg);
|
|
79
97
|
}
|
|
80
98
|
|
|
81
99
|
// Include both here for `<a>`s and `<button>`s
|
|
82
100
|
&.active {
|
|
83
101
|
z-index: 2; // Place active items above their siblings for proper border styling
|
|
84
|
-
color: $list-group-active-color;
|
|
85
|
-
background-color: $list-group-active-bg;
|
|
86
|
-
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);
|
|
87
105
|
}
|
|
88
106
|
|
|
89
107
|
& + & {
|
|
90
108
|
border-top-width: 0;
|
|
91
109
|
|
|
92
110
|
&.active {
|
|
93
|
-
margin-top:
|
|
94
|
-
border-top-width: $list-group-border-width;
|
|
111
|
+
margin-top: calc(var(--#{$prefix}list-group-border-width) * -1); // stylelint-disable-line function-disallowed-list
|
|
112
|
+
border-top-width: var(--#{$prefix}list-group-border-width);
|
|
95
113
|
}
|
|
96
114
|
}
|
|
97
115
|
}
|
|
98
116
|
|
|
99
|
-
|
|
100
117
|
// Horizontal
|
|
101
118
|
//
|
|
102
119
|
// Change the layout of list group items from vertical (default) to horizontal.
|
|
@@ -110,12 +127,12 @@
|
|
|
110
127
|
|
|
111
128
|
> .list-group-item {
|
|
112
129
|
&:first-child {
|
|
113
|
-
@include border-bottom-start-radius($list-group-border-radius);
|
|
130
|
+
@include border-bottom-start-radius(var(--#{$prefix}list-group-border-radius));
|
|
114
131
|
@include border-top-end-radius(0);
|
|
115
132
|
}
|
|
116
133
|
|
|
117
134
|
&:last-child {
|
|
118
|
-
@include border-top-end-radius($list-group-border-radius);
|
|
135
|
+
@include border-top-end-radius(var(--#{$prefix}list-group-border-radius));
|
|
119
136
|
@include border-bottom-start-radius(0);
|
|
120
137
|
}
|
|
121
138
|
|
|
@@ -124,12 +141,12 @@
|
|
|
124
141
|
}
|
|
125
142
|
|
|
126
143
|
+ .list-group-item {
|
|
127
|
-
border-top-width: $list-group-border-width;
|
|
144
|
+
border-top-width: var(--#{$prefix}list-group-border-width);
|
|
128
145
|
border-left-width: 0;
|
|
129
146
|
|
|
130
147
|
&.active {
|
|
131
|
-
margin-left:
|
|
132
|
-
border-left-width: $list-group-border-width;
|
|
148
|
+
margin-left: calc(var(--#{$prefix}list-group-border-width) * -1); // stylelint-disable-line function-disallowed-list
|
|
149
|
+
border-left-width: var(--#{$prefix}list-group-border-width);
|
|
133
150
|
}
|
|
134
151
|
}
|
|
135
152
|
}
|
|
@@ -147,7 +164,7 @@
|
|
|
147
164
|
@include border-radius(0);
|
|
148
165
|
|
|
149
166
|
> .list-group-item {
|
|
150
|
-
border-width: 0 0 $list-group-border-width;
|
|
167
|
+
border-width: 0 0 var(--#{$prefix}list-group-border-width);
|
|
151
168
|
|
|
152
169
|
&:last-child {
|
|
153
170
|
border-bottom-width: 0;
|
|
@@ -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;
|