bootstrap 4.6.2 → 5.0.0.alpha1

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 (135) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap/alert.js +148 -73
  4. data/assets/javascripts/bootstrap/button.js +71 -154
  5. data/assets/javascripts/bootstrap/carousel.js +315 -209
  6. data/assets/javascripts/bootstrap/collapse.js +307 -153
  7. data/assets/javascripts/bootstrap/dom/data.js +81 -0
  8. data/assets/javascripts/bootstrap/dom/event-handler.js +311 -0
  9. data/assets/javascripts/bootstrap/dom/manipulator.js +100 -0
  10. data/assets/javascripts/bootstrap/dom/polyfill.js +110 -0
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +98 -0
  12. data/assets/javascripts/bootstrap/dropdown.js +257 -205
  13. data/assets/javascripts/bootstrap/modal.js +354 -250
  14. data/assets/javascripts/bootstrap/popover.js +85 -94
  15. data/assets/javascripts/bootstrap/scrollspy.js +179 -107
  16. data/assets/javascripts/bootstrap/tab.js +170 -99
  17. data/assets/javascripts/bootstrap/toast.js +181 -110
  18. data/assets/javascripts/bootstrap/tooltip.js +375 -226
  19. data/assets/javascripts/bootstrap-sprockets.js +5 -1
  20. data/assets/javascripts/bootstrap.js +2260 -1550
  21. data/assets/javascripts/bootstrap.min.js +3 -3
  22. data/assets/stylesheets/_bootstrap-grid.scss +53 -18
  23. data/assets/stylesheets/_bootstrap-reboot.scss +6 -3
  24. data/assets/stylesheets/_bootstrap.scss +16 -10
  25. data/assets/stylesheets/bootstrap/_alert.scss +3 -4
  26. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  27. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -17
  28. data/assets/stylesheets/bootstrap/_button-group.scss +16 -38
  29. data/assets/stylesheets/bootstrap/_buttons.scss +27 -45
  30. data/assets/stylesheets/bootstrap/_card.scss +22 -68
  31. data/assets/stylesheets/bootstrap/_carousel.scss +15 -20
  32. data/assets/stylesheets/bootstrap/_close.scss +9 -13
  33. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  34. data/assets/stylesheets/bootstrap/_dropdown.scss +12 -9
  35. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  36. data/assets/stylesheets/bootstrap/_functions.scss +82 -69
  37. data/assets/stylesheets/bootstrap/_grid.scss +3 -54
  38. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  39. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  40. data/assets/stylesheets/bootstrap/_list-group.scss +7 -4
  41. data/assets/stylesheets/bootstrap/_mixins.scss +6 -12
  42. data/assets/stylesheets/bootstrap/_modal.scss +36 -41
  43. data/assets/stylesheets/bootstrap/_nav.scss +7 -9
  44. data/assets/stylesheets/bootstrap/_navbar.scss +42 -82
  45. data/assets/stylesheets/bootstrap/_pagination.scss +7 -20
  46. data/assets/stylesheets/bootstrap/_popover.scss +14 -14
  47. data/assets/stylesheets/bootstrap/_progress.scss +3 -5
  48. data/assets/stylesheets/bootstrap/_reboot.scss +304 -172
  49. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  50. data/assets/stylesheets/bootstrap/_spinners.scss +8 -17
  51. data/assets/stylesheets/bootstrap/_tables.scss +80 -114
  52. data/assets/stylesheets/bootstrap/_toasts.scss +2 -4
  53. data/assets/stylesheets/bootstrap/_tooltip.scss +9 -9
  54. data/assets/stylesheets/bootstrap/_transitions.scss +0 -7
  55. data/assets/stylesheets/bootstrap/_type.scss +38 -59
  56. data/assets/stylesheets/bootstrap/_utilities.scss +503 -18
  57. data/assets/stylesheets/bootstrap/_variables.scss +548 -437
  58. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  59. data/assets/stylesheets/bootstrap/forms/_form-check.scss +142 -0
  60. data/assets/stylesheets/bootstrap/forms/_form-control.scss +116 -0
  61. data/assets/stylesheets/bootstrap/forms/_form-file.scss +91 -0
  62. data/assets/stylesheets/bootstrap/forms/_form-range.scss +136 -0
  63. data/assets/stylesheets/bootstrap/forms/_form-select.scss +82 -0
  64. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  65. data/assets/stylesheets/bootstrap/forms/_input-group.scss +140 -0
  66. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  67. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  68. data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
  69. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  70. data/assets/stylesheets/bootstrap/helpers/_embed.scss +31 -0
  71. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  72. data/assets/stylesheets/bootstrap/helpers/_screenreaders.scss +8 -0
  73. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  74. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  75. data/assets/stylesheets/bootstrap/mixins/_alert.scss +0 -4
  76. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +1 -1
  77. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +11 -8
  78. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +62 -47
  79. data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
  80. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  81. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  82. data/assets/stylesheets/bootstrap/mixins/_forms.scss +23 -85
  83. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
  84. data/assets/stylesheets/bootstrap/mixins/_grid.scss +86 -34
  85. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  86. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
  87. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  88. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
  89. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +3 -3
  90. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +18 -24
  91. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  92. data/assets/stylesheets/bootstrap/mixins/_transition.scss +2 -2
  93. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +49 -0
  94. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  95. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +214 -130
  96. data/bootstrap.gemspec +1 -1
  97. data/lib/bootstrap/version.rb +2 -2
  98. data/tasks/updater/js.rb +6 -18
  99. data/tasks/updater/network.rb +1 -7
  100. metadata +34 -42
  101. data/assets/javascripts/bootstrap/util.js +0 -189
  102. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  103. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
  104. data/assets/stylesheets/bootstrap/_input-group.scss +0 -211
  105. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  106. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  107. data/assets/stylesheets/bootstrap/_print.scss +0 -132
  108. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  109. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  110. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  111. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  112. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  113. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  114. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  115. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  116. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  117. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  118. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  119. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  120. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  121. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  122. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  123. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  124. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  125. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  126. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  127. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  128. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  129. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  130. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  131. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  132. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  133. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  134. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  135. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
