bootstrap 5.0.0.alpha1 → 5.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/README.md +1 -1
  4. data/assets/javascripts/bootstrap-sprockets.js +6 -6
  5. data/assets/javascripts/bootstrap.js +142 -155
  6. data/assets/javascripts/bootstrap.min.js +2 -2
  7. data/assets/javascripts/bootstrap/alert.js +17 -19
  8. data/assets/javascripts/bootstrap/button.js +14 -12
  9. data/assets/javascripts/bootstrap/carousel.js +47 -49
  10. data/assets/javascripts/bootstrap/collapse.js +50 -55
  11. data/assets/javascripts/bootstrap/dom/data.js +11 -11
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +9 -5
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +5 -9
  14. data/assets/javascripts/bootstrap/dom/polyfill.js +3 -3
  15. data/assets/javascripts/bootstrap/dom/selector-engine.js +3 -3
  16. data/assets/javascripts/bootstrap/dropdown.js +46 -48
  17. data/assets/javascripts/bootstrap/modal.js +77 -65
  18. data/assets/javascripts/bootstrap/popover.js +21 -23
  19. data/assets/javascripts/bootstrap/scrollspy.js +33 -39
  20. data/assets/javascripts/bootstrap/tab.js +24 -22
  21. data/assets/javascripts/bootstrap/toast.js +32 -28
  22. data/assets/javascripts/bootstrap/tooltip.js +67 -66
  23. data/assets/stylesheets/_bootstrap-grid.scss +2 -2
  24. data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
  25. data/assets/stylesheets/_bootstrap.scss +1 -1
  26. data/assets/stylesheets/bootstrap/_alert.scss +3 -4
  27. data/assets/stylesheets/bootstrap/_card.scss +6 -4
  28. data/assets/stylesheets/bootstrap/_carousel.scss +17 -0
  29. data/assets/stylesheets/bootstrap/_close.scss +25 -20
  30. data/assets/stylesheets/bootstrap/_dropdown.scss +42 -1
  31. data/assets/stylesheets/bootstrap/_functions.scss +4 -1
  32. data/assets/stylesheets/bootstrap/_helpers.scss +2 -2
  33. data/assets/stylesheets/bootstrap/_list-group.scss +1 -1
  34. data/assets/stylesheets/bootstrap/_mixins.scss +1 -1
  35. data/assets/stylesheets/bootstrap/_modal.scss +7 -7
  36. data/assets/stylesheets/bootstrap/_nav.scss +4 -0
  37. data/assets/stylesheets/bootstrap/_navbar.scss +1 -0
  38. data/assets/stylesheets/bootstrap/_pagination.scss +3 -0
  39. data/assets/stylesheets/bootstrap/_reboot.scss +7 -6
  40. data/assets/stylesheets/bootstrap/_spinners.scss +2 -2
  41. data/assets/stylesheets/bootstrap/_tables.scss +1 -1
  42. data/assets/stylesheets/bootstrap/_toasts.scss +6 -2
  43. data/assets/stylesheets/bootstrap/_utilities.scss +29 -1
  44. data/assets/stylesheets/bootstrap/_variables.scss +92 -44
  45. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
  46. data/assets/stylesheets/bootstrap/forms/_form-check.scss +1 -1
  47. data/assets/stylesheets/bootstrap/forms/_input-group.scss +2 -2
  48. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +1 -1
  49. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  50. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  51. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +9 -9
  52. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
  53. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +4 -3
  54. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -8
  55. data/assets/stylesheets/bootstrap/mixins/_container.scss +5 -3
  56. data/assets/stylesheets/bootstrap/mixins/_grid.scss +6 -7
  57. data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
  58. data/assets/stylesheets/bootstrap/mixins/{_screen-reader.scss → _visually-hidden.scss} +5 -5
  59. data/lib/bootstrap/version.rb +2 -2
  60. metadata +5 -5
  61. data/assets/stylesheets/bootstrap/helpers/_embed.scss +0 -31
  62. data/assets/stylesheets/bootstrap/helpers/_screenreaders.scss +0 -8
@@ -2,17 +2,15 @@
2
2
  @if $enable-shadows {
3
3
  $result: ();
4
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
- }
5
+ @each $value in $shadow {
6
+ @if $value != null {
7
+ $result: append($result, $value, "comma");
8
+ }
9
+ @if $value == none and length($shadow) > 1 {
10
+ @warn "The keyword 'none' must be used as a single argument.";
14
11
  }
15
12
  }
13
+
16
14
  @if (length($result) > 0) {
17
15
  box-shadow: $result;
18
16
  }
