bootstrap-scss 5.1.3 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +5 -5
  3. package/_accordion.scss +146 -118
  4. package/_alert.scss +71 -57
  5. package/_badge.scss +38 -29
  6. package/_breadcrumb.scss +40 -28
  7. package/_button-group.scss +142 -139
  8. package/_buttons.scss +186 -111
  9. package/_card.scss +234 -216
  10. package/_carousel.scss +229 -229
  11. package/_close.scss +40 -40
  12. package/_containers.scss +41 -41
  13. package/_dropdown.scss +248 -240
  14. package/_forms.scss +9 -9
  15. package/_functions.scss +302 -302
  16. package/_grid.scss +33 -33
  17. package/_helpers.scss +10 -9
  18. package/_list-group.scss +191 -174
  19. package/_maps.scss +54 -0
  20. package/_mixins.scss +43 -43
  21. package/_modal.scss +237 -209
  22. package/_nav.scss +172 -139
  23. package/_navbar.scss +276 -335
  24. package/_offcanvas.scss +143 -83
  25. package/_pagination.scss +109 -64
  26. package/_placeholders.scss +51 -51
  27. package/_popover.scss +196 -158
  28. package/_progress.scss +59 -48
  29. package/_reboot.scss +610 -625
  30. package/_root.scss +73 -54
  31. package/_spinners.scss +85 -69
  32. package/_tables.scss +164 -155
  33. package/_toasts.scss +70 -51
  34. package/_tooltip.scss +120 -115
  35. package/_transitions.scss +27 -27
  36. package/_type.scss +106 -104
  37. package/_utilities.scss +647 -630
  38. package/_variables.scss +1633 -1641
  39. package/bootstrap-grid.scss +64 -67
  40. package/bootstrap-reboot.scss +9 -13
  41. package/bootstrap-utilities.scss +15 -18
  42. package/bootstrap.scss +51 -53
  43. package/forms/_floating-labels.scss +74 -63
  44. package/forms/_form-check.scss +175 -152
  45. package/forms/_form-control.scss +194 -219
  46. package/forms/_form-range.scss +91 -91
  47. package/forms/_form-select.scss +71 -72
  48. package/forms/_form-text.scss +11 -11
  49. package/forms/_input-group.scss +129 -121
  50. package/forms/_labels.scss +36 -36
  51. package/forms/_validation.scss +12 -12
  52. package/helpers/_clearfix.scss +3 -3
  53. package/helpers/_color-bg.scss +10 -0
  54. package/helpers/_colored-links.scss +12 -12
  55. package/helpers/_position.scss +36 -30
  56. package/helpers/_ratio.scss +26 -26
  57. package/helpers/_stacks.scss +15 -15
  58. package/helpers/_stretched-link.scss +15 -15
  59. package/helpers/_text-truncation.scss +7 -7
  60. package/helpers/_visually-hidden.scss +8 -8
  61. package/helpers/_vr.scss +8 -8
  62. package/mixins/_alert.scss +15 -11
  63. package/mixins/_backdrop.scss +14 -14
  64. package/mixins/_banner.scss +9 -0
  65. package/mixins/_border-radius.scss +78 -78
  66. package/mixins/_box-shadow.scss +18 -18
  67. package/mixins/_breakpoints.scss +127 -127
  68. package/mixins/_buttons.scss +70 -133
  69. package/mixins/_caret.scss +64 -64
  70. package/mixins/_clearfix.scss +9 -9
  71. package/mixins/_color-scheme.scss +7 -7
  72. package/mixins/_container.scss +11 -9
  73. package/mixins/_forms.scss +152 -144
  74. package/mixins/_gradients.scss +47 -47
  75. package/mixins/_grid.scss +151 -151
  76. package/mixins/_image.scss +16 -16
  77. package/mixins/_list-group.scss +24 -24
  78. package/mixins/_lists.scss +7 -7
  79. package/mixins/_pagination.scss +10 -31
  80. package/mixins/_reset-text.scss +17 -17
  81. package/mixins/_table-variants.scss +24 -21
  82. package/mixins/_transition.scss +26 -26
  83. package/mixins/_utilities.scss +97 -89
  84. package/mixins/_visually-hidden.scss +29 -29
  85. package/package.json +1 -1
  86. package/utilities/_api.scss +47 -47
  87. package/vendor/_rfs.scss +354 -354