@@ -1,31 +1,3 @@
1
- // Form control focus state
2
- //
3
- // Generate a customized focus state and for any input with the specified color,
4
- // which defaults to the `$input-focus-border-color` variable.
5
- //
6
- // We highly encourage you to not customize the default value, but instead use
7
- // this to tweak colors on an as-needed basis. This aesthetic change is based on
8
- // WebKit's default styles, but applicable to a wider range of browsers. Its
9
- // usability and accessibility should be taken into account with any change.
10
- //
11
- // Example usage: change the default blue border and shadow to white for better
12
- // contrast against a dark gray background.
13
- @mixin form-control-focus($ignore-warning: false) {
14
- &:focus {
15
- color: $input-focus-color;
16
- background-color: $input-focus-bg;
17
- border-color: $input-focus-border-color;
18
- outline: 0;
19
- @if $enable-shadows {
20
- @include box-shadow($input-box-shadow, $input-focus-box-shadow);
21
- } @else {
22
- // Avoid using mixin so we can pass custom focus shadow properly
23
- box-shadow: $input-focus-box-shadow;
24
- }
25
- }
26
- @include deprecate("The `form-control-focus()` mixin", "v4.4.0", "v5", $ignore-warning);
27
- }
28
-
29
1
  // This mixin uses an `if()` technique to be compatible with Dart Sass
30
2
  // See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
31
3
  @mixin form-validation-state-selector($state) {
@@ -47,13 +19,13 @@
47
19
  width: 100%;
48
20
  margin-top: $form-feedback-margin-top;
49
21
  @include font-size($form-feedback-font-size);
22
+ font-style: $form-feedback-font-style;
50
23
  color: $color;
51
24
  }
52
25
 
53
26
  .#{$state}-tooltip {
54
27
  position: absolute;
55
28
  top: 100%;
56
- left: 0;
57
29
  z-index: 5;
58
30
  display: none;
