bootstrap 4.2.1 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bootstrap might be problematic. Click here for more details.

Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap-sprockets.js +5 -5
  4. data/assets/javascripts/bootstrap.js +133 -94
  5. data/assets/javascripts/bootstrap.min.js +3 -3
  6. data/assets/javascripts/bootstrap/alert.js +10 -10
  7. data/assets/javascripts/bootstrap/button.js +8 -8
  8. data/assets/javascripts/bootstrap/carousel.js +14 -12
  9. data/assets/javascripts/bootstrap/collapse.js +10 -10
  10. data/assets/javascripts/bootstrap/dropdown.js +22 -18
  11. data/assets/javascripts/bootstrap/modal.js +19 -13
  12. data/assets/javascripts/bootstrap/popover.js +10 -10
  13. data/assets/javascripts/bootstrap/scrollspy.js +10 -10
  14. data/assets/javascripts/bootstrap/tab.js +14 -11
  15. data/assets/javascripts/bootstrap/toast.js +15 -10
  16. data/assets/javascripts/bootstrap/tooltip.js +41 -26
  17. data/assets/javascripts/bootstrap/util.js +11 -7
  18. data/assets/stylesheets/_bootstrap-grid.scss +3 -3
  19. data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
  20. data/assets/stylesheets/_bootstrap.scss +3 -3
  21. data/assets/stylesheets/bootstrap/_badge.scss +2 -1
  22. data/assets/stylesheets/bootstrap/_buttons.scss +2 -5
  23. data/assets/stylesheets/bootstrap/_card.scss +13 -34
  24. data/assets/stylesheets/bootstrap/_carousel.scss +1 -2
  25. data/assets/stylesheets/bootstrap/_close.scss +1 -4
  26. data/assets/stylesheets/bootstrap/_code.scss +5 -5
  27. data/assets/stylesheets/bootstrap/_custom-forms.scss +11 -11
  28. data/assets/stylesheets/bootstrap/_dropdown.scss +20 -20
  29. data/assets/stylesheets/bootstrap/_forms.scss +12 -16
  30. data/assets/stylesheets/bootstrap/_functions.scss +3 -3
  31. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  32. data/assets/stylesheets/bootstrap/_input-group.scss +3 -3
  33. data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -0
  34. data/assets/stylesheets/bootstrap/_list-group.scss +33 -5
  35. data/assets/stylesheets/bootstrap/_mixins.scss +6 -0
  36. data/assets/stylesheets/bootstrap/_modal.scss +47 -4
  37. data/assets/stylesheets/bootstrap/_navbar.scss +3 -8
  38. data/assets/stylesheets/bootstrap/_pagination.scss +0 -5
  39. data/assets/stylesheets/bootstrap/_popover.scss +46 -58
  40. data/assets/stylesheets/bootstrap/_print.scss +1 -1
  41. data/assets/stylesheets/bootstrap/_progress.scss +15 -6
  42. data/assets/stylesheets/bootstrap/_reboot.scss +28 -7
  43. data/assets/stylesheets/bootstrap/_spinners.scss +2 -0
  44. data/assets/stylesheets/bootstrap/_tables.scss +3 -5
  45. data/assets/stylesheets/bootstrap/_toasts.scss +3 -2
  46. data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
  47. data/assets/stylesheets/bootstrap/_transitions.scss +0 -2
  48. data/assets/stylesheets/bootstrap/_type.scss +15 -15
  49. data/assets/stylesheets/bootstrap/_utilities.scss +1 -0
  50. data/assets/stylesheets/bootstrap/_variables.scss +129 -97
  51. data/assets/stylesheets/bootstrap/mixins/_badge.scss +6 -0
  52. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +29 -1
  53. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
  54. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +3 -7
  55. data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
  56. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  57. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -0
  58. data/assets/stylesheets/bootstrap/mixins/_forms.scss +8 -14
  59. data/assets/stylesheets/bootstrap/mixins/_image.scss +2 -2
  60. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
  61. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  62. data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
  63. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +5 -3
  64. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +1 -3
  65. data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
  66. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
  67. data/assets/stylesheets/bootstrap/utilities/_borders.scss +13 -1
  68. data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -18
  69. data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
  70. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
  71. data/assets/stylesheets/bootstrap/utilities/_text.scss +6 -1
  72. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
  73. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +212 -0
  74. data/lib/bootstrap/version.rb +2 -2
  75. metadata +5 -2
