bootstrap 4.6.2.1 → 5.3.5
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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +61 -0
- data/CHANGELOG.md +7 -2
- data/Gemfile +1 -0
- data/README.md +33 -15
- data/Rakefile +1 -2
- data/assets/javascripts/bootstrap/alert.js +50 -147
- data/assets/javascripts/bootstrap/base-component.js +83 -0
- data/assets/javascripts/bootstrap/button.js +40 -190
- data/assets/javascripts/bootstrap/carousel.js +282 -537
- data/assets/javascripts/bootstrap/collapse.js +166 -314
- data/assets/javascripts/bootstrap/dom/data.js +62 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +236 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +71 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +103 -0
- data/assets/javascripts/bootstrap/dropdown.js +297 -455
- data/assets/javascripts/bootstrap/modal.js +223 -566
- data/assets/javascripts/bootstrap/offcanvas.js +245 -0
- data/assets/javascripts/bootstrap/popover.js +59 -208
- data/assets/javascripts/bootstrap/scrollspy.js +213 -276
- data/assets/javascripts/bootstrap/tab.js +222 -200
- data/assets/javascripts/bootstrap/toast.js +137 -206
- data/assets/javascripts/bootstrap/tooltip.js +403 -747
- data/assets/javascripts/bootstrap/util/backdrop.js +138 -0
- data/assets/javascripts/bootstrap/util/component-functions.js +41 -0
- data/assets/javascripts/bootstrap/util/config.js +67 -0
- data/assets/javascripts/bootstrap/util/focustrap.js +112 -0
- data/assets/javascripts/bootstrap/util/index.js +280 -0
- data/assets/javascripts/bootstrap/util/sanitizer.js +113 -0
- data/assets/javascripts/bootstrap/util/scrollbar.js +112 -0
- data/assets/javascripts/bootstrap/util/swipe.js +134 -0
- data/assets/javascripts/bootstrap/util/template-factory.js +150 -0
- data/assets/javascripts/bootstrap-global-this-define.js +6 -0
- data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
- data/assets/javascripts/bootstrap-sprockets.js +21 -5
- data/assets/javascripts/bootstrap.js +3625 -3488
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +53 -21
- data/assets/stylesheets/_bootstrap-reboot.scss +5 -7
- data/assets/stylesheets/_bootstrap-utilities.scss +19 -0
- data/assets/stylesheets/_bootstrap.scss +21 -13
- data/assets/stylesheets/bootstrap/_accordion.scss +153 -0
- data/assets/stylesheets/bootstrap/_alert.scss +32 -16
- data/assets/stylesheets/bootstrap/_badge.scss +15 -31
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +22 -24
- data/assets/stylesheets/bootstrap/_button-group.scss +32 -48
- data/assets/stylesheets/bootstrap/_buttons.scss +145 -71
- data/assets/stylesheets/bootstrap/_card.scss +67 -115
- data/assets/stylesheets/bootstrap/_carousel.scss +63 -37
- data/assets/stylesheets/bootstrap/_close.scss +53 -27
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +129 -71
- data/assets/stylesheets/bootstrap/_forms.scss +9 -347
- data/assets/stylesheets/bootstrap/_functions.scss +135 -23
- data/assets/stylesheets/bootstrap/_grid.scss +18 -52
- data/assets/stylesheets/bootstrap/_helpers.scss +12 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +93 -48
- data/assets/stylesheets/bootstrap/_maps.scss +174 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +10 -15
- data/assets/stylesheets/bootstrap/_modal.scss +112 -112
- data/assets/stylesheets/bootstrap/_nav.scss +100 -28
- data/assets/stylesheets/bootstrap/_navbar.scss +130 -173
- data/assets/stylesheets/bootstrap/_offcanvas.scss +147 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +72 -37
- data/assets/stylesheets/bootstrap/_placeholders.scss +51 -0
- data/assets/stylesheets/bootstrap/_popover.scss +99 -73
- data/assets/stylesheets/bootstrap/_progress.scss +35 -14
- data/assets/stylesheets/bootstrap/_reboot.scss +319 -192
- data/assets/stylesheets/bootstrap/_root.scss +177 -9
- data/assets/stylesheets/bootstrap/_spinners.scss +43 -23
- data/assets/stylesheets/bootstrap/_tables.scss +101 -115
- data/assets/stylesheets/bootstrap/_toasts.scss +54 -27
- data/assets/stylesheets/bootstrap/_tooltip.scss +67 -63
- data/assets/stylesheets/bootstrap/_transitions.scss +3 -2
- data/assets/stylesheets/bootstrap/_type.scss +40 -59
- data/assets/stylesheets/bootstrap/_utilities.scss +806 -18
- data/assets/stylesheets/bootstrap/_variables-dark.scss +102 -0
- data/assets/stylesheets/bootstrap/_variables.scss +1210 -606
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +97 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +189 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +214 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +80 -0
- data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +132 -0
- data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
- data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +7 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +30 -0
- data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
- data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -0
- data/assets/stylesheets/bootstrap/helpers/_position.scss +36 -0
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
- data/assets/stylesheets/bootstrap/helpers/_stacks.scss +15 -0
- data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
- data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
- data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
- data/assets/stylesheets/bootstrap/helpers/_vr.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +11 -6
- data/assets/stylesheets/bootstrap/mixins/_backdrop.scss +14 -0
- data/assets/stylesheets/bootstrap/mixins/_banner.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +10 -8
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +20 -16
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +60 -100
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +34 -27
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
- data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_container.scss +11 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +64 -96
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +118 -36
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +7 -2
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +7 -19
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +97 -0
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +33 -0
- data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +211 -91
- data/bootstrap.gemspec +6 -6
- data/lib/bootstrap/engine.rb +0 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +17 -5
- data/tasks/updater/network.rb +2 -2
- data/tasks/updater/scss.rb +2 -2
- data/tasks/updater.rb +2 -2
- data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
- data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
- data/test/dummy_rails/app/views/pages/root.html +89 -0
- data/test/dummy_rails/config/application.rb +0 -5
- data/test/dummy_rails/public/favicon.ico +0 -0
- data/test/gemfiles/rails_4_2.gemfile +2 -1
- data/test/gemfiles/rails_5_0.gemfile +1 -2
- data/test/gemfiles/rails_5_1.gemfile +1 -2
- data/test/gemfiles/rails_5_2.gemfile +7 -0
- data/test/gemfiles/rails_6_0.gemfile +1 -1
- data/test/gemfiles/rails_6_1.gemfile +7 -0
- data/test/gemfiles/rails_7_0_dartsass.gemfile +0 -1
- data/test/gemfiles/rails_7_0_sassc.gemfile +0 -1
- data/test/rails_test.rb +0 -5
- data/test/test_helper.rb +3 -2
- metadata +92 -86
- data/.travis.yml +0 -31
- data/assets/javascripts/bootstrap/util.js +0 -189
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -211
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
- data/assets/stylesheets/bootstrap/_media.scss +0 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -132
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
- data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
- data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
- data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
- data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
- data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
- data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
- /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -1,54 +1,46 @@
|
|
1
|
-
|
1
|
+
// Grid system
|
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
|
+
--#{$prefix}gutter-x: #{$gutter};
|
7
|
+
--#{$prefix}gutter-y: 0;
|
14
8
|
display: flex;
|
15
9
|
flex-wrap: wrap;
|
16
|
-
|
17
|
-
margin-
|
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");
|
10
|
+
// TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed
|
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
|
28
14
|
}
|
29
15
|
|
30
|
-
@mixin make-col-ready(
|
31
|
-
|
16
|
+
@mixin make-col-ready() {
|
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
|
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
|
-
|
37
|
-
padding-
|
24
|
+
max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
|
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);
|
38
28
|
}
|
39
29
|
|
40
|
-
@mixin make-col($size, $columns: $grid-columns) {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
30
|
+
@mixin make-col($size: false, $columns: $grid-columns) {
|
31
|
+
@if $size {
|
32
|
+
flex: 0 0 auto;
|
33
|
+
width: percentage(divide($size, $columns));
|
34
|
+
|
35
|
+
} @else {
|
36
|
+
flex: 1 1 0;
|
37
|
+
max-width: 100%;
|
38
|
+
}
|
46
39
|
}
|
47
40
|
|
48
41
|
@mixin make-col-auto() {
|
49
42
|
flex: 0 0 auto;
|
50
43
|
width: auto;
|
51
|
-
max-width: 100%; // Reset earlier grid tiers
|
52
44
|
}
|
53
45
|
|
54
46
|
@mixin make-col-offset($size, $columns: $grid-columns) {
|
@@ -59,11 +51,101 @@
|
|
59
51
|
// Row columns
|
60
52
|
//
|
61
53
|
// Specify on a parent element(e.g., .row) to force immediate children into NN
|
62
|
-
//
|
54
|
+
// number of columns. Supports wrapping to new lines, but does not do a Masonry
|
63
55
|
// style grid.
|
64
56
|
@mixin row-cols($count) {
|
65
57
|
> * {
|
66
|
-
flex: 0 0
|
67
|
-
|
58
|
+
flex: 0 0 auto;
|
59
|
+
width: percentage(divide(1, $count));
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
// Framework grid generation
|
64
|
+
//
|
65
|
+
// Used only by Bootstrap to generate the correct number of grid classes given
|
66
|
+
// any value of `$grid-columns`.
|
67
|
+
|
68
|
+
@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
|
69
|
+
@each $breakpoint in map-keys($breakpoints) {
|
70
|
+
$infix: breakpoint-infix($breakpoint, $breakpoints);
|
71
|
+
|
72
|
+
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
73
|
+
// Provide basic `.col-{bp}` classes for equal-width flexbox columns
|
74
|
+
.col#{$infix} {
|
75
|
+
flex: 1 0 0;
|
76
|
+
}
|
77
|
+
|
78
|
+
.row-cols#{$infix}-auto > * {
|
79
|
+
@include make-col-auto();
|
80
|
+
}
|
81
|
+
|
82
|
+
@if $grid-row-columns > 0 {
|
83
|
+
@for $i from 1 through $grid-row-columns {
|
84
|
+
.row-cols#{$infix}-#{$i} {
|
85
|
+
@include row-cols($i);
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
.col#{$infix}-auto {
|
91
|
+
@include make-col-auto();
|
92
|
+
}
|
93
|
+
|
94
|
+
@if $columns > 0 {
|
95
|
+
@for $i from 1 through $columns {
|
96
|
+
.col#{$infix}-#{$i} {
|
97
|
+
@include make-col($i, $columns);
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
// `$columns - 1` because offsetting by the width of an entire row isn't possible
|
102
|
+
@for $i from 0 through ($columns - 1) {
|
103
|
+
@if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
|
104
|
+
.offset#{$infix}-#{$i} {
|
105
|
+
@include make-col-offset($i, $columns);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
// Gutters
|
112
|
+
//
|
113
|
+
// Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
|
114
|
+
@each $key, $value in $gutters {
|
115
|
+
.g#{$infix}-#{$key},
|
116
|
+
.gx#{$infix}-#{$key} {
|
117
|
+
--#{$prefix}gutter-x: #{$value};
|
118
|
+
}
|
119
|
+
|
120
|
+
.g#{$infix}-#{$key},
|
121
|
+
.gy#{$infix}-#{$key} {
|
122
|
+
--#{$prefix}gutter-y: #{$value};
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
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 an 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
|
+
}
|
68
150
|
}
|
69
151
|
}
|
@@ -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
|
-
}
|
@@ -1,14 +1,18 @@
|
|
1
|
+
@include deprecate("`list-group-item-variant()`", "v5.3.0", "v6.0.0");
|
2
|
+
|
1
3
|
// List Groups
|
2
4
|
|
5
|
+
// scss-docs-start list-group-mixin
|
3
6
|
@mixin list-group-item-variant($state, $background, $color) {
|
4
7
|
.list-group-item-#{$state} {
|
5
8
|
color: $color;
|
6
9
|
background-color: $background;
|
7
10
|
|
8
11
|
&.list-group-item-action {
|
9
|
-
|
12
|
+
&:hover,
|
13
|
+
&:focus {
|
10
14
|
color: $color;
|
11
|
-
background-color:
|
15
|
+
background-color: shade-color($background, 10%);
|
12
16
|
}
|
13
17
|
|
14
18
|
&.active {
|
@@ -19,3 +23,4 @@
|
|
19
23
|
}
|
20
24
|
}
|
21
25
|
}
|
26
|
+
// scss-docs-end list-group-mixin
|
@@ -1,22 +1,10 @@
|
|
1
1
|
// Pagination
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
}
|
9
|
-
|
10
|
-
.page-item {
|
11
|
-
&:first-child {
|
12
|
-
.page-link {
|
13
|
-
@include border-left-radius($border-radius);
|
14
|
-
}
|
15
|
-
}
|
16
|
-
&:last-child {
|
17
|
-
.page-link {
|
18
|
-
@include border-right-radius($border-radius);
|
19
|
-
}
|
20
|
-
}
|
21
|
-
}
|
3
|
+
// scss-docs-start pagination-mixin
|
4
|
+
@mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
|
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};
|
22
9
|
}
|
10
|
+
// scss-docs-end pagination-mixin
|
@@ -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;
|
@@ -0,0 +1,24 @@
|
|
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
|
+
$table-border-color: mix($color, $background, percentage($table-border-factor));
|
9
|
+
|
10
|
+
--#{$prefix}table-color: #{$color};
|
11
|
+
--#{$prefix}table-bg: #{$background};
|
12
|
+
--#{$prefix}table-border-color: #{$table-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)};
|
19
|
+
|
20
|
+
color: var(--#{$prefix}table-color);
|
21
|
+
border-color: var(--#{$prefix}table-border-color);
|
22
|
+
}
|
23
|
+
}
|
24
|
+
// scss-docs-end table-variant
|
@@ -17,7 +17,7 @@
|
|
17
17
|
transition: $transition;
|
18
18
|
}
|
19
19
|
|
20
|
-
@if $enable-
|
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,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
|
+
// 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
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
// stylelint-disable declaration-no-important
|
2
|
+
|
3
|
+
// Hide content visually while keeping it accessible to assistive technologies
|
4
|
+
//
|
5
|
+
// See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
|
6
|
+
// See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
|
7
|
+
|
8
|
+
@mixin visually-hidden() {
|
9
|
+
width: 1px !important;
|
10
|
+
height: 1px !important;
|
11
|
+
padding: 0 !important;
|
12
|
+
margin: -1px !important; // Fix for https://github.com/twbs/bootstrap/issues/25686
|
13
|
+
overflow: hidden !important;
|
14
|
+
clip: rect(0, 0, 0, 0) !important;
|
15
|
+
white-space: nowrap !important;
|
16
|
+
border: 0 !important;
|
17
|
+
|
18
|
+
// Fix for positioned table caption that could become anonymous cells
|
19
|
+
&:not(caption) {
|
20
|
+
position: absolute !important;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
// Use to only display content when it's focused, or one of its child elements is focused
|
25
|
+
// (i.e. when focus is within the element/container that the class was applied to)
|
26
|
+
//
|
27
|
+
// Useful for "Skip to main content" links; see https://www.w3.org/WAI/WCAG22/Techniques/general/G1.html
|
28
|
+
|
29
|
+
@mixin visually-hidden-focusable() {
|
30
|
+
&:not(:focus):not(:focus-within) {
|
31
|
+
@include visually-hidden();
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
// Loop over each breakpoint
|
2
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
3
|
+
|
4
|
+
// Generate media query if needed
|
5
|
+
@include media-breakpoint-up($breakpoint) {
|
6
|
+
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
7
|
+
|
8
|
+
// Loop over each utility property
|
9
|
+
@each $key, $utility in $utilities {
|
10
|
+
// The utility can be disabled with `false`, thus check if the utility is a map first
|
11
|
+
// Only proceed if responsive media queries are enabled or if it's the base media query
|
12
|
+
@if type-of($utility) == "map" and (map-get($utility, responsive) or $infix == "") {
|
13
|
+
@include generate-utility($utility, $infix);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
// RFS rescaling
|
20
|
+
@media (min-width: $rfs-mq-value) {
|
21
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
22
|
+
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
23
|
+
|
24
|
+
@if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {
|
25
|
+
// Loop over each utility property
|
26
|
+
@each $key, $utility in $utilities {
|
27
|
+
// The utility can be disabled with `false`, thus check if the utility is a map first
|
28
|
+
// Only proceed if responsive media queries are enabled or if it's the base media query
|
29
|
+
@if type-of($utility) == "map" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == "") {
|
30
|
+
@include generate-utility($utility, $infix, true);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
|
38
|
+
// Print utilities
|
39
|
+
@media print {
|
40
|
+
@each $key, $utility in $utilities {
|
41
|
+
// The utility can be disabled with `false`, thus check if the utility is a map first
|
42
|
+
// Then check if the utility needs print styles
|
43
|
+
@if type-of($utility) == "map" and map-get($utility, print) == true {
|
44
|
+
@include generate-utility($utility, "-print");
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|