package/_card.scss CHANGED
@@ -1,216 +1,234 @@
1
- //
2
- // Base styles
3
- //
4
-
5
- .card {
6
- position: relative;
7
- display: flex;
8
- flex-direction: column;
9
- min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
10
- height: $card-height;
11
- word-wrap: break-word;
12
- background-color: $card-bg;
13
- background-clip: border-box;
14
- border: $card-border-width solid $card-border-color;
15
- @include border-radius($card-border-radius);
16
- @include box-shadow($card-box-shadow);
17
-
18
- > hr {
19
- margin-right: 0;
20
- margin-left: 0;
21
- }
22
-
23
- > .list-group {
24
- border-top: inherit;
25
- border-bottom: inherit;
26
-
27
- &:first-child {
28
- border-top-width: 0;
29
- @include border-top-radius($card-inner-border-radius);
30
- }
31
-
32
- &:last-child {
33
- border-bottom-width: 0;
34
- @include border-bottom-radius($card-inner-border-radius);
35
- }
36
- }
37
-
38
- // Due to specificity of the above selector (`.card > .list-group`), we must
39
- // use a child selector here to prevent double borders.
40
- > .card-header + .list-group,
41
- > .list-group + .card-footer {
42
- border-top: 0;
43
- }
44
- }
45
-
46
- .card-body {
47
- // Enable `flex-grow: 1` for decks and groups so that card blocks take up
48
- // as much space as possible, ensuring footers are aligned to the bottom.
49
- flex: 1 1 auto;
50
- padding: $card-spacer-y $card-spacer-x;
51
- color: $card-color;
52
- }
53
-
54
- .card-title {
55
- margin-bottom: $card-title-spacer-y;
56
- }
57
-
58
- .card-subtitle {
59
- margin-top: -$card-title-spacer-y * .5;
60
- margin-bottom: 0;
61
- }
62
-
63
- .card-text:last-child {
64
- margin-bottom: 0;
65
- }
66
-
67
- .card-link {
68
- &:hover {
69
- text-decoration: if($link-hover-decoration == underline, none, null);
70
- }
71
-
72
- + .card-link {
73
- margin-left: $card-spacer-x;
74
- }
75
- }
76
-
77
- //
78
- // Optional textual caps
79
- //
80
-
81
- .card-header {
82
- padding: $card-cap-padding-y $card-cap-padding-x;
83
- margin-bottom: 0; // Removes the default margin-bottom of <hN>
84
- color: $card-cap-color;
85
- background-color: $card-cap-bg;
86
- border-bottom: $card-border-width solid $card-border-color;
87
-
88
- &:first-child {
89
- @include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
90
- }
91
- }
92
-
93
- .card-footer {
94
- padding: $card-cap-padding-y $card-cap-padding-x;
95
- color: $card-cap-color;
96
- background-color: $card-cap-bg;
97
- border-top: $card-border-width solid $card-border-color;
98
-
99
- &:last-child {
100
- @include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
101
- }
102
- }
103
-
104
-
105
- //
106
- // Header navs
107
- //
108
-
109
- .card-header-tabs {
110
- margin-right: -$card-cap-padding-x * .5;
111
- margin-bottom: -$card-cap-padding-y;
112
- margin-left: -$card-cap-padding-x * .5;
113
- border-bottom: 0;
114
-
115
- @if $nav-tabs-link-active-bg != $card-bg {
116
- .nav-link.active {
117
- background-color: $card-bg;
118
- border-bottom-color: $card-bg;
119
- }
120
- }
121
- }
122
-
123
- .card-header-pills {
124
- margin-right: -$card-cap-padding-x * .5;
125
- margin-left: -$card-cap-padding-x * .5;
126
- }
127
-
128
- // Card image
129
- .card-img-overlay {
130
- position: absolute;
131
- top: 0;
132
- right: 0;
133
- bottom: 0;
134
- left: 0;
135
- padding: $card-img-overlay-padding;
136
- @include border-radius($card-inner-border-radius);
137
- }
138
-
139
- .card-img,
140
- .card-img-top,
141
- .card-img-bottom {
142
- width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
143
- }
144
-
145
- .card-img,
146
- .card-img-top {
147
- @include border-top-radius($card-inner-border-radius);
148
- }
149
-
150
- .card-img,
151
- .card-img-bottom {
152
- @include border-bottom-radius($card-inner-border-radius);
153
- }
154
-
155
-
156
- //
157
- // Card groups
158
- //
159
-
160
- .card-group {
161
- // The child selector allows nested `.card` within `.card-group`
162
- // to display properly.
163
- > .card {
164
- margin-bottom: $card-group-margin;
165
- }
166
-
167
- @include media-breakpoint-up(sm) {
168
- display: flex;
169
- flex-flow: row wrap;
170
- // The child selector allows nested `.card` within `.card-group`
171
- // to display properly.
172
- > .card {
173
- // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
174
- flex: 1 0 0%;
175
- margin-bottom: 0;
176
-
177
- + .card {
178
- margin-left: 0;
179
- border-left: 0;
180
- }
181
-
182
- // Handle rounded corners
183
- @if $enable-rounded {
184
- &:not(:last-child) {
185
- @include border-end-radius(0);
186
-
187
- .card-img-top,
188
- .card-header {
189
- // stylelint-disable-next-line property-disallowed-list
190
- border-top-right-radius: 0;
191
- }
192
- .card-img-bottom,
193
- .card-footer {
194
- // stylelint-disable-next-line property-disallowed-list
195
- border-bottom-right-radius: 0;
196
- }
197
- }
198
-
199
- &:not(:first-child) {
200
- @include border-start-radius(0);
201
-
202
- .card-img-top,
203
- .card-header {
204
- // stylelint-disable-next-line property-disallowed-list
205
- border-top-left-radius: 0;
206
- }
207
- .card-img-bottom,
208
- .card-footer {
209
- // stylelint-disable-next-line property-disallowed-list
210
- border-bottom-left-radius: 0;
211
- }
212
- }
213
- }
214
- }
215
- }
216
- }
1
+ //
2
+ // Base styles
3
+ //
4
+
5
+ .card {
6
+ // scss-docs-start card-css-vars
7
+ --#{$prefix}card-spacer-y: #{$card-spacer-y};
8
+ --#{$prefix}card-spacer-x: #{$card-spacer-x};
9
+ --#{$prefix}card-title-spacer-y: #{$card-title-spacer-y};
10
+ --#{$prefix}card-border-width: #{$card-border-width};
11
+ --#{$prefix}card-border-color: #{$card-border-color};
12
+ --#{$prefix}card-border-radius: #{$card-border-radius};
13
+ --#{$prefix}card-box-shadow: #{$card-box-shadow};
14
+ --#{$prefix}card-inner-border-radius: #{$card-inner-border-radius};
15
+ --#{$prefix}card-cap-padding-y: #{$card-cap-padding-y};
16
+ --#{$prefix}card-cap-padding-x: #{$card-cap-padding-x};
17
+ --#{$prefix}card-cap-bg: #{$card-cap-bg};
18
+ --#{$prefix}card-cap-color: #{$card-cap-color};
19
+ --#{$prefix}card-height: #{$card-height};
20
+ --#{$prefix}card-color: #{$card-color};
21
+ --#{$prefix}card-bg: #{$card-bg};
22
+ --#{$prefix}card-img-overlay-padding: #{$card-img-overlay-padding};
23
+ --#{$prefix}card-group-margin: #{$card-group-margin};
24
+ // scss-docs-end card-css-vars
25
+
26
+ position: relative;
27
+ display: flex;
28
+ flex-direction: column;
29
+ min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
30
+ height: var(--#{$prefix}card-height);
31
+ word-wrap: break-word;
32
+ background-color: var(--#{$prefix}card-bg);
33
+ background-clip: border-box;
34
+ border: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
35
+ @include border-radius(var(--#{$prefix}card-border-radius));
36
+ @include box-shadow(var(--#{$prefix}card-box-shadow));
37
+
38
+ > hr {
39
+ margin-right: 0;
40
+ margin-left: 0;
41
+ }
42
+
43
+ > .list-group {
44
+ border-top: inherit;
45
+ border-bottom: inherit;
46
+
47
+ &:first-child {
48
+ border-top-width: 0;
49
+ @include border-top-radius(var(--#{$prefix}card-inner-border-radius));
50
+ }
51
+
52
+ &:last-child {
53
+ border-bottom-width: 0;
54
+ @include border-bottom-radius(var(--#{$prefix}card-inner-border-radius));
55
+ }
56
+ }
57
+
58
+ // Due to specificity of the above selector (`.card > .list-group`), we must
59
+ // use a child selector here to prevent double borders.
60
+ > .card-header + .list-group,
61
+ > .list-group + .card-footer {
62
+ border-top: 0;
63
+ }
64
+ }
65
+
66
+ .card-body {
67
+ // Enable `flex-grow: 1` for decks and groups so that card blocks take up
68
+ // as much space as possible, ensuring footers are aligned to the bottom.
69
+ flex: 1 1 auto;
70
+ padding: var(--#{$prefix}card-spacer-y) var(--#{$prefix}card-spacer-x);
71
+ color: var(--#{$prefix}card-color);
72
+ }
73
+
74
+ .card-title {
75
+ margin-bottom: var(--#{$prefix}card-title-spacer-y);
76
+ }
77
+
78
+ .card-subtitle {
79
+ margin-top: calc(-.5 * var(--#{$prefix}card-title-spacer-y)); // stylelint-disable-line function-disallowed-list
80
+ margin-bottom: 0;
81
+ }
82
+
83
+ .card-text:last-child {
84
+ margin-bottom: 0;
85
+ }
86
+
87
+ .card-link {
88
+ &:hover {
89
+ text-decoration: if($link-hover-decoration == underline, none, null);
90
+ }
91
+
92
+ + .card-link {
93
+ margin-left: var(--#{$prefix}card-spacer-x);
94
+ }
95
+ }
96
+
97
+ //
98
+ // Optional textual caps
99
+ //
100
+
101
+ .card-header {
102
+ padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x);
103
+ margin-bottom: 0; // Removes the default margin-bottom of <hN>
104
+ color: var(--#{$prefix}card-cap-color);
105
+ background-color: var(--#{$prefix}card-cap-bg);
106
+ border-bottom: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
107
+
108
+ &:first-child {
109
+ @include border-radius(var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius) 0 0);
110
+ }
111
+ }
112
+
113
+ .card-footer {
114
+ padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x);
115
+ color: var(--#{$prefix}card-cap-color);
116
+ background-color: var(--#{$prefix}card-cap-bg);
117
+ border-top: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
118
+
119
+ &:last-child {
120
+ @include border-radius(0 0 var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius));
121
+ }
122
+ }
123
+
124
+
125
+ //
126
+ // Header navs
127
+ //
128
+
129
+ .card-header-tabs {
130
+ margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
131
+ margin-bottom: calc(-1 * var(--#{$prefix}card-cap-padding-y)); // stylelint-disable-line function-disallowed-list
132
+ margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
133
+ border-bottom: 0;
134
+
135
+ .nav-link.active {
136
+ background-color: var(--#{$prefix}card-bg);
137
+ border-bottom-color: var(--#{$prefix}card-bg);
138
+ }
139
+ }
140
+
141
+ .card-header-pills {
142
+ margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
143
+ margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
144
+ }
145
+
146
+ // Card image
147
+ .card-img-overlay {
148
+ position: absolute;
149
+ top: 0;
150
+ right: 0;
151
+ bottom: 0;
152
+ left: 0;
153
+ padding: var(--#{$prefix}card-img-overlay-padding);
154
+ @include border-radius(var(--#{$prefix}card-inner-border-radius));
155
+ }
156
+
157
+ .card-img,
158
+ .card-img-top,
159
+ .card-img-bottom {
160
+ width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
161
+ }
162
+
163
+ .card-img,
164
+ .card-img-top {
165
+ @include border-top-radius(var(--#{$prefix}card-inner-border-radius));
166
+ }
167
+
168
+ .card-img,
169
+ .card-img-bottom {
170
+ @include border-bottom-radius(var(--#{$prefix}card-inner-border-radius));
171
+ }
172
+
173
+
174
+ //
175
+ // Card groups
176
+ //
177
+
178
+ .card-group {
179
+ // The child selector allows nested `.card` within `.card-group`
180
+ // to display properly.
181
+ > .card {
182
+ margin-bottom: var(--#{$prefix}card-group-margin);
183
+ }
184
+
185
+ @include media-breakpoint-up(sm) {
186
+ display: flex;
187
+ flex-flow: row wrap;
188
+ // The child selector allows nested `.card` within `.card-group`
189
+ // to display properly.
190
+ > .card {
191
+ // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
192
+ flex: 1 0 0%;
193
+ margin-bottom: 0;
194
+
195
+ + .card {
196
+ margin-left: 0;
197
+ border-left: 0;
198
+ }
199
+
200
+ // Handle rounded corners
201
+ @if $enable-rounded {
202
+ &:not(:last-child) {
203
+ @include border-end-radius(0);
204
+
205
+ .card-img-top,
206
+ .card-header {
207
+ // stylelint-disable-next-line property-disallowed-list
208
+ border-top-right-radius: 0;
209
+ }
210
+ .card-img-bottom,
211
+ .card-footer {
212
+ // stylelint-disable-next-line property-disallowed-list
213
+ border-bottom-right-radius: 0;
214
+ }
215
+ }
216
+
217
+ &:not(:first-child) {
218
+ @include border-start-radius(0);
219
+
220
+ .card-img-top,
221
+ .card-header {
222
+ // stylelint-disable-next-line property-disallowed-list
223
+ border-top-left-radius: 0;
224
+ }
225
+ .card-img-bottom,
226
+ .card-footer {
227
+ // stylelint-disable-next-line property-disallowed-list
228
+ border-bottom-left-radius: 0;
229
+ }
230
+ }
231
+ }
232
+ }
233
+ }
234
+ }