@@ -7,5 +7,11 @@
7
7
  color: color-yiq($bg);
8
8
  background-color: darken($bg, 10%);
9
9
  }
10
+
11
+ &:focus,
12
+ &.focus {
13
+ outline: 0;
14
+ box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5);
15
+ }
10
16
  }
11
17
  }
@@ -1,9 +1,13 @@
1
+ // stylelint-disable property-blacklist
1
2
  // Single side border-radius
2
3
 
3
- @mixin border-radius($radius: $border-radius) {
4
+ @mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
4
5
  @if $enable-rounded {
5
6
  border-radius: $radius;
6
7
  }
8
+ @else if $fallback-border-radius != false {
9
+ border-radius: $fallback-border-radius;
10
+ }
7
11
  }
8
12
 
9
13
  @mixin border-top-radius($radius) {
@@ -33,3 +37,27 @@
33
37
  border-bottom-left-radius: $radius;
34
38
  }
35
39
  }
40
+
41
+ @mixin border-top-left-radius($radius) {
42
+ @if $enable-rounded {
43
+ border-top-left-radius: $radius;
44
+ }
45
+ }
46
+
47
+ @mixin border-top-right-radius($radius) {
48
+ @if $enable-rounded {
49
+ border-top-right-radius: $radius;
50
+ }
51
+ }
52
+
53
+ @mixin border-bottom-right-radius($radius) {
54
+ @if $enable-rounded {
55
+ border-bottom-right-radius: $radius;
56
+ }
57
+ }
58
+
59
+ @mixin border-bottom-left-radius($radius) {
60
+ @if $enable-rounded {
61
+ border-bottom-left-radius: $radius;
62
+ }
63
+ }
@@ -1,5 +1,20 @@
1
1
  @mixin box-shadow($shadow...) {
2
2
  @if $enable-shadows {
3
- box-shadow: $shadow;
3
+ $result: ();
4
+
5
+ @if (length($shadow) == 1) {
6
+ // We can pass `@include box-shadow(none);`
7
+ $result: $shadow;
8
+ } @else {
9
+ // Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;`
10
+ @for $i from 1 through length($shadow) {
11
+ @if nth($shadow, $i) != "none" {
12
+ $result: append($result, nth($shadow, $i), "comma");
13
+ }
14
+ }
15
+ }
16
+ @if (length($result) > 0) {
17
+ box-shadow: $result;
18
+ }
4
19
  }
5
20
  }
@@ -49,7 +49,7 @@
49
49
 
