bootstrap-scss 5.0.2 → 5.1.3

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.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <p align="center">
6
6
  <a href="https://getbootstrap.com/">
7
- <img src="https://getbootstrap.com/docs/5.0/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165">
7
+ <img src="https://getbootstrap.com/docs/5.1/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165">
8
8
  </a>
9
9
  </p>
10
10
 
@@ -13,7 +13,7 @@
13
13
  <p align="center">
14
14
  Sleek, intuitive, and powerful front-end framework for faster and easier web development.
15
15
  <br>
16
- <a href="https://getbootstrap.com/docs/5.0/"><strong>Explore Bootstrap docs »</strong></a>
16
+ <a href="https://getbootstrap.com/docs/5.1/"><strong>Explore Bootstrap docs »</strong></a>
17
17
  <br>
18
18
  <br>
19
19
  <a href="https://github.com/twbs/bootstrap/issues/new?template=bug_report.md">Report bug</a>
@@ -43,7 +43,7 @@ Several quick start options are available:
43
43
  - Install with [npm](https://www.npmjs.com/): `npm install bootstrap-scss`
44
44
  - Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap-scss`
45
45
 
46
- Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
46
+ Read the [Getting started page](https://getbootstrap.com/docs/5.1/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
47
47
 
48
48
  ## Status
49
49
 
@@ -77,7 +77,7 @@ For simplicity, this project will use the same version numbers as Bootstrap.
77
77
 
78
78
  ## Changelog
79
79
 
80
- https://blog.getbootstrap.com/2021/06/22/bootstrap-5-0-2/
80
+ https://github.com/twbs/bootstrap/releases/tag/v5.1.3
81
81
 
82
82
  ## Copyright and license
83
83
 
package/_card.scss CHANGED
@@ -13,6 +13,7 @@
13
13
  background-clip: border-box;
14
14
  border: $card-border-width solid $card-border-color;
15
15
  @include border-radius($card-border-radius);
16
+ @include box-shadow($card-box-shadow);
16
17
 
17
18
  > hr {
18
19
  margin-right: 0;
@@ -65,7 +66,7 @@
65
66
 
66
67
  .card-link {
67
68
  &:hover {
68
- text-decoration: none;
69
+ text-decoration: if($link-hover-decoration == underline, none, null);
69
70
  }
70
71
 
71
72
  + .card-link {
package/_functions.scss CHANGED
@@ -32,6 +32,47 @@
32
32
  }
33
33
  }
34
34
 
35
+ // Colors
36
+ @function to-rgb($value) {
37
+ @return red($value), green($value), blue($value);
38
+ }
39
+
40
+ // stylelint-disable scss/dollar-variable-pattern
41
+ @function rgba-css-var($identifier, $target) {
42
+ @if $identifier == "body" and $target == "bg" {
43
+ @return rgba(var(--#{$variable-prefix}#{$identifier}-bg-rgb), var(--#{$variable-prefix}#{$target}-opacity));
44
+ } @if $identifier == "body" and $target == "text" {
45
+ @return rgba(var(--#{$variable-prefix}#{$identifier}-color-rgb), var(--#{$variable-prefix}#{$target}-opacity));
46
+ } @else {
47
+ @return rgba(var(--#{$variable-prefix}#{$identifier}-rgb), var(--#{$variable-prefix}#{$target}-opacity));
48
+ }
49
+ }
50
+
51
+ @function map-loop($map, $func, $args...) {
52
+ $_map: ();
53
+
54
+ @each $key, $value in $map {
55
+ // allow to pass the $key and $value of the map as an function argument
56
+ $_args: ();
57
+ @each $arg in $args {
58
+ $_args: append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg)));
59
+ }
60
+
61
+ $_map: map-merge($_map, ($key: call(get-function($func), $_args...)));
62
+ }
63
+
64
+ @return $_map;
65
+ }
66
+ // stylelint-enable scss/dollar-variable-pattern
67
+
68
+ @function varify($list) {
69
+ $result: null;
70
+ @each $entry in $list {
71
+ $result: append($result, var(--#{$variable-prefix}#{$entry}), space);
72
+ }
73
+ @return $result;
74
+ }
75
+
35
76
  // Internal Bootstrap function to turn maps into its negative variant.
36
77
  // It prefixes the keys with `n` and makes the value negative.
37
78
  @function negativify-map($map) {
@@ -55,6 +96,16 @@
55
96
  @return $result;
56
97
  }
57
98
 
99
+ // Merge multiple maps
100
+ @function map-merge-multiple($maps...) {
101
+ $merged-maps: ();
102
+
103
+ @each $map in $maps {
104
+ $merged-maps: map-merge($merged-maps, $map);
105
+ }
106
+ @return $merged-maps;
107
+ }
108
+
58
109
  // Replace `$search` with `$replace` in `$string`
59
110
  // Used on our SVG icon backgrounds for custom forms.
60
111
  //
@@ -181,14 +232,6 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
181
232
  @return $value1 + $value2;
182
233
  }
183
234
 
184
- @if type-of($value1) != number {
185
- $value1: unquote("(") + $value1 + unquote(")");
186
- }
187
-
188
- @if type-of($value2) != number {
189
- $value2: unquote("(") + $value2 + unquote(")");
190
- }
191
-
192
235
  @return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
193
236
  }
194
237
 
@@ -209,10 +252,6 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
209
252
  @return $value1 - $value2;
210
253
  }
211
254
 
212
- @if type-of($value1) != number {
213
- $value1: unquote("(") + $value1 + unquote(")");
214
- }
215
-
216
255
  @if type-of($value2) != number {
217
256
  $value2: unquote("(") + $value2 + unquote(")");
218
257
  }
package/_grid.scss CHANGED
@@ -12,6 +12,17 @@
12
12
  }
13
13
  }
14
14
 
15
+ @if $enable-cssgrid {
16
+ .grid {
17
+ display: grid;
18
+ grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);
19
+ grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);
20
+ gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});
21
+
22
+ @include make-cssgrid();
23
+ }
24
+ }
25
+
15
26
 
16
27
  // Columns
17
28
  //
package/_helpers.scss CHANGED
@@ -2,6 +2,8 @@
2
2
  @import "helpers/colored-links";
3
3
  @import "helpers/ratio";
4
4
  @import "helpers/position";
5
+ @import "helpers/stacks";
5
6
  @import "helpers/visually-hidden";
6
7
  @import "helpers/stretched-link";
7
8
  @import "helpers/text-truncation";
9
+ @import "helpers/vr";
package/_mixins.scss CHANGED
@@ -22,6 +22,7 @@
22
22
 
23
23
  // Components
24
24
  @import "mixins/alert";
25
+ @import "mixins/backdrop";
25
26
  @import "mixins/buttons";
26
27
  @import "mixins/caret";
27
28
  @import "mixins/pagination";
package/_modal.scss CHANGED
@@ -85,17 +85,7 @@
85
85
 
86
86
  // Modal background
87
87
  .modal-backdrop {
88
- position: fixed;
89
- top: 0;
90
- left: 0;
91
- z-index: $zindex-modal-backdrop;
92
- width: 100vw;
93
- height: 100vh;
94
- background-color: $modal-backdrop-bg;
95
-
96
- // Fade for backdrop
97
- &.fade { opacity: 0; }
98
- &.show { opacity: $modal-backdrop-opacity; }
88
+ @include overlay-backdrop($zindex-modal-backdrop, $modal-backdrop-bg, $modal-backdrop-opacity);
99
89
  }
100
90
 
101
91
  // Modal header
package/_navbar.scss CHANGED
@@ -193,13 +193,42 @@
193
193
  .navbar-toggler {
194
194
  display: none;
195
195
  }
196
+
197
+ .offcanvas-header {
198
+ display: none;
199
+ }
200
+
201
+ .offcanvas {
202
+ position: inherit;
203
+ bottom: 0;
204
+ z-index: 1000;
205
+ flex-grow: 1;
206
+ visibility: visible !important; // stylelint-disable-line declaration-no-important
207
+ background-color: transparent;
208
+ border-right: 0;
209
+ border-left: 0;
210
+ @include transition(none);
211
+ transform: none;
212
+ }
213
+ .offcanvas-top,
214
+ .offcanvas-bottom {
215
+ height: auto;
216
+ border-top: 0;
217
+ border-bottom: 0;
218
+ }
219
+
220
+ .offcanvas-body {
221
+ display: flex;
222
+ flex-grow: 0;
223
+ padding: 0;
224
+ overflow-y: visible;
225
+ }
196
226
  }
197
227
  }
198
228
  }
199
229
  }
200
230
  // scss-docs-end navbar-expand-loop
201
231
 
202
-
203
232
  // Navbar themes
204
233
  //
205
234
  // Styles for switching between navbars with light or dark background.
package/_offcanvas.scss CHANGED
@@ -14,6 +14,10 @@
14
14
  @include transition(transform $offcanvas-transition-duration ease-in-out);
15
15
  }
16
16
 
17
+ .offcanvas-backdrop {
18
+ @include overlay-backdrop($zindex-offcanvas-backdrop, $offcanvas-backdrop-bg, $offcanvas-backdrop-opacity);
19
+ }
20
+
17
21
  .offcanvas-header {
18
22
  display: flex;
19
23
  align-items: center;
@@ -0,0 +1,51 @@
1
+ .placeholder {
2
+ display: inline-block;
3
+ min-height: 1em;
4
+ vertical-align: middle;
5
+ cursor: wait;
6
+ background-color: currentColor;
7
+ opacity: $placeholder-opacity-max;
8
+
9
+ &.btn::before {
10
+ display: inline-block;
11
+ content: "";
12
+ }
13
+ }
14
+
15
+ // Sizing
16
+ .placeholder-xs {
17
+ min-height: .6em;
18
+ }
19
+
20
+ .placeholder-sm {
21
+ min-height: .8em;
22
+ }
23
+
24
+ .placeholder-lg {
25
+ min-height: 1.2em;
26
+ }
27
+
28
+ // Animation
29
+ .placeholder-glow {
30
+ .placeholder {
31
+ animation: placeholder-glow 2s ease-in-out infinite;
32
+ }
33
+ }
34
+
35
+ @keyframes placeholder-glow {
36
+ 50% {
37
+ opacity: $placeholder-opacity-min;
38
+ }
39
+ }
40
+
41
+ .placeholder-wave {
42
+ mask-image: linear-gradient(130deg, $black 55%, rgba(0, 0, 0, (1 - $placeholder-opacity-min)) 75%, $black 95%);
43
+ mask-size: 200% 100%;
44
+ animation: placeholder-wave 2s linear infinite;
45
+ }
46
+
47
+ @keyframes placeholder-wave {
48
+ 100% {
49
+ mask-position: -200% 0%;
50
+ }
51
+ }
package/_reboot.scss CHANGED
@@ -26,7 +26,9 @@
26
26
  // null by default, thus nothing is generated.
27
27
 
28
28
  :root {
29
- font-size: $font-size-root;
29
+ @if $font-size-root != null {
30
+ font-size: var(--#{$variable-prefix}root-font-size);
31
+ }
30
32
 
31
33
  @if $enable-smooth-scroll {
32
34
  @media (prefers-reduced-motion: no-preference) {
@@ -43,18 +45,20 @@
43
45
  // 3. Prevent adjustments of font size after orientation changes in iOS.
44
46
  // 4. Change the default tap highlight to be completely transparent in iOS.
45
47
 
48
+ // scss-docs-start reboot-body-rules
46
49
  body {
47
50
  margin: 0; // 1
48
- font-family: $font-family-base;
49
- @include font-size($font-size-base);
50
- font-weight: $font-weight-base;
51
- line-height: $line-height-base;
52
- color: $body-color;
53
- text-align: $body-text-align;
54
- background-color: $body-bg; // 2
51
+ font-family: var(--#{$variable-prefix}body-font-family);
52
+ @include font-size(var(--#{$variable-prefix}body-font-size));
53
+ font-weight: var(--#{$variable-prefix}body-font-weight);
54
+ line-height: var(--#{$variable-prefix}body-line-height);
55
+ color: var(--#{$variable-prefix}body-color);
56
+ text-align: var(--#{$variable-prefix}body-text-align);
57
+ background-color: var(--#{$variable-prefix}body-bg); // 2
55
58
  -webkit-text-size-adjust: 100%; // 3
56
59
  -webkit-tap-highlight-color: rgba($black, 0); // 4
57
60
  }
61
+ // scss-docs-end reboot-body-rules
58
62
 
59
63
 
60
64
  // Content grouping
package/_root.scss CHANGED
@@ -1,16 +1,54 @@
1
1
  :root {
2
- // Custom variable values only support SassScript inside `#{}`.
2
+ // Note: Custom variable values only support SassScript inside `#{}`.
3
+
4
+ // Colors
5
+ //
6
+ // Generate palettes for full colors, grays, and theme colors.
7
+
3
8
  @each $color, $value in $colors {
4
9
  --#{$variable-prefix}#{$color}: #{$value};
5
10
  }
6
11
 
12
+ @each $color, $value in $grays {
13
+ --#{$variable-prefix}gray-#{$color}: #{$value};
14
+ }
15
+
7
16
  @each $color, $value in $theme-colors {
8
17
  --#{$variable-prefix}#{$color}: #{$value};
9
18
  }
10
19
 
11
- // Use `inspect` for lists so that quoted items keep the quotes.
20
+ @each $color, $value in $theme-colors-rgb {
21
+ --#{$variable-prefix}#{$color}-rgb: #{$value};
22
+ }
23
+
24
+ --#{$variable-prefix}white-rgb: #{to-rgb($white)};
25
+ --#{$variable-prefix}black-rgb: #{to-rgb($black)};
26
+ --#{$variable-prefix}body-color-rgb: #{to-rgb($body-color)};
27
+ --#{$variable-prefix}body-bg-rgb: #{to-rgb($body-bg)};
28
+
29
+ // Fonts
30
+
31
+ // Note: Use `inspect` for lists so that quoted items keep the quotes.
12
32
  // See https://github.com/sass/sass/issues/2383#issuecomment-336349172
13
33
  --#{$variable-prefix}font-sans-serif: #{inspect($font-family-sans-serif)};
14
34
  --#{$variable-prefix}font-monospace: #{inspect($font-family-monospace)};
15
35
  --#{$variable-prefix}gradient: #{$gradient};
36
+
37
+ // Root and body
38
+ // stylelint-disable custom-property-empty-line-before
39
+ // scss-docs-start root-body-variables
40
+ @if $font-size-root != null {
41
+ --#{$variable-prefix}root-font-size: #{$font-size-root};
42
+ }
43
+ --#{$variable-prefix}body-font-family: #{$font-family-base};
44
+ --#{$variable-prefix}body-font-size: #{$font-size-base};
45
+ --#{$variable-prefix}body-font-weight: #{$font-weight-base};
46
+ --#{$variable-prefix}body-line-height: #{$line-height-base};
47
+ --#{$variable-prefix}body-color: #{$body-color};
48
+ @if $body-text-align != null {
49
+ --#{$variable-prefix}body-text-align: #{$body-text-align};
50
+ }
51
+ --#{$variable-prefix}body-bg: #{$body-bg};
52
+ // scss-docs-end root-body-variables
53
+ // stylelint-enable custom-property-empty-line-before
16
54
  }