59
31
  max-width: 100%; // Contain to parent when possible
@@ -61,16 +33,9 @@
61
33
  margin-top: .1rem;
62
34
  @include font-size($form-feedback-tooltip-font-size);
63
35
  line-height: $form-feedback-tooltip-line-height;
64
- color: color-yiq($color);
36
+ color: color-contrast($color);
65
37
  background-color: rgba($color, $form-feedback-tooltip-opacity);
66
38
  @include border-radius($form-feedback-tooltip-border-radius);
67
-
68
- // See https://github.com/twbs/bootstrap/pull/31557
69
- // Align tooltip to form elements
70
- .form-row > .col > &,
71
- .form-row > [class*="col-"] > & {
72
- left: $form-grid-gutter-width * .5;
73
- }
74
39
  }
75
40
 
76
41
  @include form-validation-state-selector($state) {
@@ -85,7 +50,7 @@
85
50
  border-color: $color;
86
51
 
87
52
  @if $enable-validation-icons {
88
- padding-right: $input-height-inner !important; // stylelint-disable-line declaration-no-important
53
+ padding-right: $input-height-inner;
89
54
  background-image: escape-svg($icon);
90
55
  background-repeat: no-repeat;
91
56
  background-position: right $input-height-inner-quarter center;
@@ -94,17 +59,7 @@
94
59
 
95
60
  &:focus {
96
61
  border-color: $color;
97
- box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
98
- }
99
- }
100
- }
101
-
102
- // stylelint-disable-next-line selector-no-qualifying-type
103
- select.form-control {
104
- @include form-validation-state-selector($state) {
105
- @if $enable-validation-icons {
106
- padding-right: $input-padding-x * 4 !important; // stylelint-disable-line declaration-no-important
107
- background-position: right $input-padding-x * 2 center;
62
+ box-shadow: 0 0 0 $input-focus-width rgba($color, $input-btn-focus-color-opacity);
108
63
  }
109
64
  }
110
65
  }
@@ -119,13 +74,15 @@
119
74
  }
120
75
  }
121
76
 
