bootstrap-scss 5.1.3 → 5.2.1

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.
Files changed (61) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +5 -5
  3. package/_accordion.scss +149 -118
  4. package/_alert.scss +18 -4
  5. package/_badge.scss +14 -5
  6. package/_breadcrumb.scss +22 -10
  7. package/_button-group.scss +142 -139
  8. package/_buttons.scss +201 -111
  9. package/_card.scss +55 -37
  10. package/_close.scss +1 -1
  11. package/_containers.scss +1 -1
  12. package/_dropdown.scss +249 -240
  13. package/_functions.scss +302 -302
  14. package/_grid.scss +3 -3
  15. package/_helpers.scss +1 -0
  16. package/_list-group.scss +192 -174
  17. package/_maps.scss +54 -0
  18. package/_modal.scss +237 -209
  19. package/_nav.scss +172 -139
  20. package/_navbar.scss +278 -335
  21. package/_offcanvas.scss +144 -83
  22. package/_pagination.scss +109 -64
  23. package/_placeholders.scss +1 -1
  24. package/_popover.scss +196 -158
  25. package/_progress.scss +20 -9
  26. package/_reboot.scss +25 -40
  27. package/_root.scss +40 -21
  28. package/_spinners.scss +38 -22
  29. package/_tables.scss +32 -23
  30. package/_toasts.scss +71 -51
  31. package/_tooltip.scss +61 -56
  32. package/_type.scss +2 -0
  33. package/_utilities.scss +43 -26
  34. package/_variables.scss +1634 -1641
  35. package/bootstrap-grid.scss +3 -6
  36. package/bootstrap-reboot.scss +3 -7
  37. package/bootstrap-utilities.scss +3 -6
  38. package/bootstrap.scss +4 -6
  39. package/forms/_floating-labels.scss +75 -63
  40. package/forms/_form-check.scss +28 -5
  41. package/forms/_form-control.scss +12 -37
  42. package/forms/_form-select.scss +0 -1
  43. package/forms/_input-group.scss +132 -121
  44. package/helpers/_color-bg.scss +10 -0
  45. package/helpers/_colored-links.scss +2 -2
  46. package/helpers/_position.scss +7 -1
  47. package/helpers/_ratio.scss +2 -2
  48. package/helpers/_vr.scss +1 -1
  49. package/mixins/_alert.scss +7 -3
  50. package/mixins/_banner.scss +9 -0
  51. package/mixins/_breakpoints.scss +8 -8
  52. package/mixins/_buttons.scss +32 -95
  53. package/mixins/_container.scss +4 -2
  54. package/mixins/_forms.scss +152 -144
  55. package/mixins/_gradients.scss +1 -1
  56. package/mixins/_grid.scss +12 -12
  57. package/mixins/_pagination.scss +4 -25
  58. package/mixins/_reset-text.scss +1 -1
  59. package/mixins/_table-variants.scss +12 -9
  60. package/mixins/_utilities.scss +97 -89
  61. package/package.json +1 -1