@@ -107,8 +107,9 @@
107
107
  // No minimum for the smallest breakpoint, and no maximum for the largest one.
108
108
  // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
109
109
  @mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
110
- $min: breakpoint-min($name, $breakpoints);
111
- $max: breakpoint-max(breakpoint-next($name, $breakpoints));
110
+ $min: breakpoint-min($name, $breakpoints);
111
+ $next: breakpoint-next($name, $breakpoints);
112
+ $max: breakpoint-max($next);
112
113
 
113
114
  @if $min != null and $max != null {
114
115
  @media (min-width: $min) and (max-width: $max) {
@@ -119,7 +120,7 @@
119
120
  @content;
120
121
  }
121
122
  } @else if $min == null {
122
- @include media-breakpoint-down($name, $breakpoints) {
123
+ @include media-breakpoint-down($next, $breakpoints) {
123
124
  @content;
124
125
  }
125
126
  }
@@ -7,12 +7,15 @@
7
7
  $background,
8
8
  $border,
9
9
  $color: color-contrast($background),
10
- $hover-background: darken($background, 7.5%),
11
- $hover-border: darken($border, 10%),
10
+ $hover-background: if($color == $color-contrast-light, darken($background, 7.5%), lighten($background, 7.5%)),
11
+ $hover-border: if($color == $color-contrast-light, darken($border, 10%), lighten($border, 5%)),
12
12
  $hover-color: color-contrast($hover-background),
13
- $active-background: darken($background, 10%),
14
- $active-border: darken($border, 12.5%),
15
- $active-color: color-contrast($active-background)
13
+ $active-background: if($color == $color-contrast-light, darken($background, 10%), lighten($background, 10%)),
14
+ $active-border: if($color == $color-contrast-light, darken($border, 12.5%), lighten($border, 5%)),
15
+ $active-color: color-contrast($active-background),
16
+ $disabled-background: $background,
17
+ $disabled-border: $border,
18
+ $disabled-color: color-contrast($disabled-background)
16
19
  ) {
17
20
  color: $color;
18
21
  @include gradient-bg($background);
@@ -61,11 +64,11 @@
61
64
 
62
65
  &:disabled,
63
66
  &.disabled {
64
- color: $color;
65
- background-color: $background;
67
+ color: $disabled-color;
68
+ background-color: $disabled-background;
66
69
  // Remove CSS gradients if they're enabled
67
70
  background-image: if($enable-gradients, none, null);
68
- border-color: $border;
71
+ border-color: $disabled-border;
69
72
  }
70
73
  }
71
74
 
@@ -1,9 +1,11 @@
1
1
  // Container mixins
2
2
 
3
- @mixin make-container($padding-x: $container-padding-x) {
3
+ @mixin make-container($gutter: $container-padding-x) {
4
+ --bs-gutter-x: #{$gutter};
5
+
4
6
  width: 100%;
5
- padding-right: $padding-x;
6
- padding-left: $padding-x;
7
+ padding-right: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-disallowed-list
8
+ padding-left: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-disallowed-list
7
9
  margin-right: auto;
8
10
  margin-left: auto;
9
11
  }
@@ -6,11 +6,10 @@
6
6
  --bs-gutter-x: #{$gutter};
7
7
  --bs-gutter-y: 0;
8
8
  display: flex;
9
- flex: 1 0 100%;
10
9
  flex-wrap: wrap;
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
10
+ margin-top: calc(var(--bs-gutter-y) * -1); // stylelint-disable-line function-disallowed-list
11
+ margin-right: calc(var(--bs-gutter-x) / -2); // stylelint-disable-line function-disallowed-list
12
+ margin-left: calc(var(--bs-gutter-x) / -2); // stylelint-disable-line function-disallowed-list
14
13
  }
15
14
 
16
15
  @mixin make-col-ready($gutter: $grid-gutter-width) {
@@ -22,8 +21,8 @@
22
21
  flex-shrink: 0;
23
22
  width: 100%;
24
23
  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
24
+ padding-right: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-disallowed-list
25
+ padding-left: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-disallowed-list
27
26
  margin-top: var(--bs-gutter-y);
28
27
  }
29
28
 
@@ -48,7 +47,7 @@
48
47
  // numberof columns. Supports wrapping to new lines, but does not do a Masonry
49
48
  // style grid.