122
- .custom-select {
77
+ .form-select {
123
78
  @include form-validation-state-selector($state) {
124
79
  border-color: $color;
125
80
 
126
81
  @if $enable-validation-icons {
127
- padding-right: $custom-select-feedback-icon-padding-right !important; // stylelint-disable-line declaration-no-important
128
- background: $custom-select-background, $custom-select-bg escape-svg($icon) $custom-select-feedback-icon-position / $custom-select-feedback-icon-size no-repeat;
82
+ padding-right: $form-select-feedback-icon-padding-right;
83
+ background-image: escape-svg($form-select-indicator), escape-svg($icon);
84
+ background-position: $form-select-bg-position, $form-select-feedback-icon-position;
85
+ background-size: $form-select-bg-size, $form-select-feedback-icon-size;
129
86
  }
130
87
 
131
88
  &:focus {
@@ -137,55 +94,36 @@
137
94
 
138
95
  .form-check-input {
139
96
  @include form-validation-state-selector($state) {
140
- ~ .form-check-label {
141
- color: $color;
142
- }
143
-
144
- ~ .#{$state}-feedback,
145
- ~ .#{$state}-tooltip {
146
- display: block;
147
- }
148
- }
149
- }
150
-
151
- .custom-control-input {
152
- @include form-validation-state-selector($state) {
153
- ~ .custom-control-label {
154
- color: $color;
155
-
156
- &::before {
157
- border-color: $color;
158
- }
159
- }
97
+ border-color: $color;
160
98
 
161
99
  &:checked {
162
- ~ .custom-control-label::before {
163
- border-color: lighten($color, 10%);
164
- @include gradient-bg(lighten($color, 10%));
165
- }
100
+ background-color: $color;
166
101
  }
167
102
 
168
103
  &:focus {
169
- ~ .custom-control-label::before {
170
- box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
171
- }
104
+ box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
105
+ }
172
106
 
173
- &:not(:checked) ~ .custom-control-label::before {
174
- border-color: $color;
175
- }
107
+ ~ .form-check-label {
108
+ color: $color;
176
109
  }
177
110
  }
178
111
  }
112
+ .form-check-inline .form-check-input {
113
+ ~ .#{$state}-feedback {
114
+ margin-left: .5em;
115
+ }
116
+ }
179
117
 
180
118
  // custom file
181
- .custom-file-input {
119
+ .form-file-input {
182
120
  @include form-validation-state-selector($state) {
183
- ~ .custom-file-label {
121
+ ~ .form-file-label {
184
122
  border-color: $color;
185
123
  }
186
124
 
187
125
  &:focus {
188
- ~ .custom-file-label {
126
+ ~ .form-file-label {
189
127
  border-color: $color;
190
128
  box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
191
129
  }
@@ -1,10 +1,10 @@
1
1
  // Gradients
2
2
 
3
- @mixin gradient-bg($color) {
3
+ @mixin gradient-bg($color: null) {
4
+ background-color: $color;
5
+
4
6
  @if $enable-gradients {
5
- background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x;
6
- } @else {
7
- background-color: $color;
7
+ background-image: var(--bs-gradient);
8
8
  }
9
9
  }
10
10
 
@@ -13,33 +13,31 @@
13
13
  // Creates two color stops, start and end, by specifying a color and position for each color stop.
14
14
  @mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
15
15
  background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
16
- background-repeat: repeat-x;
17
16
  }
18
17
 
19
18
  // Vertical gradient, from top to bottom
20
19
  //
21
20
  // Creates two color stops, start and end, by specifying a color and position for each color stop.
22
- @mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
21
+ @mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: null, $end-percent: null) {
23
22
  background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
24
- background-repeat: repeat-x;
25
23
  }
26
24
 
27
25
  @mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
28
26
  background-image: linear-gradient($deg, $start-color, $end-color);
29
- background-repeat: repeat-x;
30
27
  }
28
+
31
29
  @mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
32
30
  background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
33
- background-repeat: no-repeat;
34
31
  }
32
+
35
33
  @mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
36
34
  background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
37
- background-repeat: no-repeat;
38
35
  }
36
+
39
37
  @mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
40
38
  background-image: radial-gradient(circle, $inner-color, $outer-color);
41
- background-repeat: no-repeat;
42
39
  }
40
+
43
41
  @mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
44
42
  background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
45
43
  }
@@ -2,57 +2,43 @@
2
2
  //
3
3
  // Generate semantic grid columns with these mixins.
4
4
 
5
- @mixin make-container($gutter: $grid-gutter-width) {
6
- width: 100%;
7
- padding-right: $gutter * .5;
8
- padding-left: $gutter * .5;
9
- margin-right: auto;
10
- margin-left: auto;
11
- }
12
-
13
5
  @mixin make-row($gutter: $grid-gutter-width) {
6
+ --bs-gutter-x: #{$gutter};
7
+ --bs-gutter-y: 0;
14
8
  display: flex;
9
+ flex: 1 0 100%;
15
10
  flex-wrap: wrap;
16
- margin-right: -$gutter * .5;
17
- margin-left: -$gutter * .5;
18
- }
19
-
20
- // For each breakpoint, define the maximum width of the container in a media query
21
- @mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
22
- @each $breakpoint, $container-max-width in $max-widths {
23
- @include media-breakpoint-up($breakpoint, $breakpoints) {
24
- max-width: $container-max-width;
25
- }
26
- }
27
- @include deprecate("The `make-container-max-widths` mixin", "v4.5.2", "v5");
11
+ margin-top: calc(var(--bs-gutter-y) * -1); // stylelint-disable-line function-blacklist
12
+ margin-right: calc(var(--bs-gutter-x) / -2); // stylelint-disable-line function-blacklist
13
+ margin-left: calc(var(--bs-gutter-x) / -2); // stylelint-disable-line function-blacklist
28
14
  }
29
15
 
30
16
  @mixin make-col-ready($gutter: $grid-gutter-width) {
31
- position: relative;
17
+ // Add box sizing if only the grid is loaded
18
+ box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);
32
19
  // Prevent columns from becoming too narrow when at smaller grid tiers by
33
- // always setting `width: 100%;`. This works because we use `flex` values
20
+ // always setting `width: 100%;`. This works because we set the width
34
21
  // later on to override this initial width.
22
+ flex-shrink: 0;
35
23
  width: 100%;
36
- padding-right: $gutter * .5;
37
- padding-left: $gutter * .5;
24
+ max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
25
+ padding-right: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-blacklist
26
+ padding-left: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-blacklist
27
+ margin-top: var(--bs-gutter-y);
38
28
  }