package/_dropdown.scss CHANGED
@@ -1,240 +1,249 @@
1
- // The dropdown wrapper (`<div>`)
2
- .dropup,
3
- .dropend,
4
- .dropdown,
5
- .dropstart {
6
- position: relative;
7
- }
8
-
9
- .dropdown-toggle {
10
- white-space: nowrap;
11
-
12
- // Generate the caret automatically
13
- @include caret();
14
- }
15
-
16
- // The dropdown menu
17
- .dropdown-menu {
18
- position: absolute;
19
- z-index: $zindex-dropdown;
20
- 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;
23
- margin: 0; // Override default margin of ul
24
- @include font-size($dropdown-font-size);
25
- color: $dropdown-color;
26
- text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
27
- list-style: none;
28
- background-color: $dropdown-bg;
29
- 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);
33
-
34
- &[data-bs-popper] {
35
- top: 100%;
36
- left: 0;
37
- margin-top: $dropdown-spacer;
38
- }
39
- }
40
-
41
- // scss-docs-start responsive-breakpoints
42
- // We deliberately hardcode the `bs-` prefix because we check
43
- // this custom property in JS to determine Popper's positioning
44
-
45
- @each $breakpoint in map-keys($grid-breakpoints) {
46
- @include media-breakpoint-up($breakpoint) {
47
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
48
-
49
- .dropdown-menu#{$infix}-start {
50
- --bs-position: start;
51
-
52
- &[data-bs-popper] {
53
- right: auto;
54
- left: 0;
55
- }
56
- }
57
-
58
- .dropdown-menu#{$infix}-end {
59
- --bs-position: end;
60
-
61
- &[data-bs-popper] {
62
- right: 0;
63
- left: auto;
64
- }
65
- }
66
- }
67
- }
68
- // scss-docs-end responsive-breakpoints
69
-
70
- // Allow for dropdowns to go bottom up (aka, dropup-menu)
71
- // Just add .dropup after the standard .dropdown class and you're set.
72
- .dropup {
73
- .dropdown-menu[data-bs-popper] {
74
- top: auto;
75
- bottom: 100%;
76
- margin-top: 0;
77
- margin-bottom: $dropdown-spacer;
78
- }
79
-
80
- .dropdown-toggle {
81
- @include caret(up);
82
- }
83
- }
84
-
85
- .dropend {
86
- .dropdown-menu[data-bs-popper] {
87
- top: 0;
88
- right: auto;
89
- left: 100%;
90
- margin-top: 0;
91
- margin-left: $dropdown-spacer;
92
- }
93
-
94
- .dropdown-toggle {
95
- @include caret(end);
96
- &::after {
97
- vertical-align: 0;
98
- }
99
- }
100
- }
101
-
102
- .dropstart {
103
- .dropdown-menu[data-bs-popper] {
104
- top: 0;
105
- right: 100%;
106
- left: auto;
107
- margin-top: 0;
108
- margin-right: $dropdown-spacer;
109
- }
110
-
111
- .dropdown-toggle {
112
- @include caret(start);
113
- &::before {
114
- vertical-align: 0;
115
- }
116
- }
117
- }
118
-
119
-
120
- // Dividers (basically an `<hr>`) within the dropdown
121
- .dropdown-divider {
122
- height: 0;
123
- margin: $dropdown-divider-margin-y 0;
124
- overflow: hidden;
125
- border-top: 1px solid $dropdown-divider-bg;
126
- }
127
-
128
- // Links, buttons, and more within the dropdown menu
129
- //
130
- // `<button>`-specific styles are denoted with `// For <button>s`
131
- .dropdown-item {
132
- display: block;
133
- width: 100%; // For `<button>`s
134
- padding: $dropdown-item-padding-y $dropdown-item-padding-x;
135
- clear: both;
136
- font-weight: $font-weight-normal;
137
- color: $dropdown-link-color;
138
- text-align: inherit; // For `<button>`s
139
- text-decoration: if($link-decoration == none, null, none);
140
- white-space: nowrap; // prevent links from randomly breaking onto new lines
141
- background-color: transparent; // For `<button>`s
142
- border: 0; // For `<button>`s
143
-
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
- &:hover,
157
- &:focus {
158
- color: $dropdown-link-hover-color;
159
- text-decoration: if($link-hover-decoration == underline, none, null);
160
- @include gradient-bg($dropdown-link-hover-bg);
161
- }
162
-
163
- &.active,
164
- &:active {
165
- color: $dropdown-link-active-color;
166
- text-decoration: none;
167
- @include gradient-bg($dropdown-link-active-bg);
168
- }
169
-
170
- &.disabled,
171
- &:disabled {
172
- color: $dropdown-link-disabled-color;
173
- pointer-events: none;
174
- background-color: transparent;
175
- // Remove CSS gradients if they're enabled
176
- background-image: if($enable-gradients, none, null);
177
- }
178
- }
179
-
180
- .dropdown-menu.show {
181
- display: block;
182
- }
183
-
184
- // Dropdown section headers
185
- .dropdown-header {
186
- display: block;
187
- padding: $dropdown-header-padding;
188
- margin-bottom: 0; // for use with heading elements
189
- @include font-size($font-size-sm);
190
- color: $dropdown-header-color;
191
- white-space: nowrap; // as with > li > a
192
- }
193
-
194
- // Dropdown text
195
- .dropdown-item-text {
196
- display: block;
197
- padding: $dropdown-item-padding-y $dropdown-item-padding-x;
198
- color: $dropdown-link-color;
199
- }
200
-
201
- // Dark dropdowns
202
- .dropdown-menu-dark {
203
- color: $dropdown-dark-color;
204
- background-color: $dropdown-dark-bg;
205
- border-color: $dropdown-dark-border-color;
206
- @include box-shadow($dropdown-dark-box-shadow);
207
-
208
- .dropdown-item {
209
- color: $dropdown-dark-link-color;
210
-
211
- &:hover,
212
- &:focus {
213
- color: $dropdown-dark-link-hover-color;
214
- @include gradient-bg($dropdown-dark-link-hover-bg);
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
- }
240
- }
1
+ // The dropdown wrapper (`<div>`)
2
+ .dropup,
3
+ .dropend,
4
+ .dropdown,
5
+ .dropstart,
6
+ .dropup-center,
7
+ .dropdown-center {
8
+ position: relative;
9
+ }
10
+
11
+ .dropdown-toggle {
12
+ white-space: nowrap;
13
+
14
+ // Generate the caret automatically
15
+ @include caret();
16
+ }
17
+
18
+ // The dropdown menu
19
+ .dropdown-menu {
20
+ // scss-docs-start dropdown-css-vars
21
+ --#{$prefix}dropdown-zindex: #{$zindex-dropdown};
22
+ --#{$prefix}dropdown-min-width: #{$dropdown-min-width};
23
+ --#{$prefix}dropdown-padding-x: #{$dropdown-padding-x};
24
+ --#{$prefix}dropdown-padding-y: #{$dropdown-padding-y};
25
+ --#{$prefix}dropdown-spacer: #{$dropdown-spacer};
26
+ @include rfs($dropdown-font-size, --#{$prefix}dropdown-font-size);
27
+ --#{$prefix}dropdown-color: #{$dropdown-color};
28
+ --#{$prefix}dropdown-bg: #{$dropdown-bg};
29
+ --#{$prefix}dropdown-border-color: #{$dropdown-border-color};
30
+ --#{$prefix}dropdown-border-radius: #{$dropdown-border-radius};
31
+ --#{$prefix}dropdown-border-width: #{$dropdown-border-width};
32
+ --#{$prefix}dropdown-inner-border-radius: #{$dropdown-inner-border-radius};
33
+ --#{$prefix}dropdown-divider-bg: #{$dropdown-divider-bg};
34
+ --#{$prefix}dropdown-divider-margin-y: #{$dropdown-divider-margin-y};
35
+ --#{$prefix}dropdown-box-shadow: #{$dropdown-box-shadow};
36
+ --#{$prefix}dropdown-link-color: #{$dropdown-link-color};
37
+ --#{$prefix}dropdown-link-hover-color: #{$dropdown-link-hover-color};
38
+ --#{$prefix}dropdown-link-hover-bg: #{$dropdown-link-hover-bg};
39
+ --#{$prefix}dropdown-link-active-color: #{$dropdown-link-active-color};
40
+ --#{$prefix}dropdown-link-active-bg: #{$dropdown-link-active-bg};
41
+ --#{$prefix}dropdown-link-disabled-color: #{$dropdown-link-disabled-color};
42
+ --#{$prefix}dropdown-item-padding-x: #{$dropdown-item-padding-x};
43
+ --#{$prefix}dropdown-item-padding-y: #{$dropdown-item-padding-y};
44
+ --#{$prefix}dropdown-header-color: #{$dropdown-header-color};
45
+ --#{$prefix}dropdown-header-padding-x: #{$dropdown-header-padding-x};
46
+ --#{$prefix}dropdown-header-padding-y: #{$dropdown-header-padding-y};
47
+ // scss-docs-end dropdown-css-vars
48
+
49
+ position: absolute;
50
+ z-index: var(--#{$prefix}dropdown-zindex);
51
+ display: none; // none by default, but block on "open" of the menu
52
+ min-width: var(--#{$prefix}dropdown-min-width);
53
+ padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-x);
54
+ margin: 0; // Override default margin of ul
55
+ @include font-size(var(--#{$prefix}dropdown-font-size));
56
+ color: var(--#{$prefix}dropdown-color);
57
+ text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
58
+ list-style: none;
59
+ background-color: var(--#{$prefix}dropdown-bg);
60
+ background-clip: padding-box;
61
+ border: var(--#{$prefix}dropdown-border-width) solid var(--#{$prefix}dropdown-border-color);
62
+ @include border-radius(var(--#{$prefix}dropdown-border-radius));
63
+ @include box-shadow(var(--#{$prefix}dropdown-box-shadow));
64
+
65
+ &[data-bs-popper] {
66
+ top: 100%;
67
+ left: 0;
68
+ margin-top: var(--#{$prefix}dropdown-spacer);
69
+ }
70
+
71
+ @if $dropdown-padding-y == 0 {
72
+ > .dropdown-item:first-child,
73
+ > li:first-child .dropdown-item {
74
+ @include border-top-radius(var(--#{$prefix}dropdown-inner-border-radius));
75
+ }
76
+ > .dropdown-item:last-child,
77
+ > li:last-child .dropdown-item {
78
+ @include border-bottom-radius(var(--#{$prefix}dropdown-inner-border-radius));
79
+ }
80
+
81
+ }
82
+ }
83
+
84
+ // scss-docs-start responsive-breakpoints
85
+ // We deliberately hardcode the `bs-` prefix because we check
86
+ // this custom property in JS to determine Popper's positioning
87
+
88
+ @each $breakpoint in map-keys($grid-breakpoints) {
89
+ @include media-breakpoint-up($breakpoint) {
90
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
91
+
92
+ .dropdown-menu#{$infix}-start {
93
+ --bs-position: start;
94
+
95
+ &[data-bs-popper] {
96
+ right: auto;
97
+ left: 0;
98
+ }
99
+ }
100
+
101
+ .dropdown-menu#{$infix}-end {
102
+ --bs-position: end;
103
+
104
+ &[data-bs-popper] {
105
+ right: 0;
106
+ left: auto;
107
+ }
108
+ }
109
+ }
110
+ }
111
+ // scss-docs-end responsive-breakpoints
112
+
113
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
114
+ // Just add .dropup after the standard .dropdown class and you're set.
115
+ .dropup {
116
+ .dropdown-menu[data-bs-popper] {
117
+ top: auto;
118
+ bottom: 100%;
119
+ margin-top: 0;
120
+ margin-bottom: var(--#{$prefix}dropdown-spacer);
121
+ }
122
+
123
+ .dropdown-toggle {
124
+ @include caret(up);
125
+ }
126
+ }
127
+
128
+ .dropend {
129
+ .dropdown-menu[data-bs-popper] {
130
+ top: 0;
131
+ right: auto;
132
+ left: 100%;
133
+ margin-top: 0;
134
+ margin-left: var(--#{$prefix}dropdown-spacer);
135
+ }
136
+
137
+ .dropdown-toggle {
138
+ @include caret(end);
139
+ &::after {
140
+ vertical-align: 0;
141
+ }
142
+ }
143
+ }
144
+
145
+ .dropstart {
146
+ .dropdown-menu[data-bs-popper] {
147
+ top: 0;
148
+ right: 100%;
149
+ left: auto;
150
+ margin-top: 0;
151
+ margin-right: var(--#{$prefix}dropdown-spacer);
152
+ }
153
+
154
+ .dropdown-toggle {
155
+ @include caret(start);
156
+ &::before {
157
+ vertical-align: 0;
158
+ }
159
+ }
160
+ }
161
+
162
+
163
+ // Dividers (basically an `<hr>`) within the dropdown
164
+ .dropdown-divider {
165
+ height: 0;
166
+ margin: var(--#{$prefix}dropdown-divider-margin-y) 0;
167
+ overflow: hidden;
168
+ border-top: 1px solid var(--#{$prefix}dropdown-divider-bg);
169
+ opacity: 1; // Revisit in v6 to de-dupe styles that conflict with <hr> element
170
+ }
171
+
172
+ // Links, buttons, and more within the dropdown menu
173
+ //
174
+ // `<button>`-specific styles are denoted with `// For <button>s`
175
+ .dropdown-item {
176
+ display: block;
177
+ width: 100%; // For `<button>`s
178
+ padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
179
+ clear: both;
180
+ font-weight: $font-weight-normal;
181
+ color: var(--#{$prefix}dropdown-link-color);
182
+ text-align: inherit; // For `<button>`s
183
+ text-decoration: if($link-decoration == none, null, none);
184
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
185
+ background-color: transparent; // For `<button>`s
186
+ border: 0; // For `<button>`s
187
+
188
+ &:hover,
189
+ &:focus {
190
+ color: var(--#{$prefix}dropdown-link-hover-color);
191
+ text-decoration: if($link-hover-decoration == underline, none, null);
192
+ @include gradient-bg(var(--#{$prefix}dropdown-link-hover-bg));
193
+ }
194
+
195
+ &.active,
196
+ &:active {
197
+ color: var(--#{$prefix}dropdown-link-active-color);
198
+ text-decoration: none;
199
+ @include gradient-bg(var(--#{$prefix}dropdown-link-active-bg));
200
+ }
201
+
202
+ &.disabled,
203
+ &:disabled {
204
+ color: var(--#{$prefix}dropdown-link-disabled-color);
205
+ pointer-events: none;
206
+ background-color: transparent;
207
+ // Remove CSS gradients if they're enabled
208
+ background-image: if($enable-gradients, none, null);
209
+ }
210
+ }
211
+
212
+ .dropdown-menu.show {
213
+ display: block;
214
+ }
215
+
216
+ // Dropdown section headers
217
+ .dropdown-header {
218
+ display: block;
219
+ padding: var(--#{$prefix}dropdown-header-padding-y) var(--#{$prefix}dropdown-header-padding-x);
220
+ margin-bottom: 0; // for use with heading elements
221
+ @include font-size($font-size-sm);
222
+ color: var(--#{$prefix}dropdown-header-color);
223
+ white-space: nowrap; // as with > li > a
224
+ }
225
+
226
+ // Dropdown text
227
+ .dropdown-item-text {
228
+ display: block;
229
+ padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
230
+ color: var(--#{$prefix}dropdown-link-color);
231
+ }
232
+
233
+ // Dark dropdowns
234
+ .dropdown-menu-dark {
235
+ // scss-docs-start dropdown-dark-css-vars
236
+ --#{$prefix}dropdown-color: #{$dropdown-dark-color};
237
+ --#{$prefix}dropdown-bg: #{$dropdown-dark-bg};
238
+ --#{$prefix}dropdown-border-color: #{$dropdown-dark-border-color};
239
+ --#{$prefix}dropdown-box-shadow: #{$dropdown-dark-box-shadow};
240
+ --#{$prefix}dropdown-link-color: #{$dropdown-dark-link-color};
241
+ --#{$prefix}dropdown-link-hover-color: #{$dropdown-dark-link-hover-color};
242
+ --#{$prefix}dropdown-divider-bg: #{$dropdown-dark-divider-bg};
243
+ --#{$prefix}dropdown-link-hover-bg: #{$dropdown-dark-link-hover-bg};
244
+ --#{$prefix}dropdown-link-active-color: #{$dropdown-dark-link-active-color};
245
+ --#{$prefix}dropdown-link-active-bg: #{$dropdown-dark-link-active-bg};
246
+ --#{$prefix}dropdown-link-disabled-color: #{$dropdown-dark-link-disabled-color};
247
+ --#{$prefix}dropdown-header-color: #{$dropdown-dark-header-color};
248
+ // scss-docs-end dropdown-dark-css-vars
249
+ }