50
49
  @mixin row-cols($count) {
51
- & > * {
50
+ > * {
52
51
  flex: 0 0 auto;
53
52
  width: 100% / $count;
54
53
  }
@@ -1,4 +1,4 @@
1
- // stylelint-disable property-blacklist
1
+ // stylelint-disable property-disallowed-list
2
2
  @mixin transition($transition...) {
3
3
  @if length($transition) == 0 {
4
4
  $transition: $transition-base;
@@ -1,11 +1,11 @@
1
1
  // stylelint-disable declaration-no-important
2
2
 
3
- // Only display content to screen readers
3
+ // Hide content visually while keeping it accessible to assistive technologies
4
4
  //
5
- // See: https://a11yproject.com/posts/how-to-hide-content/
5
+ // See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
6
6
  // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
7
7
 
8
- @mixin sr-only {
8
+ @mixin visually-hidden() {
9
9
  position: absolute !important;
10
10
  width: 1px !important;
11
11
  height: 1px !important;
@@ -21,8 +21,8 @@
21
21
  //
22
22
  // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
23
23
 
24
- @mixin sr-only-focusable {
24
+ @mixin visually-hidden-focusable() {
25
25
  &:not(:focus) {
26
- @include sr-only();
26
+ @include visually-hidden();
27
27
  }
28
28
  }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bootstrap
4
- VERSION = '5.0.0.alpha1'
5
- BOOTSTRAP_SHA = 'a1708ec2a38d331c4c9eacac08ce9c9839649476'
4
+ VERSION = '5.0.0.alpha2'
5
+ BOOTSTRAP_SHA = 'b083c9639fd9012e5cba57d6c4088d43b3c3e57d'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.alpha1
4
+ version: 5.0.0.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twitter, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-09 00:00:00.000000000 Z
11
+ date: 2020-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: popper_js
@@ -307,11 +307,11 @@ files:
307
307
  - assets/stylesheets/bootstrap/forms/_validation.scss
308
308
  - assets/stylesheets/bootstrap/helpers/_clearfix.scss
309
309
  - assets/stylesheets/bootstrap/helpers/_colored-links.scss
310
- - assets/stylesheets/bootstrap/helpers/_embed.scss
311
310
  - assets/stylesheets/bootstrap/helpers/_position.scss
312
- - assets/stylesheets/bootstrap/helpers/_screenreaders.scss
311
+ - assets/stylesheets/bootstrap/helpers/_ratio.scss
313
312
  - assets/stylesheets/bootstrap/helpers/_stretched-link.scss
314
313
  - assets/stylesheets/bootstrap/helpers/_text-truncation.scss
314
+ - assets/stylesheets/bootstrap/helpers/_visually-hidden.scss
315
315
  - assets/stylesheets/bootstrap/mixins/_alert.scss
316
316
  - assets/stylesheets/bootstrap/mixins/_border-radius.scss
317
317
  - assets/stylesheets/bootstrap/mixins/_box-shadow.scss
@@ -330,11 +330,11 @@ files:
330
330
  - assets/stylesheets/bootstrap/mixins/_pagination.scss
331
331
  - assets/stylesheets/bootstrap/mixins/_reset-text.scss
332
332
  - assets/stylesheets/bootstrap/mixins/_resize.scss
333
- - assets/stylesheets/bootstrap/mixins/_screen-reader.scss
334
333
  - assets/stylesheets/bootstrap/mixins/_table-variants.scss
335
334
  - assets/stylesheets/bootstrap/mixins/_text-truncate.scss
336
335
  - assets/stylesheets/bootstrap/mixins/_transition.scss
337
336
  - assets/stylesheets/bootstrap/mixins/_utilities.scss
337
+ - assets/stylesheets/bootstrap/mixins/_visually-hidden.scss
338
338
  - assets/stylesheets/bootstrap/utilities/_api.scss
339
339
  - assets/stylesheets/bootstrap/vendor/_rfs.scss
340
340
  - bootstrap.gemspec
@@ -1,31 +0,0 @@
1
- // Credit: Nicolas Gallagher and SUIT CSS.
2
-
3
- .embed-responsive {
4
- position: relative;
5
- width: 100%;
6
-
7
- &::before {
8
- display: block;
9
- content: "";
10
- }
11
-
12
- .embed-responsive-item,
13
- iframe,
14
- embed,
15
- object,
16
- video {
17
- position: absolute;
18
- top: 0;
19
- left: 0;
20
- width: 100%;
21
- height: 100%;
22
- }
23
- }
24
-
25
- @each $key, $ratio in $embed-responsive-aspect-ratios {
26
- .embed-responsive-#{$key} {
27
- &::before {
28
- padding-top: percentage(map-get($ratio, y) / map-get($ratio, x));
29
- }
30
- }
31
- }
@@ -1,8 +0,0 @@
1
- //
2
- // Screenreaders
3
- //
4
-
5
- .sr-only,
6
- .sr-only-focusable:not(:focus) {
7
- @include sr-only();
8
- }