39
29
 
40
30
  @mixin make-col($size, $columns: $grid-columns) {
41
- flex: 0 0 percentage(divide($size, $columns));
42
- // Add a `max-width` to ensure content within each column does not blow out
43
- // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
44
- // do not appear to require this.
45
- max-width: percentage(divide($size, $columns));
31
+ flex: 0 0 auto;
32
+ width: percentage($size / $columns);
46
33
  }
47
34
 
48
35
  @mixin make-col-auto() {
49
36
  flex: 0 0 auto;
50
37
  width: auto;
51
- max-width: 100%; // Reset earlier grid tiers
52
38
  }
53
39
 
54
40
  @mixin make-col-offset($size, $columns: $grid-columns) {
55
- $num: divide($size, $columns);
41
+ $num: $size / $columns;
56
42
  margin-left: if($num == 0, 0, percentage($num));
57
43
  }
58
44
 
@@ -62,8 +48,74 @@
62
48
  // numberof columns. Supports wrapping to new lines, but does not do a Masonry
63
49
  // style grid.
64
50
  @mixin row-cols($count) {
65
- > * {
66
- flex: 0 0 divide(100%, $count);
67
- max-width: divide(100%, $count);
51
+ & > * {
52
+ flex: 0 0 auto;
53
+ width: 100% / $count;
54
+ }
55
+ }
56
+
57
+ // Framework grid generation
58
+ //
59
+ // Used only by Bootstrap to generate the correct number of grid classes given
60
+ // any value of `$grid-columns`.
61
+
62
+ @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
63
+ @each $breakpoint in map-keys($breakpoints) {
64
+ $infix: breakpoint-infix($breakpoint, $breakpoints);
65
+
66
+ @include media-breakpoint-up($breakpoint, $breakpoints) {
67
+ // Provide basic `.col-{bp}` classes for equal-width flexbox columns
68
+ .col#{$infix} {
69
+ flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
70
+ }
71
+
72
+ .row-cols#{$infix}-auto > * {
73
+ @include make-col-auto();
74
+ }
75
+
76
+ @if $grid-row-columns > 0 {
77
+ @for $i from 1 through $grid-row-columns {
78
+ .row-cols#{$infix}-#{$i} {
79
+ @include row-cols($i);
80
+ }
81
+ }
82
+ }
83
+
84
+ .col#{$infix}-auto {
85
+ @include make-col-auto();
86
+ }
87
+
88
+ @if $columns > 0 {
89
+ @for $i from 1 through $columns {
90
+ .col#{$infix}-#{$i} {
91
+ @include make-col($i, $columns);
92
+ }
93
+ }
94
+
95
+ // `$columns - 1` because offsetting by the width of an entire row isn't possible
96
+ @for $i from 0 through ($columns - 1) {
97
+ @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
98
+ .offset#{$infix}-#{$i} {
99
+ @include make-col-offset($i, $columns);
100
+ }
101
+ }
102
+ }
103
+ }
104
+
105
+ // Gutters
106
+ //
107
+ // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
108
+ @each $key, $value in $gutters {
109
+ .g#{$infix}-#{$key},
110
+ .gx#{$infix}-#{$key} {
111
+ --bs-gutter-x: #{$value};
112
+ }
113
+
114
+ .g#{$infix}-#{$key},
115
+ .gy#{$infix}-#{$key} {
116
+ --bs-gutter-y: #{$value};
117
+ }
118
+ }
119
+ }
68
120
  }
