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/mixins/_grid.scss CHANGED
@@ -3,17 +3,17 @@
3
3
  // Generate semantic grid columns with these mixins.
4
4
 
5
5
  @mixin make-row($gutter: $grid-gutter-width) {
6
- --#{$variable-prefix}gutter-x: #{$gutter};
7
- --#{$variable-prefix}gutter-y: 0;
6
+ --#{$prefix}gutter-x: #{$gutter};
7
+ --#{$prefix}gutter-y: 0;
8
8
  display: flex;
9
9
  flex-wrap: wrap;
10
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
11
+ margin-top: calc(-1 * var(--#{$prefix}gutter-y)); // stylelint-disable-line function-disallowed-list
12
+ margin-right: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
13
+ margin-left: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
14
14
  }
15
15
 
16
- @mixin make-col-ready($gutter: $grid-gutter-width) {
16
+ @mixin make-col-ready() {
17
17
  // Add box sizing if only the grid is loaded
18
18
  box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);
19
19
  // Prevent columns from becoming too narrow when at smaller grid tiers by
@@ -22,9 +22,9 @@
22
22
  flex-shrink: 0;
23
23
  width: 100%;
24
24
  max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
25
- padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
26
- padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
27
- margin-top: var(--#{$variable-prefix}gutter-y);
25
+ padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
26
+ padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
27
+ margin-top: var(--#{$prefix}gutter-y);
28
28
  }
29
29
 
30
30
  @mixin make-col($size: false, $columns: $grid-columns) {
@@ -51,7 +51,7 @@
51
51
  // Row columns
52
52
  //
53
53
  // Specify on a parent element(e.g., .row) to force immediate children into NN
54
- // numberof columns. Supports wrapping to new lines, but does not do a Masonry
54
+ // number of columns. Supports wrapping to new lines, but does not do a Masonry
55
55
  // style grid.
56
56
  @mixin row-cols($count) {
57
57
  > * {
@@ -114,12 +114,12 @@
114
114
  @each $key, $value in $gutters {
115
115
  .g#{$infix}-#{$key},
116
116
  .gx#{$infix}-#{$key} {
117
- --#{$variable-prefix}gutter-x: #{$value};
117
+ --#{$prefix}gutter-x: #{$value};
118
118
  }
119
119
 
120
120
  .g#{$infix}-#{$key},
121
121
  .gy#{$infix}-#{$key} {
122
- --#{$variable-prefix}gutter-y: #{$value};
122
+ --#{$prefix}gutter-y: #{$value};
123
123
  }
124
124
  }
125
125
  }
@@ -2,30 +2,9 @@
2
2
 
3
3
  // scss-docs-start pagination-mixin
4
4
  @mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
5
- .page-link {
6
- padding: $padding-y $padding-x;
7
- @include font-size($font-size);
8
- }
9
-
10
- .page-item {
11
- @if $pagination-margin-start == (-$pagination-border-width) {
12
- &:first-child {
13
- .page-link {
14
- @include border-start-radius($border-radius);
15
- }
16
- }
17
-
18
- &:last-child {
19
- .page-link {
20
- @include border-end-radius($border-radius);
21
- }
22
- }
23
- } @else {
24
- //Add border-radius to all pageLinks in case they have left margin
25
- .page-link {
26
- @include border-radius($border-radius);
27
- }
28
- }
29
- }
5
+ --#{$prefix}pagination-padding-x: #{$padding-x};
6
+ --#{$prefix}pagination-padding-y: #{$padding-y};
7
+ @include rfs($font-size, --#{$prefix}pagination-font-size);
8
+ --#{$prefix}pagination-border-radius: #{$border-radius};
30
9
  }
31
10
  // scss-docs-end pagination-mixin
@@ -11,7 +11,7 @@
11
11
  text-transform: none;
12
12
  letter-spacing: normal;
13
13
  word-break: normal;
14
- word-spacing: normal;
15
14
  white-space: normal;
15
+ word-spacing: normal;
16
16
  line-break: auto;
17
17
  }
@@ -5,17 +5,20 @@
5
5
  $hover-bg: mix($color, $background, percentage($table-hover-bg-factor));
6
6
  $striped-bg: mix($color, $background, percentage($table-striped-bg-factor));
7
7
  $active-bg: mix($color, $background, percentage($table-active-bg-factor));
8
+ $border-color: mix($color, $background, percentage($table-border-factor));
8
9
 
9
- --#{$variable-prefix}table-bg: #{$background};
10
- --#{$variable-prefix}table-striped-bg: #{$striped-bg};
11
- --#{$variable-prefix}table-striped-color: #{color-contrast($striped-bg)};
12
- --#{$variable-prefix}table-active-bg: #{$active-bg};
13
- --#{$variable-prefix}table-active-color: #{color-contrast($active-bg)};
14
- --#{$variable-prefix}table-hover-bg: #{$hover-bg};
15
- --#{$variable-prefix}table-hover-color: #{color-contrast($hover-bg)};
10
+ --#{$prefix}table-color: #{$color};
11
+ --#{$prefix}table-bg: #{$background};
12
+ --#{$prefix}table-border-color: #{$border-color};
13
+ --#{$prefix}table-striped-bg: #{$striped-bg};
14
+ --#{$prefix}table-striped-color: #{color-contrast($striped-bg)};
15
+ --#{$prefix}table-active-bg: #{$active-bg};
16
+ --#{$prefix}table-active-color: #{color-contrast($active-bg)};
17
+ --#{$prefix}table-hover-bg: #{$hover-bg};
18
+ --#{$prefix}table-hover-color: #{color-contrast($hover-bg)};
16
19
 
17
- color: $color;
18
- border-color: mix($color, $background, percentage($table-border-factor));
20
+ color: var(--#{$prefix}table-color);
21
+ border-color: var(--#{$prefix}table-border-color);
19
22
  }
20
23
  }
21
24
  // scss-docs-end table-variant
@@ -1,89 +1,97 @@
1
- // Utility generator
2
- // Used to generate utilities & print utilities
3
- @mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {
4
- $values: map-get($utility, values);
5
-
6
- // If the values are a list or string, convert it into a map
7
- @if type-of($values) == "string" or type-of(nth($values, 1)) != "list" {
8
- $values: zip($values, $values);
9
- }
10
-
11
- @each $key, $value in $values {
12
- $properties: map-get($utility, property);
13
-
14
- // Multiple properties are possible, for example with vertical or horizontal margins or paddings
15
- @if type-of($properties) == "string" {
16
- $properties: append((), $properties);
17
- }
18
-
19
- // Use custom class if present
20
- $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));
21
- $property-class: if($property-class == null, "", $property-class);
22
-
23
- // State params to generate pseudo-classes
24
- $state: if(map-has-key($utility, state), map-get($utility, state), ());
25
-
26
- $infix: if($property-class == "" and str-slice($infix, 1, 1) == "-", str-slice($infix, 2), $infix);
27
-
28
- // Don't prefix if value key is null (eg. with shadow class)
29
- $property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, "");
30
-
31
- @if map-get($utility, rfs) {
32
- // Inside the media query
33
- @if $is-rfs-media-query {
34
- $val: rfs-value($value);
35
-
36
- // Do not render anything if fluid and non fluid values are the same
37
- $value: if($val == rfs-fluid-value($value), null, $val);
38
- }
39
- @else {
40
- $value: rfs-fluid-value($value);
41
- }
42
- }
43
-
44
- $is-css-var: map-get($utility, css-var);
45
- $is-local-vars: map-get($utility, local-vars);
46
- $is-rtl: map-get($utility, rtl);
47
-
48
- @if $value != null {
49
- @if $is-rtl == false {
50
- /* rtl:begin:remove */
51
- }
52
-
53
- @if $is-css-var {
54
- .#{$property-class + $infix + $property-class-modifier} {
55
- --#{$variable-prefix}#{$property-class}: #{$value};
56
- }
57
-
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} {
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
- }
71
- #{$property}: $value if($enable-important-utilities, !important, null);
72
- }
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
- }
82
- }
83
-
84
- @if $is-rtl == false {
85
- /* rtl:end:remove */
86
- }
87
- }
88
- }
89
- }
1
+ // Utility generator
2
+ // Used to generate utilities & print utilities
3
+ @mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {
4
+ $values: map-get($utility, values);
5
+
6
+ // If the values are a list or string, convert it into a map
7
+ @if type-of($values) == "string" or type-of(nth($values, 1)) != "list" {
8
+ $values: zip($values, $values);
9
+ }
10
+
11
+ @each $key, $value in $values {
12
+ $properties: map-get($utility, property);
13
+
14
+ // Multiple properties are possible, for example with vertical or horizontal margins or paddings
15
+ @if type-of($properties) == "string" {
16
+ $properties: append((), $properties);
17
+ }
18
+
19
+ // Use custom class if present
20
+ $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));
21
+ $property-class: if($property-class == null, "", $property-class);
22
+
23
+ // Use custom CSS variable name if present, otherwise default to `class`
24
+ $css-variable-name: if(map-has-key($utility, css-variable-name), map-get($utility, css-variable-name), map-get($utility, class));
25
+
26
+ // State params to generate pseudo-classes
27
+ $state: if(map-has-key($utility, state), map-get($utility, state), ());
28
+
29
+ $infix: if($property-class == "" and str-slice($infix, 1, 1) == "-", str-slice($infix, 2), $infix);
30
+
31
+ // Don't prefix if value key is null (e.g. with shadow class)
32
+ $property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, "");
33
+
34
+ @if map-get($utility, rfs) {
35
+ // Inside the media query
36
+ @if $is-rfs-media-query {
37
+ $val: rfs-value($value);
38
+
39
+ // Do not render anything if fluid and non fluid values are the same
40
+ $value: if($val == rfs-fluid-value($value), null, $val);
41
+ }
42
+ @else {
43
+ $value: rfs-fluid-value($value);
44
+ }
45
+ }
46
+
47
+ $is-css-var: map-get($utility, css-var);
48
+ $is-local-vars: map-get($utility, local-vars);
49
+ $is-rtl: map-get($utility, rtl);
50
+
51
+ @if $value != null {
52
+ @if $is-rtl == false {
53
+ /* rtl:begin:remove */
54
+ }
55
+
56
+ @if $is-css-var {
57
+ .#{$property-class + $infix + $property-class-modifier} {
58
+ --#{$prefix}#{$css-variable-name}: #{$value};
59
+ }
60
+
61
+ @each $pseudo in $state {
62
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
63
+ --#{$prefix}#{$css-variable-name}: #{$value};
64
+ }
65
+ }
66
+ } @else {
67
+ .#{$property-class + $infix + $property-class-modifier} {
68
+ @each $property in $properties {
69
+ @if $is-local-vars {
70
+ @each $local-var, $variable in $is-local-vars {
71
+ --#{$prefix}#{$local-var}: #{$variable};
72
+ }
73
+ }
74
+ #{$property}: $value if($enable-important-utilities, !important, null);
75
+ }
76
+ }
77
+
78
+ @each $pseudo in $state {
79
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
80
+ @each $property in $properties {
81
+ @if $is-local-vars {
82
+ @each $local-var, $variable in $is-local-vars {
83
+ --#{$prefix}#{$local-var}: #{$variable};
84
+ }
85
+ }
86
+ #{$property}: $value if($enable-important-utilities, !important, null);
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+ @if $is-rtl == false {
93
+ /* rtl:end:remove */
94
+ }
95
+ }
96
+ }
97
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-scss",
3
- "version": "5.1.3",
3
+ "version": "5.2.1",
4
4
  "description": "Bootstrap's SCSS files (only)",
5
5
  "main": "bootstrap.scss",
6
6
  "repository": {