package/_tables.scss CHANGED
@@ -39,8 +39,8 @@
39
39
  }
40
40
 
41
41
  // Highlight border color between thead, tbody and tfoot.
42
- > :not(:last-child) > :last-child > * {
43
- border-bottom-color: $table-group-separator-color;
42
+ > :not(:first-child) {
43
+ border-top: (2 * $table-border-width) solid $table-group-separator-color;
44
44
  }
45
45
  }
46
46
 
@@ -91,6 +91,10 @@
91
91
  > :not(caption) > * > * {
92
92
  border-bottom-width: 0;
93
93
  }
94
+
95
+ > :not(:first-child) {
96
+ border-top-width: 0;
97
+ }
94
98
  }
95
99
 
96
100
  // Zebra-striping
@@ -98,7 +102,7 @@
98
102
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
99
103
 
100
104
  .table-striped {
101
- > tbody > tr:nth-of-type(#{$table-striped-order}) {
105
+ > tbody > tr:nth-of-type(#{$table-striped-order}) > * {
102
106
  --#{$variable-prefix}table-accent-bg: var(--#{$variable-prefix}table-striped-bg);
103
107
  color: var(--#{$variable-prefix}table-striped-color);
104
108
  }
@@ -118,7 +122,7 @@
118
122
  // Placed here since it has to come after the potential zebra striping
119
123
 
120
124
  .table-hover {
121
- > tbody > tr:hover {
125
+ > tbody > tr:hover > * {
122
126
  --#{$variable-prefix}table-accent-bg: var(--#{$variable-prefix}table-hover-bg);
123
127
  color: var(--#{$variable-prefix}table-hover-color);
124
128
  }
package/_toasts.scss CHANGED
@@ -10,11 +10,11 @@
10
10
  box-shadow: $toast-box-shadow;
11
11
  @include border-radius($toast-border-radius);
12
12
 
13
- &:not(.showing):not(.show) {
13
+ &.showing {
14
14
  opacity: 0;
15
15
  }
16
16
 
17
- &.hide {
17
+ &:not(.show) {
18
18
  display: none;
19
19
  }
20
20
  }
package/_transitions.scss CHANGED
@@ -17,5 +17,11 @@
17
17
  height: 0;
18
18
  overflow: hidden;
19
19
  @include transition($transition-collapse);
20
+
21
+ &.collapse-horizontal {
22
+ width: 0;
23
+ height: auto;
24
+ @include transition($transition-collapse-width);
25
+ }
20
26
  }
21
27
  // scss-docs-end collapse-classes
package/_utilities.scss CHANGED
@@ -24,6 +24,19 @@ $utilities: map-merge(
24
24
  )
25
25
  ),
26
26
  // scss-docs-end utils-float
27
+ // Opacity utilities
28
+ // scss-docs-start utils-opacity
29
+ "opacity": (
30
+ property: opacity,
31
+ values: (
32
+ 0: 0,
33
+ 25: .25,
34
+ 50: .5,
35
+ 75: .75,
36
+ 100: 1,
37
+ )
38
+ ),
39
+ // scss-docs-end utils-opacity
27
40
  // scss-docs-start utils-overflow
28
41
  "overflow": (
29
42
  property: overflow,
@@ -501,32 +514,55 @@ $utilities: map-merge(
501
514
  "color": (
502
515
  property: color,
503
516
  class: text,
517
+ local-vars: (
518
+ "text-opacity": 1
519
+ ),
504
520
  values: map-merge(
505
- $theme-colors,
521
+ $utilities-text-colors,
506
522
  (
507
- "white": $white,
508
- "body": $body-color,
509
523
  "muted": $text-muted,
510
- "black-50": rgba($black, .5),
511
- "white-50": rgba($white, .5),
524
+ "black-50": rgba($black, .5), // deprecated
525
+ "white-50": rgba($white, .5), // deprecated
512
526
  "reset": inherit,
513
527
  )
514
528
  )
515
529
  ),
530
+ "text-opacity": (
531
+ css-var: true,
532
+ class: text-opacity,
533
+ values: (
534
+ 25: .25,
535
+ 50: .5,
536
+ 75: .75,
537
+ 100: 1
538
+ )
539
+ ),
516
540
  // scss-docs-end utils-color
517
541
  // scss-docs-start utils-bg-color
518
542
  "background-color": (
519
543
  property: background-color,
520
544
  class: bg,
545
+ local-vars: (
546
+ "bg-opacity": 1
547
+ ),
521
548
  values: map-merge(
522
- $theme-colors,
549
+ $utilities-bg-colors,
523
550
  (
524
- "body": $body-bg,
525
- "white": $white,
526
551
  "transparent": transparent
527
552
  )
528
553
  )
529
554
  ),
555
+ "bg-opacity": (
556
+ css-var: true,
557
+ class: bg-opacity,
558
+ values: (
559
+ 10: .1,
560
+ 25: .25,
561
+ 50: .5,
562
+ 75: .75,
563
+ 100: 1
564
+ )
565
+ ),
530
566
  // scss-docs-end utils-bg-color
531
567
  "gradient": (
532
568
  property: background-image,
package/_variables.scss CHANGED
@@ -90,6 +90,10 @@ $theme-colors: (
90
90
  ) !default;
91
91
  // scss-docs-end theme-colors-map
92
92
 
93
+ // scss-docs-start theme-colors-rgb
94
+ $theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value") !default;
95
+ // scss-docs-end theme-colors-rgb
96
+
93
97
  // The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.0 are 3, 4.5 and 7.
94
98
  // See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast
95
99
  $min-contrast-ratio: 4.5 !default;
@@ -198,6 +202,126 @@ $cyan-600: shade-color($cyan, 20%) !default;
198
202
  $cyan-700: shade-color($cyan, 40%) !default;
199
203
  $cyan-800: shade-color($cyan, 60%) !default;
200
204
  $cyan-900: shade-color($cyan, 80%) !default;
205
+
206
+ $blues: (
207
+ "blue-100": $blue-100,
208
+ "blue-200": $blue-200,
209
+ "blue-300": $blue-300,
210
+ "blue-400": $blue-400,
211
+ "blue-500": $blue-500,
212
+ "blue-600": $blue-600,
213
+ "blue-700": $blue-700,
214
+ "blue-800": $blue-800,
215
+ "blue-900": $blue-900
216
+ ) !default;
217
+
218
+ $indigos: (
219
+ "indigo-100": $indigo-100,
220
+ "indigo-200": $indigo-200,
221
+ "indigo-300": $indigo-300,
222
+ "indigo-400": $indigo-400,
223
+ "indigo-500": $indigo-500,
224
+ "indigo-600": $indigo-600,
225
+ "indigo-700": $indigo-700,
226
+ "indigo-800": $indigo-800,
227
+ "indigo-900": $indigo-900
228
+ ) !default;
229
+
230
+ $purples: (
231
+ "purple-100": $purple-200,
232
+ "purple-200": $purple-100,
233
+ "purple-300": $purple-300,
234
+ "purple-400": $purple-400,
235
+ "purple-500": $purple-500,
236
+ "purple-600": $purple-600,
237
+ "purple-700": $purple-700,
238
+ "purple-800": $purple-800,
239
+ "purple-900": $purple-900
240
+ ) !default;
241
+
242
+ $pinks: (
243
+ "pink-100": $pink-100,
244
+ "pink-200": $pink-200,
245
+ "pink-300": $pink-300,
246
+ "pink-400": $pink-400,
247
+ "pink-500": $pink-500,
248
+ "pink-600": $pink-600,
249
+ "pink-700": $pink-700,
250
+ "pink-800": $pink-800,
251
+ "pink-900": $pink-900
252
+ ) !default;
253
+
254
+ $reds: (
255
+ "red-100": $red-100,
256
+ "red-200": $red-200,
257
+ "red-300": $red-300,
258
+ "red-400": $red-400,
259
+ "red-500": $red-500,
260
+ "red-600": $red-600,
261
+ "red-700": $red-700,
262
+ "red-800": $red-800,
263
+ "red-900": $red-900
264
+ ) !default;
265
+
266
+ $oranges: (
267
+ "orange-100": $orange-100,
268
+ "orange-200": $orange-200,
269
+ "orange-300": $orange-300,
270
+ "orange-400": $orange-400,
271
+ "orange-500": $orange-500,
272
+ "orange-600": $orange-600,
273
+ "orange-700": $orange-700,
274
+ "orange-800": $orange-800,
275
+ "orange-900": $orange-900
276
+ ) !default;
277
+
278
+ $yellows: (
279
+ "yellow-100": $yellow-100,
280
+ "yellow-200": $yellow-200,
281
+ "yellow-300": $yellow-300,
282
+ "yellow-400": $yellow-400,
283
+ "yellow-500": $yellow-500,
284
+ "yellow-600": $yellow-600,
285
+ "yellow-700": $yellow-700,
286
+ "yellow-800": $yellow-800,
287
+ "yellow-900": $yellow-900
288
+ ) !default;
289
+
290
+ $greens: (
291
+ "green-100": $green-100,
292
+ "green-200": $green-200,
293
+ "green-300": $green-300,
294
+ "green-400": $green-400,
295
+ "green-500": $green-500,
296
+ "green-600": $green-600,
297
+ "green-700": $green-700,
298
+ "green-800": $green-800,
299
+ "green-900": $green-900
300
+ ) !default;
301
+
302
+ $teals: (
303
+ "teal-100": $teal-100,
304
+ "teal-200": $teal-200,
305
+ "teal-300": $teal-300,
306
+ "teal-400": $teal-400,
307
+ "teal-500": $teal-500,
308
+ "teal-600": $teal-600,
309
+ "teal-700": $teal-700,
310
+ "teal-800": $teal-800,
311
+ "teal-900": $teal-900
312
+ ) !default;
313
+
314
+ $cyans: (
315
+ "cyan-100": $cyan-100,
316
+ "cyan-200": $cyan-200,
317
+ "cyan-300": $cyan-300,
318
+ "cyan-400": $cyan-400,
319
+ "cyan-500": $cyan-500,
320
+ "cyan-600": $cyan-600,
321
+ "cyan-700": $cyan-700,
322
+ "cyan-800": $cyan-800,
323
+ "cyan-900": $cyan-900
324
+ ) !default;
201
325
  // fusv-enable
202
326
 
203
327
  // Characters which are escaped by the escape-svg function
@@ -221,6 +345,7 @@ $enable-transitions: true !default;
221
345
  $enable-reduced-motion: true !default;
222
346
  $enable-smooth-scroll: true !default;
223
347
  $enable-grid-classes: true !default;
348
+ $enable-cssgrid: false !default;
224
349
  $enable-button-pointers: true !default;
225
350
  $enable-rfs: true !default;
226
351
  $enable-validation-icons: true !default;
@@ -280,6 +405,38 @@ $body-bg: $white !default;
280
405
  $body-color: $gray-900 !default;
281
406
  $body-text-align: null !default;
282
407
 
408
+ // Utilities maps
409
+ //
410
+ // Extends the default `$theme-colors` maps to help create our utilities.
411
+
412
+ // Come v6, we'll de-dupe these variables. Until then, for backward compatibility, we keep them to reassign.
413
+ // scss-docs-start utilities-colors
414
+ $utilities-colors: $theme-colors-rgb !default;
415
+ // scss-docs-end utilities-colors
416
+
417
+ // scss-docs-start utilities-text-colors
418
+ $utilities-text: map-merge(
419
+ $utilities-colors,
420
+ (
421
+ "black": to-rgb($black),
422
+ "white": to-rgb($white),
423
+ "body": to-rgb($body-color)
424
+ )
425
+ ) !default;
426
+ $utilities-text-colors: map-loop($utilities-text, rgba-css-var, "$key", "text") !default;
427
+ // scss-docs-end utilities-text-colors
428
+
429
+ // scss-docs-start utilities-bg-colors
430
+ $utilities-bg: map-merge(
431
+ $utilities-colors,
432
+ (
433
+ "black": to-rgb($black),
434
+ "white": to-rgb($white),
435
+ "body": to-rgb($body-bg)
436
+ )
437
+ ) !default;
438
+ $utilities-bg-colors: map-loop($utilities-bg, rgba-css-var, "$key", "bg") !default;
439
+ // scss-docs-end utilities-bg-colors
283
440
 
284
441
  // Links
285
442
  //
@@ -397,6 +554,7 @@ $transition-base: all .2s ease-in-out !default;
397
554
  $transition-fade: opacity .15s linear !default;
398
555
  // scss-docs-start collapse-transition
399
556
  $transition-collapse: height .35s ease !default;
557
+ $transition-collapse-width: width .35s ease !default;
400
558
  // scss-docs-end collapse-transition
401
559
 
402
560
  // stylelint-disable function-disallowed-list
@@ -692,7 +850,7 @@ $input-padding-y-lg: $input-btn-padding-y-lg !default;
692
850
  $input-padding-x-lg: $input-btn-padding-x-lg !default;
693
851
  $input-font-size-lg: $input-btn-font-size-lg !default;
694
852
 
695
- $input-bg: $white !default;
853
+ $input-bg: $body-bg !default;
696
854
  $input-disabled-bg: $gray-200 !default;
697
855
  $input-disabled-border-color: null !default;
698
856
 
@@ -725,6 +883,8 @@ $input-height-sm: add($input-line-height * 1em, add($input
725
883
  $input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default;
726
884
 
727
885
  $input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
886
+
887
+ $form-color-width: 3rem !default;
728
888
  // scss-docs-end form-input-variables
729
889
 
730
890
  // scss-docs-start form-check-variables
@@ -764,7 +924,7 @@ $form-check-inline-margin-end: 1rem !default;
764
924
  // scss-docs-end form-check-variables
765
925
 
766
926
  // scss-docs-start form-switch-variables
767
- $form-switch-color: rgba(0, 0, 0, .25) !default;
927
+ $form-switch-color: rgba($black, .25) !default;
768
928
  $form-switch-width: 2em !default;
769
929
  $form-switch-padding-start: $form-switch-width + .5em !default;
770
930
  $form-switch-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-color}'/></svg>") !default;
@@ -812,7 +972,7 @@ $form-select-feedback-icon-size: $input-height-inner-half $input-height-i
812
972
 
813
973
  $form-select-border-width: $input-border-width !default;
814
974
  $form-select-border-color: $input-border-color !default;
815
- $form-select-border-radius: $border-radius !default;
975
+ $form-select-border-radius: $input-border-radius !default;
816
976
  $form-select-box-shadow: $box-shadow-inset !default;
817
977
 
818
978
  $form-select-focus-border-color: $input-focus-border-color !default;
@@ -822,10 +982,12 @@ $form-select-focus-box-shadow: 0 0 0 $form-select-focus-width $input-btn-focu
822
982
  $form-select-padding-y-sm: $input-padding-y-sm !default;
823
983
  $form-select-padding-x-sm: $input-padding-x-sm !default;
824
984
  $form-select-font-size-sm: $input-font-size-sm !default;
985
+ $form-select-border-radius-sm: $input-border-radius-sm !default;
825
986
 
826
987
  $form-select-padding-y-lg: $input-padding-y-lg !default;
827
988
  $form-select-padding-x-lg: $input-padding-x-lg !default;
828
989
  $form-select-font-size-lg: $input-font-size-lg !default;
990
+ $form-select-border-radius-lg: $input-border-radius-lg !default;
829
991
 
830
992
  $form-select-transition: $input-transition !default;
831
993
  // scss-docs-end form-select-variables
@@ -906,9 +1068,10 @@ $form-validation-states: (
906
1068
  $zindex-dropdown: 1000 !default;
907
1069
  $zindex-sticky: 1020 !default;
908
1070
  $zindex-fixed: 1030 !default;
909
- $zindex-modal-backdrop: 1040 !default;
910
- $zindex-offcanvas: 1050 !default;
911
- $zindex-modal: 1060 !default;
1071
+ $zindex-offcanvas-backdrop: 1040 !default;
1072
+ $zindex-offcanvas: 1045 !default;
1073
+ $zindex-modal-backdrop: 1050 !default;
1074
+ $zindex-modal: 1055 !default;
912
1075
  $zindex-popover: 1070 !default;
913
1076
  $zindex-tooltip: 1080 !default;
914
1077
  // scss-docs-end zindex-stack
@@ -1006,7 +1169,7 @@ $dropdown-divider-margin-y: $spacer * .5 !default;
1006
1169
  $dropdown-box-shadow: $box-shadow !default;
1007
1170
 
1008
1171
  $dropdown-link-color: $gray-900 !default;
1009
- $dropdown-link-hover-color: shade-color($gray-900, 10%) !default;
1172
+ $dropdown-link-hover-color: shade-color($dropdown-link-color, 10%) !default;
1010
1173
  $dropdown-link-hover-bg: $gray-200 !default;
1011
1174
 
1012
1175
  $dropdown-link-active-color: $component-active-color !default;
@@ -1078,6 +1241,13 @@ $pagination-border-radius-lg: $border-radius-lg !default;
1078
1241
  // scss-docs-end pagination-variables
1079
1242
 
1080
1243
 
1244
+ // Placeholders
1245
+
1246
+ // scss-docs-start placeholders
1247
+ $placeholder-opacity-max: .5 !default;
1248
+ $placeholder-opacity-min: .2 !default;
1249
+ // scss-docs-end placeholders
1250
+
1081
1251
  // Cards
1082
1252
 
1083
1253
  // scss-docs-start card-variables
@@ -1085,8 +1255,9 @@ $card-spacer-y: $spacer !default;
1085
1255
  $card-spacer-x: $spacer !default;
1086
1256
  $card-title-spacer-y: $spacer * .5 !default;
1087
1257
  $card-border-width: $border-width !default;
1088
- $card-border-radius: $border-radius !default;
1089
1258
  $card-border-color: rgba($black, .125) !default;
1259
+ $card-border-radius: $border-radius !default;
1260
+ $card-box-shadow: null !default;
1090
1261
  $card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default;
1091
1262
  $card-cap-padding-y: $card-spacer-y * .5 !default;
1092
1263
  $card-cap-padding-x: $card-spacer-x !default;
@@ -1126,7 +1297,7 @@ $accordion-button-focus-border-color: $input-focus-border-color !default;
1126
1297
  $accordion-button-focus-box-shadow: $btn-focus-box-shadow !default;
1127
1298
 
1128
1299
  $accordion-icon-width: 1.25rem !default;
1129
- $accordion-icon-color: $accordion-color !default;
1300
+ $accordion-icon-color: $accordion-button-color !default;
1130
1301
  $accordion-icon-active-color: $accordion-button-active-color !default;
1131
1302
  $accordion-icon-transition: transform .2s ease-in-out !default;
1132
1303
  $accordion-icon-transform: rotate(-180deg) !default;
@@ -1203,14 +1374,14 @@ $toast-font-size: .875rem !default;
1203
1374
  $toast-color: null !default;
1204
1375
  $toast-background-color: rgba($white, .85) !default;
1205
1376
  $toast-border-width: 1px !default;
1206
- $toast-border-color: rgba(0, 0, 0, .1) !default;
1377
+ $toast-border-color: rgba($black, .1) !default;
1207
1378
  $toast-border-radius: $border-radius !default;
1208
1379
  $toast-box-shadow: $box-shadow !default;
1209
1380
  $toast-spacing: $container-padding-x !default;
1210
1381
 
1211
1382
  $toast-header-color: $gray-600 !default;
1212
1383
  $toast-header-background-color: rgba($white, .85) !default;
1213
- $toast-header-border-color: rgba(0, 0, 0, .05) !default;
1384
+ $toast-header-border-color: rgba($black, .05) !default;
1214
1385
  // scss-docs-end toast-variables
1215
1386
 
1216
1387
 
@@ -1452,6 +1623,8 @@ $offcanvas-title-line-height: $modal-title-line-height !default;
1452
1623
  $offcanvas-bg-color: $modal-content-bg !default;
1453
1624
  $offcanvas-color: $modal-content-color !default;
1454
1625
  $offcanvas-box-shadow: $modal-content-box-shadow-xs !default;
1626
+ $offcanvas-backdrop-bg: $modal-backdrop-bg !default;
1627
+ $offcanvas-backdrop-opacity: $modal-backdrop-opacity !default;
1455
1628
  // scss-docs-end offcanvas-variables
1456
1629
 
1457
1630
  // Code
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap Grid v5.0.2 (https://getbootstrap.com/)
2
+ * Bootstrap Grid v5.1.3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors
4
4
  * Copyright 2011-2021 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -18,6 +18,8 @@ $include-column-box-sizing: true !default;
18
18
 
19
19
  @import "vendor/rfs";
20
20
 
21
+ @import "root";
22
+
21
23
  @import "containers";
22
24
  @import "grid";
23
25
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap Reboot v5.0.2 (https://getbootstrap.com/)
2
+ * Bootstrap Reboot v5.1.3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors
4
4
  * Copyright 2011-2021 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -8,8 +8,6 @@
8
8
 
9
9
  @import "functions";
10
10
  @import "variables";
11
- // Prevent the usage of custom properties since we don't add them to `:root` in reboot
12
- $font-family-base: $font-family-sans-serif; // stylelint-disable-line scss/dollar-variable-default
13
- $font-family-code: $font-family-monospace; // stylelint-disable-line scss/dollar-variable-default
14
11
  @import "mixins";
12
+ @import "root";
15
13
  @import "reboot";
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap Utilities v5.0.2 (https://getbootstrap.com/)
2
+ * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors
4
4
  * Copyright 2011-2021 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
package/bootstrap.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v5.0.2 (https://getbootstrap.com/)
2
+ * Bootstrap v5.1.3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors
4
4
  * Copyright 2011-2021 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -43,6 +43,7 @@
43
43
  @import "carousel";
44
44
  @import "spinners";
45
45
  @import "offcanvas";
46
+ @import "placeholders";
46
47
 
47
48
  // Helpers
48
49
  @import "helpers";
@@ -199,7 +199,7 @@ textarea {
199
199
  // stylelint-enable selector-no-qualifying-type
200
200
 
201
201
  .form-control-color {
202
- max-width: 3rem;
202
+ width: $form-color-width;
203
203
  height: auto; // Override fixed browser height
204
204
  padding: $input-padding-y;
205
205
 
@@ -60,6 +60,7 @@
60
60
  padding-bottom: $form-select-padding-y-sm;
61
61
  padding-left: $form-select-padding-x-sm;
62
62
  @include font-size($form-select-font-size-sm);
63
+ @include border-radius($form-select-border-radius-sm);
63
64
  }
64
65
 
65
66
  .form-select-lg {
@@ -67,4 +68,5 @@
67
68
  padding-bottom: $form-select-padding-y-lg;
68
69
  padding-left: $form-select-padding-x-lg;
69
70
  @include font-size($form-select-font-size-lg);
71
+ @include border-radius($form-select-border-radius-lg);
70
72
  }
@@ -0,0 +1,15 @@
1
+ // scss-docs-start stacks
2
+ .hstack {
3
+ display: flex;
4
+ flex-direction: row;
5
+ align-items: center;
6
+ align-self: stretch;
7
+ }
8
+
9
+ .vstack {
10
+ display: flex;
11
+ flex: 1 1 auto;
12
+ flex-direction: column;
13
+ align-self: stretch;
14
+ }
15
+ // scss-docs-end stacks
@@ -0,0 +1,8 @@
1
+ .vr {
2
+ display: inline-block;
3
+ align-self: stretch;
4
+ width: 1px;
5
+ min-height: 1em;
6
+ background-color: currentColor;
7
+ opacity: $hr-opacity;
8
+ }
@@ -0,0 +1,14 @@
1
+ // Shared between modals and offcanvases
2
+ @mixin overlay-backdrop($zindex, $backdrop-bg, $backdrop-opacity) {
3
+ position: fixed;
4
+ top: 0;
5
+ left: 0;
6
+ z-index: $zindex;
7
+ width: 100vw;
8
+ height: 100vh;
9
+ background-color: $backdrop-bg;
10
+
11
+ // Fade for backdrop
12
+ &.fade { opacity: 0; }
13
+ &.show { opacity: $backdrop-opacity; }
14
+ }
package/mixins/_grid.scss CHANGED
@@ -7,9 +7,10 @@
7
7
  --#{$variable-prefix}gutter-y: 0;
8
8
  display: flex;
9
9
  flex-wrap: wrap;
10
- margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list
11
- margin-right: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list
12
- margin-left: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list
10
+ // TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed
11
+ margin-top: calc(-1 * var(--#{$variable-prefix}gutter-y)); // stylelint-disable-line function-disallowed-list
12
+ margin-right: calc(-.5 * var(--#{$variable-prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
13
+ margin-left: calc(-.5 * var(--#{$variable-prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
13
14
  }
14
15
 
15
16
  @mixin make-col-ready($gutter: $grid-gutter-width) {
@@ -66,8 +67,8 @@
66
67
 
67
68
  @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
68
69
  @each $breakpoint in map-keys($breakpoints) {
69
- // .row-cols defaults must all appear before .col overrides so they can be overridden.
70
70
  $infix: breakpoint-infix($breakpoint, $breakpoints);
71
+
71
72
  @include media-breakpoint-up($breakpoint, $breakpoints) {
72
73
  // Provide basic `.col-{bp}` classes for equal-width flexbox columns
73
74
  .col#{$infix} {
@@ -85,13 +86,7 @@
85
86
  }
86
87
  }
87
88
  }
88
- }
89
- }
90
-
91
- @each $breakpoint in map-keys($breakpoints) {
92
- $infix: breakpoint-infix($breakpoint, $breakpoints);
93
89
 
94
- @include media-breakpoint-up($breakpoint, $breakpoints) {
95
90
  .col#{$infix}-auto {
96
91
  @include make-col-auto();
97
92
  }
@@ -130,3 +125,27 @@
130
125
  }
131
126
  }
132
127
  }
128
+
129
+ @mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {
130
+ @each $breakpoint in map-keys($breakpoints) {
131
+ $infix: breakpoint-infix($breakpoint, $breakpoints);
132
+
133
+ @include media-breakpoint-up($breakpoint, $breakpoints) {
134
+ @if $columns > 0 {
135
+ @for $i from 1 through $columns {
136
+ .g-col#{$infix}-#{$i} {
137
+ grid-column: auto / span $i;
138
+ }
139
+ }
140
+
141
+ // Start with `1` because `0` is and invalid value.
142
+ // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.
143
+ @for $i from 1 through ($columns - 1) {
144
+ .g-start#{$infix}-#{$i} {
145
+ grid-column-start: $i;
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
@@ -41,25 +41,46 @@
41
41
  }
42
42
  }
43
43
 
44
+ $is-css-var: map-get($utility, css-var);
45
+ $is-local-vars: map-get($utility, local-vars);
44
46
  $is-rtl: map-get($utility, rtl);
45
47
 
46
48
  @if $value != null {
47
49
  @if $is-rtl == false {
48
50
  /* rtl:begin:remove */
49
51
  }
50
- .#{$property-class + $infix + $property-class-modifier} {
51
- @each $property in $properties {
52
- #{$property}: $value if($enable-important-utilities, !important, null);
52
+
53
+ @if $is-css-var {
54
+ .#{$property-class + $infix + $property-class-modifier} {
55
+ --#{$variable-prefix}#{$property-class}: #{$value};
53
56
  }
54
- }
55
57
 
56
- @each $pseudo in $state {
57
- .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
58
+ @each $pseudo in $state {
59
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
60
+ --#{$variable-prefix}#{$property-class}: #{$value};
61
+ }
62
+ }
63
+ } @else {
64
+ .#{$property-class + $infix + $property-class-modifier} {
58
65
  @each $property in $properties {
66
+ @if $is-local-vars {
67
+ @each $local-var, $value in $is-local-vars {
68
+ --#{$variable-prefix}#{$local-var}: #{$value};
69
+ }
70
+ }
59
71
  #{$property}: $value if($enable-important-utilities, !important, null);
60
72
  }
61
73
  }
74
+
75
+ @each $pseudo in $state {
76
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
77
+ @each $property in $properties {
78
+ #{$property}: $value if($enable-important-utilities, !important, null);
79
+ }
80
+ }
81
+ }
62
82
  }
83
+
63
84
  @if $is-rtl == false {
64
85
  /* rtl:end:remove */
65
86
  }
@@ -3,7 +3,7 @@
3
3
  // Hide content visually while keeping it accessible to assistive technologies
4
4
  //
5
5
  // See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
6
- // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
6
+ // See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
7
7
 
8
8
  @mixin visually-hidden() {
9
9
  position: absolute !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-scss",
3
- "version": "5.0.2",
3
+ "version": "5.1.3",
4
4
  "description": "Bootstrap's SCSS files (only)",
5
5
  "main": "bootstrap.scss",
6
6
  "repository": {