69
121
  }
@@ -7,30 +7,10 @@
7
7
  //
8
8
  // Keep images from scaling beyond the width of their parents.
9
9
 
10
- @mixin img-fluid() {
10
+ @mixin img-fluid {
11
11
  // Part 1: Set a maximum relative to the parent
12
12
  max-width: 100%;
13
13
  // Part 2: Override the height to auto, otherwise images will be stretched
14
14
  // when setting a width and height attribute on the img element.
15
15
  height: auto;
16
16
  }
17
-
18
-
19
- // Retina image
20
- //
21
- // Short retina mixin for setting background-image and -size.
22
-
23
- @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
24
- background-image: url($file-1x);
25
-
26
- // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
27
- // but doesn't convert dppx=>dpi.
28
- // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
29
- // Compatibility info: https://caniuse.com/css-media-resolution
30
- @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
31
- only screen and (min-resolution: 2dppx) { // Standardized
32
- background-image: url($file-2x);
33
- background-size: $width-1x $height-1x;
34
- }
35
- @include deprecate("`img-retina()`", "v4.3.0", "v5");
36
- }
@@ -6,7 +6,8 @@
6
6
  background-color: $background;
7
7
 
8
8
  &.list-group-item-action {
9
- @include hover-focus() {
9
+ &:hover,
10
+ &:focus {
10
11
  color: $color;
11
12
  background-color: darken($background, 5%);
12
13
  }
@@ -1,7 +1,7 @@
1
1
  // Lists
2
2
 
3
3
  // Unstyled keeps list items block level, just removes default browser padding and list-style
4
- @mixin list-unstyled() {
4
+ @mixin list-unstyled {
5
5
  padding-left: 0;
6
6
  list-style: none;
7
7
  }
@@ -1,21 +1,28 @@
1
1
  // Pagination
2
2
 
3
- @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
3
+ @mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
4
4
  .page-link {
5
5
  padding: $padding-y $padding-x;
6
6
  @include font-size($font-size);
7
- line-height: $line-height;
8
7
  }
9
8
 
10
9
  .page-item {
11
- &:first-child {
12
- .page-link {
13
- @include border-left-radius($border-radius);
10
+ @if $pagination-margin-left == (-$pagination-border-width) {
11
+ &:first-child {
12
+ .page-link {
13
+ @include border-left-radius($border-radius);
14
+ }
14
15
  }
15
- }
16
- &:last-child {
16
+
17
+ &:last-child {
18
+ .page-link {
19
+ @include border-right-radius($border-radius);
20
+ }
21
+ }
22
+ } @else {
23
+ //Add border-radius to all pageLinks in case they have left margin
17
24
  .page-link {
18
- @include border-right-radius($border-radius);
25
+ @include border-radius($border-radius);
19
26
  }
20
27
  }
21
28
  }
@@ -1,6 +1,6 @@
1
- @mixin reset-text() {
1
+ @mixin reset-text {
2
2
  font-family: $font-family-base;
3
- // We deliberately do NOT reset font-size or word-wrap.
3
+ // We deliberately do NOT reset font-size or overflow-wrap / word-wrap.
4
4
  font-style: normal;
5
5
  font-weight: $font-weight-normal;
6
6
  line-height: $line-height-base;
@@ -11,7 +11,7 @@
11
11
  text-transform: none;
12
12
  letter-spacing: normal;
13
13
  word-break: normal;
14
- white-space: normal;
15
14
  word-spacing: normal;
15
+ white-space: normal;
16
16
  line-break: auto;
17
17
  }
@@ -1,34 +1,28 @@
1
+ // stylelint-disable declaration-no-important
2
+
1
3
  // Only display content to screen readers
2
4
  //
3
- // See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
4
- // See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
5
+ // See: https://a11yproject.com/posts/how-to-hide-content/
6
+ // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
5
7
 
6
- @mixin sr-only() {
7
- position: absolute;
8
- width: 1px;
9
- height: 1px;
10
- padding: 0;
11
- margin: -1px; // Fix for https://github.com/twbs/bootstrap/issues/25686
12
- overflow: hidden;
13
- clip: rect(0, 0, 0, 0);
14
- white-space: nowrap;
15
- border: 0;
8
+ @mixin sr-only {
9
+ position: absolute !important;
10
+ width: 1px !important;
11
+ height: 1px !important;
12
+ padding: 0 !important;
13
+ margin: -1px !important; // Fix for https://github.com/twbs/bootstrap/issues/25686
14
+ overflow: hidden !important;
15
+ clip: rect(0, 0, 0, 0) !important;
16
+ white-space: nowrap !important;
17
+ border: 0 !important;
16
18
  }
17
19
 
18
- // Use in conjunction with .sr-only to only display content when it's focused.
20
+ // Use to only display content when it's focused.
19
21
  //
20
22
  // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
21
- //
22
- // Credit: HTML5 Boilerplate
23
23
 
24
- @mixin sr-only-focusable() {
25
- &:active,
26
- &:focus {
27
- position: static;
28
- width: auto;
29
- height: auto;
30
- overflow: visible;
31
- clip: auto;
32
- white-space: normal;
24
+ @mixin sr-only-focusable {
25
+ &:not(:focus) {
26
+ @include sr-only();
33
27
  }
34
28
  }
@@ -0,0 +1,21 @@
1
+ // scss-docs-start table-variant
2
+ @mixin table-variant($state, $background) {
3
+ .table-#{$state} {
4
+ $color: color-contrast(opaque($body-bg, $background));
5
+ $hover-bg: mix($color, $background, percentage($table-hover-bg-factor));
6
+ $striped-bg: mix($color, $background, percentage($table-striped-bg-factor));
7
+ $active-bg: mix($color, $background, percentage($table-active-bg-factor));
8
+
9
+ --bs-table-bg: #{$background};
10
+ --bs-table-striped-bg: #{$striped-bg};
11
+ --bs-table-striped-color: #{color-contrast($striped-bg)};
12
+ --bs-table-active-bg: #{$active-bg};
13
+ --bs-table-active-color: #{color-contrast($active-bg)};
14
+ --bs-table-hover-bg: #{$hover-bg};
15
+ --bs-table-hover-color: #{color-contrast($hover-bg)};
16
+
17
+ color: $color;
18
+ border-color: mix($color, $background, percentage($table-border-factor));
19
+ }
20
+ }
21
+ // scss-docs-end table-variant
@@ -1,4 +1,4 @@
1
- // stylelint-disable property-disallowed-list
1
+ // stylelint-disable property-blacklist
2
2
  @mixin transition($transition...) {
3
3
  @if length($transition) == 0 {
4
4
  $transition: $transition-base;
@@ -17,7 +17,7 @@
17
17
  transition: $transition;
18
18
  }
19
19
 
20
- @if $enable-prefers-reduced-motion-media-query and nth($transition, 1) != null and nth($transition, 1) != none {
20
+ @if $enable-reduced-motion and nth($transition, 1) != null and nth($transition, 1) != none {
21
21
  @media (prefers-reduced-motion: reduce) {
22
22
  transition: none;
23
23
  }
@@ -0,0 +1,49 @@
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
+ $infix: if($property-class == "" and str-slice($infix, 1, 1) == "-", str-slice($infix, 2), $infix);
24
+
25
+ // Don't prefix if value key is null (eg. with shadow class)
26
+ $property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, "");
27
+
28
+ @if map-get($utility, rfs) {
29
+ // Inside the media query
30
+ @if $is-rfs-media-query {
31
+ $val: rfs-value($value);
32
+
33
+ // Do not render anything if fluid and non fluid values are the same
34
+ $value: if($val == rfs-fluid-value($value), null, $val);
35
+ }
36
+ @else {
37
+ $value: rfs-fluid-value($value);
38
+ }
39
+ }
40
+
41
+ @if $value != null {
42
+ .#{$property-class + $infix + $property-class-modifier} {
43
+ @each $property in $properties {
44
+ #{$property}: $value if($enable-important-utilities, !important, null);
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }