bootstrap 4.2.1 → 4.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +15 -1
- data/CHANGELOG.md +2 -14
- data/README.md +1 -1
- data/assets/javascripts/bootstrap-sprockets.js +7 -7
- data/assets/javascripts/bootstrap.js +1054 -893
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/javascripts/bootstrap/alert.js +35 -57
- data/assets/javascripts/bootstrap/button.js +95 -69
- data/assets/javascripts/bootstrap/carousel.js +109 -165
- data/assets/javascripts/bootstrap/collapse.js +58 -114
- data/assets/javascripts/bootstrap/dropdown.js +138 -191
- data/assets/javascripts/bootstrap/modal.js +170 -176
- data/assets/javascripts/bootstrap/popover.js +31 -87
- data/assets/javascripts/bootstrap/scrollspy.js +54 -114
- data/assets/javascripts/bootstrap/tab.js +62 -81
- data/assets/javascripts/bootstrap/toast.js +80 -117
- data/assets/javascripts/bootstrap/tooltip.js +269 -157
- data/assets/javascripts/bootstrap/util.js +34 -9
- data/assets/stylesheets/_bootstrap-grid.scss +4 -4
- data/assets/stylesheets/_bootstrap-reboot.scss +4 -4
- data/assets/stylesheets/_bootstrap.scss +4 -4
- data/assets/stylesheets/bootstrap/_badge.scss +3 -2
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +4 -1
- data/assets/stylesheets/bootstrap/_button-group.scss +1 -1
- data/assets/stylesheets/bootstrap/_buttons.scss +13 -11
- data/assets/stylesheets/bootstrap/_card.scss +49 -73
- data/assets/stylesheets/bootstrap/_carousel.scss +7 -8
- data/assets/stylesheets/bootstrap/_close.scss +3 -7
- data/assets/stylesheets/bootstrap/_code.scss +6 -6
- data/assets/stylesheets/bootstrap/_custom-forms.scss +40 -24
- data/assets/stylesheets/bootstrap/_dropdown.scss +24 -23
- data/assets/stylesheets/bootstrap/_forms.scss +38 -25
- data/assets/stylesheets/bootstrap/_functions.scss +62 -7
- data/assets/stylesheets/bootstrap/_grid.scss +32 -11
- data/assets/stylesheets/bootstrap/_images.scss +3 -3
- data/assets/stylesheets/bootstrap/_input-group.scss +4 -5
- data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +62 -29
- data/assets/stylesheets/bootstrap/_mixins.scss +9 -3
- data/assets/stylesheets/bootstrap/_modal.scss +65 -11
- data/assets/stylesheets/bootstrap/_nav.scss +6 -3
- data/assets/stylesheets/bootstrap/_navbar.scss +48 -23
- data/assets/stylesheets/bootstrap/_pagination.scss +3 -7
- data/assets/stylesheets/bootstrap/_popover.scss +54 -67
- data/assets/stylesheets/bootstrap/_print.scss +3 -3
- data/assets/stylesheets/bootstrap/_progress.scss +19 -6
- data/assets/stylesheets/bootstrap/_reboot.scss +51 -33
- data/assets/stylesheets/bootstrap/_root.scss +1 -0
- data/assets/stylesheets/bootstrap/_spinners.scss +3 -0
- data/assets/stylesheets/bootstrap/_tables.scss +6 -8
- data/assets/stylesheets/bootstrap/_toasts.scss +7 -4
- data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
- data/assets/stylesheets/bootstrap/_transitions.scss +0 -2
- data/assets/stylesheets/bootstrap/_type.scss +17 -17
- data/assets/stylesheets/bootstrap/_utilities.scss +2 -0
- data/assets/stylesheets/bootstrap/_variables.scss +168 -119
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +7 -1
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +51 -10
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +14 -15
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +12 -12
- data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_float.scss +6 -3
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +40 -60
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +29 -15
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +25 -7
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_image.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +7 -4
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +1 -3
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +17 -7
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
- data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +13 -1
- data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -18
- data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
- data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
- data/assets/stylesheets/bootstrap/utilities/_text.scss +8 -3
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +204 -0
- data/bootstrap.gemspec +1 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +1 -1
- data/tasks/updater/network.rb +2 -2
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +18 -13
- metadata +14 -5
@@ -15,12 +15,15 @@
|
|
15
15
|
@each $breakpoint in map-keys($breakpoints) {
|
16
16
|
$infix: breakpoint-infix($breakpoint, $breakpoints);
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
@if $columns > 0 {
|
19
|
+
// Allow columns to stretch full width below their breakpoints
|
20
|
+
@for $i from 1 through $columns {
|
21
|
+
.col#{$infix}-#{$i} {
|
22
|
+
@extend %grid-column;
|
23
|
+
}
|
22
24
|
}
|
23
25
|
}
|
26
|
+
|
24
27
|
.col#{$infix},
|
25
28
|
.col#{$infix}-auto {
|
26
29
|
@extend %grid-column;
|
@@ -33,15 +36,24 @@
|
|
33
36
|
flex-grow: 1;
|
34
37
|
max-width: 100%;
|
35
38
|
}
|
39
|
+
|
40
|
+
@if $grid-row-columns > 0 {
|
41
|
+
@for $i from 1 through $grid-row-columns {
|
42
|
+
.row-cols#{$infix}-#{$i} {
|
43
|
+
@include row-cols($i);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
36
48
|
.col#{$infix}-auto {
|
37
|
-
|
38
|
-
width: auto;
|
39
|
-
max-width: 100%; // Reset earlier grid tiers
|
49
|
+
@include make-col-auto();
|
40
50
|
}
|
41
51
|
|
42
|
-
@
|
43
|
-
|
44
|
-
|
52
|
+
@if $columns > 0 {
|
53
|
+
@for $i from 1 through $columns {
|
54
|
+
.col#{$infix}-#{$i} {
|
55
|
+
@include make-col($i, $columns);
|
56
|
+
}
|
45
57
|
}
|
46
58
|
}
|
47
59
|
|
@@ -53,11 +65,13 @@
|
|
53
65
|
.order#{$infix}-#{$i} { order: $i; }
|
54
66
|
}
|
55
67
|
|
56
|
-
|
57
|
-
|
58
|
-
@
|
59
|
-
|
60
|
-
|
68
|
+
@if $columns > 0 {
|
69
|
+
// `$columns - 1` because offsetting by the width of an entire row isn't possible
|
70
|
+
@for $i from 0 through ($columns - 1) {
|
71
|
+
@if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
|
72
|
+
.offset#{$infix}-#{$i} {
|
73
|
+
@include make-col-offset($i, $columns);
|
74
|
+
}
|
61
75
|
}
|
62
76
|
}
|
63
77
|
}
|
@@ -10,6 +10,12 @@
|
|
10
10
|
margin-left: auto;
|
11
11
|
}
|
12
12
|
|
13
|
+
@mixin make-row($gutter: $grid-gutter-width) {
|
14
|
+
display: flex;
|
15
|
+
flex-wrap: wrap;
|
16
|
+
margin-right: -$gutter / 2;
|
17
|
+
margin-left: -$gutter / 2;
|
18
|
+
}
|
13
19
|
|
14
20
|
// For each breakpoint, define the maximum width of the container in a media query
|
15
21
|
@mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
|
@@ -18,13 +24,7 @@
|
|
18
24
|
max-width: $container-max-width;
|
19
25
|
}
|
20
26
|
}
|
21
|
-
|
22
|
-
|
23
|
-
@mixin make-row($gutter: $grid-gutter-width) {
|
24
|
-
display: flex;
|
25
|
-
flex-wrap: wrap;
|
26
|
-
margin-right: -$gutter / 2;
|
27
|
-
margin-left: -$gutter / 2;
|
27
|
+
@include deprecate("The `make-container-max-widths` mixin", "v4.5.2", "v5");
|
28
28
|
}
|
29
29
|
|
30
30
|
@mixin make-col-ready($gutter: $grid-gutter-width) {
|
@@ -45,7 +45,25 @@
|
|
45
45
|
max-width: percentage($size / $columns);
|
46
46
|
}
|
47
47
|
|
48
|
+
@mixin make-col-auto() {
|
49
|
+
flex: 0 0 auto;
|
50
|
+
width: auto;
|
51
|
+
max-width: 100%; // Reset earlier grid tiers
|
52
|
+
}
|
53
|
+
|
48
54
|
@mixin make-col-offset($size, $columns: $grid-columns) {
|
49
55
|
$num: $size / $columns;
|
50
56
|
margin-left: if($num == 0, 0, percentage($num));
|
51
57
|
}
|
58
|
+
|
59
|
+
// Row columns
|
60
|
+
//
|
61
|
+
// Specify on a parent element(e.g., .row) to force immediate children into NN
|
62
|
+
// numberof columns. Supports wrapping to new lines, but does not do a Masonry
|
63
|
+
// style grid.
|
64
|
+
@mixin row-cols($count) {
|
65
|
+
& > * {
|
66
|
+
flex: 0 0 100% / $count;
|
67
|
+
max-width: 100% / $count;
|
68
|
+
}
|
69
|
+
}
|
@@ -9,18 +9,18 @@
|
|
9
9
|
//
|
10
10
|
// Issue: https://github.com/twbs/bootstrap/issues/25195
|
11
11
|
|
12
|
-
@mixin hover {
|
12
|
+
@mixin hover() {
|
13
13
|
&:hover { @content; }
|
14
14
|
}
|
15
15
|
|
16
|
-
@mixin hover-focus {
|
16
|
+
@mixin hover-focus() {
|
17
17
|
&:hover,
|
18
18
|
&:focus {
|
19
19
|
@content;
|
20
20
|
}
|
21
21
|
}
|
22
22
|
|
23
|
-
@mixin plain-hover-focus {
|
23
|
+
@mixin plain-hover-focus() {
|
24
24
|
&,
|
25
25
|
&:hover,
|
26
26
|
&:focus {
|
@@ -28,7 +28,7 @@
|
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
31
|
-
@mixin hover-focus-active {
|
31
|
+
@mixin hover-focus-active() {
|
32
32
|
&:hover,
|
33
33
|
&:focus,
|
34
34
|
&:active {
|
@@ -7,7 +7,7 @@
|
|
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
|
@@ -20,7 +20,6 @@
|
|
20
20
|
//
|
21
21
|
// Short retina mixin for setting background-image and -size.
|
22
22
|
|
23
|
-
// stylelint-disable indentation, media-query-list-comma-newline-after
|
24
23
|
@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
|
25
24
|
background-image: url($file-1x);
|
26
25
|
|
@@ -29,8 +28,9 @@
|
|
29
28
|
// There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
|
30
29
|
// Compatibility info: https://caniuse.com/#feat=css-media-resolution
|
31
30
|
@media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
|
32
|
-
|
31
|
+
only screen and (min-resolution: 2dppx) { // Standardized
|
33
32
|
background-image: url($file-2x);
|
34
33
|
background-size: $width-1x $height-1x;
|
35
34
|
}
|
35
|
+
@include deprecate("`img-retina()`", "v4.3.0", "v5");
|
36
36
|
}
|
@@ -2,9 +2,10 @@
|
|
2
2
|
//
|
3
3
|
// Dividers (basically an hr) within dropdowns and nav lists
|
4
4
|
|
5
|
-
@mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y) {
|
5
|
+
@mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y, $ignore-warning: false) {
|
6
6
|
height: 0;
|
7
7
|
margin: $margin-y 0;
|
8
8
|
overflow: hidden;
|
9
9
|
border-top: 1px solid $color;
|
10
|
+
@include deprecate("The `nav-divider()` mixin", "v4.4.0", "v5", $ignore-warning);
|
10
11
|
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
@mixin reset-text {
|
1
|
+
@mixin reset-text() {
|
2
2
|
font-family: $font-family-base;
|
3
3
|
// We deliberately do NOT reset font-size or word-wrap.
|
4
4
|
font-style: normal;
|
5
5
|
font-weight: $font-weight-normal;
|
6
6
|
line-height: $line-height-base;
|
7
7
|
text-align: left; // Fallback for where `start` is not supported
|
8
|
-
text-align: start;
|
8
|
+
text-align: start;
|
9
9
|
text-decoration: none;
|
10
10
|
text-shadow: none;
|
11
11
|
text-transform: none;
|
@@ -3,11 +3,12 @@
|
|
3
3
|
// See: https://a11yproject.com/posts/how-to-hide-content/
|
4
4
|
// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
|
5
5
|
|
6
|
-
@mixin sr-only {
|
6
|
+
@mixin sr-only() {
|
7
7
|
position: absolute;
|
8
8
|
width: 1px;
|
9
9
|
height: 1px;
|
10
10
|
padding: 0;
|
11
|
+
margin: -1px; // Fix for https://github.com/twbs/bootstrap/issues/25686
|
11
12
|
overflow: hidden;
|
12
13
|
clip: rect(0, 0, 0, 0);
|
13
14
|
white-space: nowrap;
|
@@ -20,7 +21,7 @@
|
|
20
21
|
//
|
21
22
|
// Credit: HTML5 Boilerplate
|
22
23
|
|
23
|
-
@mixin sr-only-focusable {
|
24
|
+
@mixin sr-only-focusable() {
|
24
25
|
&:active,
|
25
26
|
&:focus {
|
26
27
|
position: static;
|
@@ -2,13 +2,16 @@
|
|
2
2
|
|
3
3
|
// Typography
|
4
4
|
|
5
|
-
@mixin text-emphasis-variant($parent, $color) {
|
5
|
+
@mixin text-emphasis-variant($parent, $color, $ignore-warning: false) {
|
6
6
|
#{$parent} {
|
7
7
|
color: $color !important;
|
8
8
|
}
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
@if $emphasized-link-hover-darken-percentage != 0 {
|
10
|
+
a#{$parent} {
|
11
|
+
@include hover-focus() {
|
12
|
+
color: darken($color, $emphasized-link-hover-darken-percentage) !important;
|
13
|
+
}
|
12
14
|
}
|
13
15
|
}
|
16
|
+
@include deprecate("`text-emphasis-variant()`", "v4.4.0", "v5", $ignore-warning);
|
14
17
|
}
|
@@ -7,7 +7,5 @@
|
|
7
7
|
background-color: transparent;
|
8
8
|
border: 0;
|
9
9
|
|
10
|
-
@
|
11
|
-
@warn "The `text-hide()` mixin has been deprecated as of v4.1.0. It will be removed entirely in v5.";
|
12
|
-
}
|
10
|
+
@include deprecate("`text-hide()`", "v4.1.0", "v5", $ignore-warning);
|
13
11
|
}
|
@@ -1,16 +1,26 @@
|
|
1
1
|
// stylelint-disable property-blacklist
|
2
2
|
@mixin transition($transition...) {
|
3
|
+
@if length($transition) == 0 {
|
4
|
+
$transition: $transition-base;
|
5
|
+
}
|
6
|
+
|
7
|
+
@if length($transition) > 1 {
|
8
|
+
@each $value in $transition {
|
9
|
+
@if $value == null or $value == none {
|
10
|
+
@warn "The keyword 'none' or 'null' must be used as a single argument.";
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
3
15
|
@if $enable-transitions {
|
4
|
-
@if
|
5
|
-
transition: $transition-base;
|
6
|
-
} @else {
|
16
|
+
@if nth($transition, 1) != null {
|
7
17
|
transition: $transition;
|
8
18
|
}
|
9
|
-
}
|
10
19
|
|
11
|
-
|
12
|
-
|
13
|
-
|
20
|
+
@if $enable-prefers-reduced-motion-media-query and nth($transition, 1) != null and nth($transition, 1) != none {
|
21
|
+
@media (prefers-reduced-motion: reduce) {
|
22
|
+
transition: none;
|
23
|
+
}
|
14
24
|
}
|
15
25
|
}
|
16
26
|
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
// stylelint-disable declaration-no-important
|
2
2
|
|
3
3
|
@each $color, $value in $theme-colors {
|
4
|
-
@include bg-variant(".bg-#{$color}", $value);
|
4
|
+
@include bg-variant(".bg-#{$color}", $value, true);
|
5
5
|
}
|
6
6
|
|
7
7
|
@if $enable-gradients {
|
8
8
|
@each $color, $value in $theme-colors {
|
9
|
-
@include bg-gradient-variant(".bg-gradient-#{$color}", $value);
|
9
|
+
@include bg-gradient-variant(".bg-gradient-#{$color}", $value, true);
|
10
10
|
}
|
11
11
|
}
|
12
12
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// stylelint-disable declaration-no-important
|
1
|
+
// stylelint-disable property-blacklist, declaration-no-important
|
2
2
|
|
3
3
|
//
|
4
4
|
// Border
|
@@ -30,26 +30,38 @@
|
|
30
30
|
// Border-radius
|
31
31
|
//
|
32
32
|
|
33
|
+
.rounded-sm {
|
34
|
+
border-radius: $border-radius-sm !important;
|
35
|
+
}
|
36
|
+
|
33
37
|
.rounded {
|
34
38
|
border-radius: $border-radius !important;
|
35
39
|
}
|
40
|
+
|
36
41
|
.rounded-top {
|
37
42
|
border-top-left-radius: $border-radius !important;
|
38
43
|
border-top-right-radius: $border-radius !important;
|
39
44
|
}
|
45
|
+
|
40
46
|
.rounded-right {
|
41
47
|
border-top-right-radius: $border-radius !important;
|
42
48
|
border-bottom-right-radius: $border-radius !important;
|
43
49
|
}
|
50
|
+
|
44
51
|
.rounded-bottom {
|
45
52
|
border-bottom-right-radius: $border-radius !important;
|
46
53
|
border-bottom-left-radius: $border-radius !important;
|
47
54
|
}
|
55
|
+
|
48
56
|
.rounded-left {
|
49
57
|
border-top-left-radius: $border-radius !important;
|
50
58
|
border-bottom-left-radius: $border-radius !important;
|
51
59
|
}
|
52
60
|
|
61
|
+
.rounded-lg {
|
62
|
+
border-radius: $border-radius-lg !important;
|
63
|
+
}
|
64
|
+
|
53
65
|
.rounded-circle {
|
54
66
|
border-radius: 50% !important;
|
55
67
|
}
|
@@ -8,15 +8,9 @@
|
|
8
8
|
@include media-breakpoint-up($breakpoint) {
|
9
9
|
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
.d#{$infix}-block { display: block !important; }
|
15
|
-
.d#{$infix}-table { display: table !important; }
|
16
|
-
.d#{$infix}-table-row { display: table-row !important; }
|
17
|
-
.d#{$infix}-table-cell { display: table-cell !important; }
|
18
|
-
.d#{$infix}-flex { display: flex !important; }
|
19
|
-
.d#{$infix}-inline-flex { display: inline-flex !important; }
|
11
|
+
@each $value in $displays {
|
12
|
+
.d#{$infix}-#{$value} { display: $value !important; }
|
13
|
+
}
|
20
14
|
}
|
21
15
|
}
|
22
16
|
|
@@ -26,13 +20,7 @@
|
|
26
20
|
//
|
27
21
|
|
28
22
|
@media print {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
.d-print-block { display: block !important; }
|
33
|
-
.d-print-table { display: table !important; }
|
34
|
-
.d-print-table-row { display: table-row !important; }
|
35
|
-
.d-print-table-cell { display: table-cell !important; }
|
36
|
-
.d-print-flex { display: flex !important; }
|
37
|
-
.d-print-inline-flex { display: inline-flex !important; }
|
23
|
+
@each $value in $displays {
|
24
|
+
.d-print-#{$value} { display: $value !important; }
|
25
|
+
}
|
38
26
|
}
|