50
50
  &:focus {
51
51
  // Avoid using mixin so we can pass custom focus shadow properly
52
- @if $enable-shadows {
52
+ @if $enable-shadows and $btn-active-box-shadow != none {
53
53
  box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
54
54
  } @else {
55
55
  box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
@@ -100,12 +100,8 @@
100
100
  // Button sizes
101
101
  @mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
102
102
  padding: $padding-y $padding-x;
103
- font-size: $font-size;
103
+ @include font-size($font-size);
104
104
  line-height: $line-height;
105
105
  // Manually declare to provide an override to the browser default
106
- @if $enable-rounded {
107
- border-radius: $border-radius;
108
- } @else {
109
- border-radius: 0;
110
- }
106
+ @include border-radius($border-radius, 0);
111
107
  }
@@ -29,8 +29,8 @@
29
29
  @if $enable-caret {
30
30
  &::after {
31
31
  display: inline-block;
32
- margin-left: $caret-width * .85;
33
- vertical-align: $caret-width * .85;
32
+ margin-left: $caret-spacing;
33
+ vertical-align: $caret-vertical-align;
34
34
  content: "";
35
35
  @if $direction == down {
36
36
  @include caret-down;
@@ -48,8 +48,8 @@
48
48
 
49
49
  &::before {
50
50
  display: inline-block;
51
- margin-right: $caret-width * .85;
52
- vertical-align: $caret-width * .85;
51
+ margin-right: $caret-spacing;
52
+ vertical-align: $caret-vertical-align;
53
53
  content: "";
54
54
  @include caret-left;
55
55
  }
@@ -0,0 +1,10 @@
1
+ // Deprecate mixin
2
+ //
3
+ // This mixin can be used to deprecate mixins or functions.
4
+ // `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to
5
+ // some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap)
6
+ @mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) {
7
+ @if ($enable-deprecation-messages != false and $ignore-warning != true) {
8
+ @warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}.";
9
+ }
10
+ }
@@ -2,10 +2,13 @@
2
2
 
3
3
  @mixin float-left {
4
4
  float: left !important;
5
+ @include deprecate("The `float-left` mixin", "v4.3.0", "v5");
5
6
  }
6
7
  @mixin float-right {
7
8
  float: right !important;
9
+ @include deprecate("The `float-right` mixin", "v4.3.0", "v5");
8
10
  }
9
11
  @mixin float-none {
10
12
  float: none !important;
13
+ @include deprecate("The `float-none` mixin", "v4.3.0", "v5");
11
14
  }
@@ -26,12 +26,12 @@
26
26
  }
27
27
 
28
28
 
29
- @mixin form-validation-state($state, $color) {
29
+ @mixin form-validation-state($state, $color, $icon) {
30
30
  .#{$state}-feedback {
31
31
  display: none;
32
32
  width: 100%;
33
33
  margin-top: $form-feedback-margin-top;
34
- font-size: $form-feedback-font-size;
34
+ @include font-size($form-feedback-font-size);
35
35
  color: $color;
36
36
  }
37
37
 
@@ -43,7 +43,7 @@
43
43
  max-width: 100%; // Contain to parent when possible
44
44
  padding: $form-feedback-tooltip-padding-y $form-feedback-tooltip-padding-x;
45
45
  margin-top: .1rem;
46
- font-size: $form-feedback-tooltip-font-size;
46
+ @include font-size($form-feedback-tooltip-font-size);
47
47
  line-height: $form-feedback-tooltip-line-height;
48
48
  color: color-yiq($color);
49
49
  background-color: rgba($color, $form-feedback-tooltip-opacity);
@@ -57,15 +57,10 @@
57
57
 
58
58
  @if $enable-validation-icons {
59
59
  padding-right: $input-height-inner;
60
+ background-image: $icon;
60
61
  background-repeat: no-repeat;
61
- background-position: center right calc(#{$input-height-inner} / 4);
62
- background-size: calc(#{$input-height-inner} / 2) calc(#{$input-height-inner} / 2);
63
-
64
- @if $state == "valid" {
65
- background-image: $form-feedback-icon-valid;
66
- } @else {
67
- background-image: $form-feedback-icon-invalid;
68
- }
62
+ background-position: center right $input-height-inner-quarter;
63
+ background-size: $input-height-inner-half $input-height-inner-half;
69
64
  }
70
65
 
71
66
  &:focus {
@@ -86,7 +81,7 @@
86
81
  &.is-#{$state} {
87
82
  @if $enable-validation-icons {
88
83
  padding-right: $input-height-inner;
89
- background-position: top calc(#{$input-height-inner} / 4) right calc(#{$input-height-inner} / 4);
84
+ background-position: top $input-height-inner-quarter right $input-height-inner-quarter;
90
85
  }
91
86
  }
92
87
  }
@@ -97,9 +92,8 @@
97
92
  border-color: $color;
98
93
 
99
94
  @if $enable-validation-icons {
100
- $form-feedback-icon: if($state == "valid", $form-feedback-icon-valid, $form-feedback-icon-invalid);
101
95
  padding-right: $custom-select-feedback-icon-padding-right;
102
- background: $custom-select-background, $form-feedback-icon no-repeat $custom-select-feedback-icon-position / $custom-select-feedback-icon-size;
96
+ background: $custom-select-background, $icon $custom-select-bg no-repeat $custom-select-feedback-icon-position / $custom-select-feedback-icon-size;
103
97
  }
104
98
 
105
99
  &:focus {
@@ -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
- only screen and (min-resolution: 2dppx) { // Standardized
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
  }
@@ -3,7 +3,7 @@
3
3
  @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
4
4
  .page-link {
5
5
  padding: $padding-y $padding-x;
6
- font-size: $font-size;
6
+ @include font-size($font-size);
7
7
  line-height: $line-height;
8
8
  }
9
9
 
@@ -5,7 +5,7 @@
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; // stylelint-disable-line declaration-block-no-duplicate-properties
8
+ text-align: start;
9
9
  text-decoration: none;
10
10
  text-shadow: none;
11
11
  text-transform: none;
@@ -3,4 +3,5 @@
3
3
  @mixin size($width, $height: $width) {
4
4
  width: $width;
5
5
  height: $height;
6
+ @include deprecate("`size()`", "v4.3.0", "v5");
6
7
  }
@@ -6,9 +6,11 @@
6
6
  #{$parent} {
7
7
  color: $color !important;
8
8
  }
9
- a#{$parent} {
10
- @include hover-focus {
11
- color: darken($color, $emphasized-link-hover-darken-percentage) !important;
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
  }
14
16
  }
@@ -7,7 +7,5 @@
7
7
  background-color: transparent;
8
8
  border: 0;
9
9
 
10
- @if ($ignore-warning != true) {
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
  }
@@ -9,7 +9,7 @@
9
9
  }
10
10
 
11
11
  @if $enable-prefers-reduced-motion-media-query {
12
- @media screen and (prefers-reduced-motion: reduce) {
12
+ @media (prefers-reduced-motion: reduce) {
13
13
  transition: none;
14
14
  }
15
15
  }
@@ -4,4 +4,5 @@
4
4
 
5
5
  @mixin invisible($visibility) {
6
6
  visibility: $visibility !important;
7
+ @include deprecate("`invisible()`", "v4.3.0", "v5");
7
8
  }
@@ -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
- .d#{$infix}-none { display: none !important; }
12
- .d#{$infix}-inline { display: inline !important; }
13
- .d#{$infix}-inline-block { display: inline-block !important; }
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
- .d-print-none { display: none !important; }
30
- .d-print-inline { display: inline !important; }
31
- .d-print-inline-block { display: inline-block !important; }
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
  }
@@ -1,9 +1,11 @@
1
+ // stylelint-disable declaration-no-important
2
+
1
3
  @each $breakpoint in map-keys($grid-breakpoints) {
2
4
  @include media-breakpoint-up($breakpoint) {
3
5
  $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
4
6
 
5
- .float#{$infix}-left { @include float-left; }
6
- .float#{$infix}-right { @include float-right; }
7
- .float#{$infix}-none { @include float-none; }
7
+ .float#{$infix}-left { float: left !important; }
8
+ .float#{$infix}-right { float: right !important; }
9
+ .float#{$infix}-none { float: none !important; }
8
10
  }
9
11
  }
@@ -0,0 +1,19 @@
1
+ //
2
+ // Stretched link
3
+ //
4
+
5
+ .stretched-link {
6
+ &::after {
7
+ position: absolute;
8
+ top: 0;
9
+ right: 0;
10
+ bottom: 0;
11
+ left: 0;
12
+ z-index: 1;
13
+ // Just in case `pointer-events: none` is set on a parent
14
+ pointer-events: auto;
15
+ content: "";
16
+ // IE10 bugfix, see https://stackoverflow.com/questions/16947967/ie10-hover-pseudo-class-doesnt-work-without-background-color
17
+ background-color: rgba(0, 0, 0, 0);
18
+ }
19
+ }
@@ -4,7 +4,7 @@
4
4
  // Text
5
5
  //
6
6
 
7
- .text-monospace { font-family: $font-family-monospace; }
7
+ .text-monospace { font-family: $font-family-monospace !important; }
8
8
 
9
9
  // Alignment
10
10
 
@@ -62,6 +62,11 @@
62
62
 
63
63
  .text-decoration-none { text-decoration: none !important; }
64
64
 
65
+ .text-break {
66
+ word-break: break-word !important; // IE & < Edge 18
67
+ overflow-wrap: break-word !important;
68
+ }
69
+
65
70
  // Reset
66
71
 
67
72
  .text-reset { color: inherit !important; }
@@ -1,11 +1,13 @@
1
+ // stylelint-disable declaration-no-important
2
+
1
3
  //
2
4
  // Visibility utilities
3
5
  //
4
6
 
5
7
  .visible {
6
- @include invisible(visible);
8
+ visibility: visible !important;
7
9
  }
8
10
 
9
11
  .invisible {
10
- @include invisible(hidden);
12
+ visibility: hidden !important;
11
13
  }