bootstrap 4.6.0 → 5.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +61 -0
  3. data/Gemfile +1 -0
  4. data/README.md +33 -6
  5. data/Rakefile +10 -1
  6. data/assets/javascripts/bootstrap/alert.js +53 -155
  7. data/assets/javascripts/bootstrap/base-component.js +83 -0
  8. data/assets/javascripts/bootstrap/button.js +43 -198
  9. data/assets/javascripts/bootstrap/carousel.js +285 -550
  10. data/assets/javascripts/bootstrap/collapse.js +169 -323
  11. data/assets/javascripts/bootstrap/dom/data.js +62 -0
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +236 -0
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +71 -0
  14. data/assets/javascripts/bootstrap/dom/selector-engine.js +103 -0
  15. data/assets/javascripts/bootstrap/dropdown.js +300 -467
  16. data/assets/javascripts/bootstrap/modal.js +226 -575
  17. data/assets/javascripts/bootstrap/offcanvas.js +245 -0
  18. data/assets/javascripts/bootstrap/popover.js +61 -205
  19. data/assets/javascripts/bootstrap/scrollspy.js +216 -287
  20. data/assets/javascripts/bootstrap/tab.js +226 -203
  21. data/assets/javascripts/bootstrap/toast.js +136 -209
  22. data/assets/javascripts/bootstrap/tooltip.js +411 -757
  23. data/assets/javascripts/bootstrap/util/backdrop.js +139 -0
  24. data/assets/javascripts/bootstrap/util/component-functions.js +41 -0
  25. data/assets/javascripts/bootstrap/util/config.js +67 -0
  26. data/assets/javascripts/bootstrap/util/focustrap.js +113 -0
  27. data/assets/javascripts/bootstrap/util/index.js +281 -0
  28. data/assets/javascripts/bootstrap/util/sanitizer.js +110 -0
  29. data/assets/javascripts/bootstrap/util/scrollbar.js +112 -0
  30. data/assets/javascripts/bootstrap/util/swipe.js +134 -0
  31. data/assets/javascripts/bootstrap/util/template-factory.js +150 -0
  32. data/assets/javascripts/bootstrap-global-this-define.js +6 -0
  33. data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
  34. data/assets/javascripts/bootstrap-sprockets.js +23 -7
  35. data/assets/javascripts/bootstrap.js +3649 -3587
  36. data/assets/javascripts/bootstrap.min.js +3 -3
  37. data/assets/stylesheets/_bootstrap-grid.scss +53 -21
  38. data/assets/stylesheets/_bootstrap-reboot.scss +5 -7
  39. data/assets/stylesheets/_bootstrap-utilities.scss +19 -0
  40. data/assets/stylesheets/_bootstrap.scss +21 -13
  41. data/assets/stylesheets/bootstrap/_accordion.scss +158 -0
  42. data/assets/stylesheets/bootstrap/_alert.scss +32 -16
  43. data/assets/stylesheets/bootstrap/_badge.scss +15 -31
  44. data/assets/stylesheets/bootstrap/_breadcrumb.scss +22 -24
  45. data/assets/stylesheets/bootstrap/_button-group.scss +27 -48
  46. data/assets/stylesheets/bootstrap/_buttons.scss +136 -71
  47. data/assets/stylesheets/bootstrap/_card.scss +66 -113
  48. data/assets/stylesheets/bootstrap/_carousel.scss +83 -36
  49. data/assets/stylesheets/bootstrap/_close.scss +51 -28
  50. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  51. data/assets/stylesheets/bootstrap/_dropdown.scss +129 -71
  52. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  53. data/assets/stylesheets/bootstrap/_functions.scss +181 -23
  54. data/assets/stylesheets/bootstrap/_grid.scss +18 -52
  55. data/assets/stylesheets/bootstrap/_helpers.scss +12 -0
  56. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  57. data/assets/stylesheets/bootstrap/_list-group.scss +77 -34
  58. data/assets/stylesheets/bootstrap/_maps.scss +174 -0
  59. data/assets/stylesheets/bootstrap/_mixins.scss +10 -15
  60. data/assets/stylesheets/bootstrap/_modal.scss +107 -110
  61. data/assets/stylesheets/bootstrap/_nav.scss +102 -25
  62. data/assets/stylesheets/bootstrap/_navbar.scss +129 -172
  63. data/assets/stylesheets/bootstrap/_offcanvas.scss +146 -0
  64. data/assets/stylesheets/bootstrap/_pagination.scss +72 -37
  65. data/assets/stylesheets/bootstrap/_placeholders.scss +51 -0
  66. data/assets/stylesheets/bootstrap/_popover.scss +99 -73
  67. data/assets/stylesheets/bootstrap/_progress.scss +35 -14
  68. data/assets/stylesheets/bootstrap/_reboot.scss +319 -192
  69. data/assets/stylesheets/bootstrap/_root.scss +177 -9
  70. data/assets/stylesheets/bootstrap/_spinners.scss +44 -24
  71. data/assets/stylesheets/bootstrap/_tables.scss +101 -115
  72. data/assets/stylesheets/bootstrap/_toasts.scss +54 -27
  73. data/assets/stylesheets/bootstrap/_tooltip.scss +67 -63
  74. data/assets/stylesheets/bootstrap/_transitions.scss +8 -1
  75. data/assets/stylesheets/bootstrap/_type.scss +40 -59
  76. data/assets/stylesheets/bootstrap/_utilities.scss +806 -18
  77. data/assets/stylesheets/bootstrap/_variables-dark.scss +87 -0
  78. data/assets/stylesheets/bootstrap/_variables.scss +1216 -615
  79. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +95 -0
  80. data/assets/stylesheets/bootstrap/forms/_form-check.scss +189 -0
  81. data/assets/stylesheets/bootstrap/forms/_form-control.scss +214 -0
  82. data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
  83. data/assets/stylesheets/bootstrap/forms/_form-select.scss +80 -0
  84. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  85. data/assets/stylesheets/bootstrap/forms/_input-group.scss +132 -0
  86. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  87. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  88. data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +7 -0
  89. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +30 -0
  90. data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
  91. data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -0
  92. data/assets/stylesheets/bootstrap/helpers/_position.scss +36 -0
  93. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  94. data/assets/stylesheets/bootstrap/helpers/_stacks.scss +15 -0
  95. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  96. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  97. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  98. data/assets/stylesheets/bootstrap/helpers/_vr.scss +8 -0
  99. data/assets/stylesheets/bootstrap/mixins/_alert.scss +11 -6
  100. data/assets/stylesheets/bootstrap/mixins/_backdrop.scss +14 -0
  101. data/assets/stylesheets/bootstrap/mixins/_banner.scss +7 -0
  102. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +10 -8
  103. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
  104. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +20 -16
  105. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +60 -100
  106. data/assets/stylesheets/bootstrap/mixins/_caret.scss +34 -27
  107. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  108. data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -0
  109. data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
  110. data/assets/stylesheets/bootstrap/mixins/_container.scss +11 -0
  111. data/assets/stylesheets/bootstrap/mixins/_forms.scss +53 -85
  112. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
  113. data/assets/stylesheets/bootstrap/mixins/_grid.scss +119 -37
  114. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  115. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +7 -2
  116. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  117. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +7 -19
  118. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +3 -3
  119. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +24 -0
  120. data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
  121. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +97 -0
  122. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +33 -0
  123. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  124. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +276 -132
  125. data/bootstrap.gemspec +6 -7
  126. data/lib/bootstrap/engine.rb +7 -1
  127. data/lib/bootstrap/version.rb +2 -2
  128. data/tasks/updater/js.rb +31 -7
  129. data/tasks/updater/network.rb +9 -3
  130. data/tasks/updater/scss.rb +2 -2
  131. data/tasks/updater.rb +2 -2
  132. data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
  133. data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
  134. data/test/dummy_rails/app/views/pages/root.html +89 -0
  135. data/test/dummy_rails/config/application.rb +0 -3
  136. data/test/gemfiles/rails_4_2.gemfile +1 -1
  137. data/test/gemfiles/rails_5_0.gemfile +1 -1
  138. data/test/gemfiles/rails_5_1.gemfile +1 -1
  139. data/test/gemfiles/rails_5_2.gemfile +8 -0
  140. data/test/gemfiles/rails_6_0.gemfile +1 -0
  141. data/test/gemfiles/rails_6_1.gemfile +8 -0
  142. data/test/gemfiles/rails_7_0_dartsass.gemfile +8 -0
  143. data/test/gemfiles/rails_7_0_sassc.gemfile +8 -0
  144. data/test/test_helper.rb +3 -2
  145. metadata +97 -85
  146. data/.travis.yml +0 -31
  147. data/assets/javascripts/bootstrap/util.js +0 -192
  148. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  149. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
  150. data/assets/stylesheets/bootstrap/_input-group.scss +0 -208
  151. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  152. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  153. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  154. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  155. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  156. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  157. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  158. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  159. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  160. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
  161. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  162. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  163. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  164. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  165. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  166. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  167. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  168. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  169. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  170. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  171. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  172. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  173. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  174. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  175. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  176. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  177. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  178. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  179. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  180. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  181. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  182. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
  183. data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
  184. /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -1,62 +1,97 @@
1
1
  .pagination {
2
+ // scss-docs-start pagination-css-vars
3
+ --#{$prefix}pagination-padding-x: #{$pagination-padding-x};
4
+ --#{$prefix}pagination-padding-y: #{$pagination-padding-y};
5
+ @include rfs($pagination-font-size, --#{$prefix}pagination-font-size);
6
+ --#{$prefix}pagination-color: #{$pagination-color};
7
+ --#{$prefix}pagination-bg: #{$pagination-bg};
8
+ --#{$prefix}pagination-border-width: #{$pagination-border-width};
9
+ --#{$prefix}pagination-border-color: #{$pagination-border-color};
10
+ --#{$prefix}pagination-border-radius: #{$pagination-border-radius};
11
+ --#{$prefix}pagination-hover-color: #{$pagination-hover-color};
12
+ --#{$prefix}pagination-hover-bg: #{$pagination-hover-bg};
13
+ --#{$prefix}pagination-hover-border-color: #{$pagination-hover-border-color};
14
+ --#{$prefix}pagination-focus-color: #{$pagination-focus-color};
15
+ --#{$prefix}pagination-focus-bg: #{$pagination-focus-bg};
16
+ --#{$prefix}pagination-focus-box-shadow: #{$pagination-focus-box-shadow};
17
+ --#{$prefix}pagination-active-color: #{$pagination-active-color};
18
+ --#{$prefix}pagination-active-bg: #{$pagination-active-bg};
19
+ --#{$prefix}pagination-active-border-color: #{$pagination-active-border-color};
20
+ --#{$prefix}pagination-disabled-color: #{$pagination-disabled-color};
21
+ --#{$prefix}pagination-disabled-bg: #{$pagination-disabled-bg};
22
+ --#{$prefix}pagination-disabled-border-color: #{$pagination-disabled-border-color};
23
+ // scss-docs-end pagination-css-vars
24
+
2
25
  display: flex;
3
26
  @include list-unstyled();
4
- @include border-radius();
5
27
  }
6
28
 
7
29
  .page-link {
8
30
  position: relative;
9
31
  display: block;
10
- padding: $pagination-padding-y $pagination-padding-x;
11
- margin-left: -$pagination-border-width;
12
- line-height: $pagination-line-height;
13
- color: $pagination-color;
32
+ padding: var(--#{$prefix}pagination-padding-y) var(--#{$prefix}pagination-padding-x);
33
+ @include font-size(var(--#{$prefix}pagination-font-size));
34
+ color: var(--#{$prefix}pagination-color);
14
35
  text-decoration: if($link-decoration == none, null, none);
15
- background-color: $pagination-bg;
16
- border: $pagination-border-width solid $pagination-border-color;
36
+ background-color: var(--#{$prefix}pagination-bg);
37
+ border: var(--#{$prefix}pagination-border-width) solid var(--#{$prefix}pagination-border-color);
38
+ @include transition($pagination-transition);
17
39
 
18
40
  &:hover {
19
41
  z-index: 2;
20
- color: $pagination-hover-color;
21
- text-decoration: none;
22
- background-color: $pagination-hover-bg;
23
- border-color: $pagination-hover-border-color;
42
+ color: var(--#{$prefix}pagination-hover-color);
43
+ text-decoration: if($link-hover-decoration == underline, none, null);
44
+ background-color: var(--#{$prefix}pagination-hover-bg);
45
+ border-color: var(--#{$prefix}pagination-hover-border-color);
24
46
  }
25
47
 
26
48
  &:focus {
27
49
  z-index: 3;
50
+ color: var(--#{$prefix}pagination-focus-color);
51
+ background-color: var(--#{$prefix}pagination-focus-bg);
28
52
  outline: $pagination-focus-outline;
29
- box-shadow: $pagination-focus-box-shadow;
53
+ box-shadow: var(--#{$prefix}pagination-focus-box-shadow);
30
54
  }
31
- }
32
55
 
33
- .page-item {
34
- &:first-child {
35
- .page-link {
36
- margin-left: 0;
37
- @include border-left-radius($border-radius);
38
- }
56
+ &.active,
57
+ .active > & {
58
+ z-index: 3;
59
+ color: var(--#{$prefix}pagination-active-color);
60
+ @include gradient-bg(var(--#{$prefix}pagination-active-bg));
61
+ border-color: var(--#{$prefix}pagination-active-border-color);
39
62
  }
40
- &:last-child {
41
- .page-link {
42
- @include border-right-radius($border-radius);
43
- }
63
+
64
+ &.disabled,
65
+ .disabled > & {
66
+ color: var(--#{$prefix}pagination-disabled-color);
67
+ pointer-events: none;
68
+ background-color: var(--#{$prefix}pagination-disabled-bg);
69
+ border-color: var(--#{$prefix}pagination-disabled-border-color);
44
70
  }
71
+ }
45
72
 
46
- &.active .page-link {
47
- z-index: 3;
48
- color: $pagination-active-color;
49
- background-color: $pagination-active-bg;
50
- border-color: $pagination-active-border-color;
73
+ .page-item {
74
+ &:not(:first-child) .page-link {
75
+ margin-left: $pagination-margin-start;
51
76
  }
52
77
 
53
- &.disabled .page-link {
54
- color: $pagination-disabled-color;
55
- pointer-events: none;
56
- // Opinionated: remove the "hand" cursor set previously for .page-link
57
- cursor: auto;
58
- background-color: $pagination-disabled-bg;
59
- border-color: $pagination-disabled-border-color;
78
+ @if $pagination-margin-start == calc(#{$pagination-border-width} * -1) {
79
+ &:first-child {
80
+ .page-link {
81
+ @include border-start-radius(var(--#{$prefix}pagination-border-radius));
82
+ }
83
+ }
84
+
85
+ &:last-child {
86
+ .page-link {
87
+ @include border-end-radius(var(--#{$prefix}pagination-border-radius));
88
+ }
89
+ }
90
+ } @else {
91
+ // Add border-radius to all pageLinks in case they have left margin
92
+ .page-link {
93
+ @include border-radius(var(--#{$prefix}pagination-border-radius));
94
+ }
60
95
  }
61
96
  }
62
97
 
@@ -66,9 +101,9 @@
66
101
  //
67
102
 
68
103
  .pagination-lg {
69
- @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $pagination-border-radius-lg);
104
+ @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $pagination-border-radius-lg);
70
105
  }
71
106
 
72
107
  .pagination-sm {
73
- @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, $pagination-border-radius-sm);
108
+ @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $pagination-border-radius-sm);
74
109
  }
@@ -0,0 +1,51 @@
1
+ .placeholder {
2
+ display: inline-block;
3
+ min-height: 1em;
4
+ vertical-align: middle;
5
+ cursor: wait;
6
+ background-color: currentcolor;
7
+ opacity: $placeholder-opacity-max;
8
+
9
+ &.btn::before {
10
+ display: inline-block;
11
+ content: "";
12
+ }
13
+ }
14
+
15
+ // Sizing
16
+ .placeholder-xs {
17
+ min-height: .6em;
18
+ }
19
+
20
+ .placeholder-sm {
21
+ min-height: .8em;
22
+ }
23
+
24
+ .placeholder-lg {
25
+ min-height: 1.2em;
26
+ }
27
+
28
+ // Animation
29
+ .placeholder-glow {
30
+ .placeholder {
31
+ animation: placeholder-glow 2s ease-in-out infinite;
32
+ }
33
+ }
34
+
35
+ @keyframes placeholder-glow {
36
+ 50% {
37
+ opacity: $placeholder-opacity-min;
38
+ }
39
+ }
40
+
41
+ .placeholder-wave {
42
+ mask-image: linear-gradient(130deg, $black 55%, rgba(0, 0, 0, (1 - $placeholder-opacity-min)) 75%, $black 95%);
43
+ mask-size: 200% 100%;
44
+ animation: placeholder-wave 2s linear infinite;
45
+ }
46
+
47
+ @keyframes placeholder-wave {
48
+ 100% {
49
+ mask-position: -200% 0%;
50
+ }
51
+ }
@@ -1,28 +1,46 @@
1
1
  .popover {
2
- position: absolute;
3
- top: 0;
4
- left: 0;
5
- z-index: $zindex-popover;
2
+ // scss-docs-start popover-css-vars
3
+ --#{$prefix}popover-zindex: #{$zindex-popover};
4
+ --#{$prefix}popover-max-width: #{$popover-max-width};
5
+ @include rfs($popover-font-size, --#{$prefix}popover-font-size);
6
+ --#{$prefix}popover-bg: #{$popover-bg};
7
+ --#{$prefix}popover-border-width: #{$popover-border-width};
8
+ --#{$prefix}popover-border-color: #{$popover-border-color};
9
+ --#{$prefix}popover-border-radius: #{$popover-border-radius};
10
+ --#{$prefix}popover-inner-border-radius: #{$popover-inner-border-radius};
11
+ --#{$prefix}popover-box-shadow: #{$popover-box-shadow};
12
+ --#{$prefix}popover-header-padding-x: #{$popover-header-padding-x};
13
+ --#{$prefix}popover-header-padding-y: #{$popover-header-padding-y};
14
+ @include rfs($popover-header-font-size, --#{$prefix}popover-header-font-size);
15
+ --#{$prefix}popover-header-color: #{$popover-header-color};
16
+ --#{$prefix}popover-header-bg: #{$popover-header-bg};
17
+ --#{$prefix}popover-body-padding-x: #{$popover-body-padding-x};
18
+ --#{$prefix}popover-body-padding-y: #{$popover-body-padding-y};
19
+ --#{$prefix}popover-body-color: #{$popover-body-color};
20
+ --#{$prefix}popover-arrow-width: #{$popover-arrow-width};
21
+ --#{$prefix}popover-arrow-height: #{$popover-arrow-height};
22
+ --#{$prefix}popover-arrow-border: var(--#{$prefix}popover-border-color);
23
+ // scss-docs-end popover-css-vars
24
+
25
+ z-index: var(--#{$prefix}popover-zindex);
6
26
  display: block;
7
- max-width: $popover-max-width;
27
+ max-width: var(--#{$prefix}popover-max-width);
8
28
  // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
9
29
  // So reset our font and text properties to avoid inheriting weird values.
10
30
  @include reset-text();
11
- @include font-size($popover-font-size);
31
+ @include font-size(var(--#{$prefix}popover-font-size));
12
32
  // Allow breaking very long words so they don't overflow the popover's bounds
13
33
  word-wrap: break-word;
14
- background-color: $popover-bg;
34
+ background-color: var(--#{$prefix}popover-bg);
15
35
  background-clip: padding-box;
16
- border: $popover-border-width solid $popover-border-color;
17
- @include border-radius($popover-border-radius);
18
- @include box-shadow($popover-box-shadow);
36
+ border: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-border-color);
37
+ @include border-radius(var(--#{$prefix}popover-border-radius));
38
+ @include box-shadow(var(--#{$prefix}popover-box-shadow));
19
39
 
20
- .arrow {
21
- position: absolute;
40
+ .popover-arrow {
22
41
  display: block;
23
- width: $popover-arrow-width;
24
- height: $popover-arrow-height;
25
- margin: 0 $popover-border-radius;
42
+ width: var(--#{$prefix}popover-arrow-width);
43
+ height: var(--#{$prefix}popover-arrow-height);
26
44
 
27
45
  &::before,
28
46
  &::after {
@@ -31,69 +49,75 @@
31
49
  content: "";
32
50
  border-color: transparent;
33
51
  border-style: solid;
52
+ border-width: 0;
34
53
  }
35
54
  }
36
55
  }
37
56
 
38
57
  .bs-popover-top {
39
- margin-bottom: $popover-arrow-height;
58
+ > .popover-arrow {
59
+ bottom: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
40
60
 
41
- > .arrow {
42
- bottom: subtract(-$popover-arrow-height, $popover-border-width);
61
+ &::before,
62
+ &::after {
63
+ border-width: var(--#{$prefix}popover-arrow-height) calc(var(--#{$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
64
+ }
43
65
 
44
66
  &::before {
45
67
  bottom: 0;
46
- border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
47
- border-top-color: $popover-arrow-outer-color;
68
+ border-top-color: var(--#{$prefix}popover-arrow-border);
48
69
  }
49
70
 
50
71
  &::after {
51
- bottom: $popover-border-width;
52
- border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
53
- border-top-color: $popover-arrow-color;
72
+ bottom: var(--#{$prefix}popover-border-width);
73
+ border-top-color: var(--#{$prefix}popover-bg);
54
74
  }
55
75
  }
56
76
  }
57
77
 
58
- .bs-popover-right {
59
- margin-left: $popover-arrow-height;
78
+ /* rtl:begin:ignore */
79
+ .bs-popover-end {
80
+ > .popover-arrow {
81
+ left: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
82
+ width: var(--#{$prefix}popover-arrow-height);
83
+ height: var(--#{$prefix}popover-arrow-width);
60
84
 
61
- > .arrow {
62
- left: subtract(-$popover-arrow-height, $popover-border-width);
63
- width: $popover-arrow-height;
64
- height: $popover-arrow-width;
65
- margin: $popover-border-radius 0; // make sure the arrow does not touch the popover's rounded corners
85
+ &::before,
86
+ &::after {
87
+ border-width: calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height) calc(var(--#{$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
88
+ }
66
89
 
67
90
  &::before {
68
91
  left: 0;
69
- border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
70
- border-right-color: $popover-arrow-outer-color;
92
+ border-right-color: var(--#{$prefix}popover-arrow-border);
71
93
  }
72
94
 
73
95
  &::after {
74
- left: $popover-border-width;
75
- border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
76
- border-right-color: $popover-arrow-color;
96
+ left: var(--#{$prefix}popover-border-width);
97
+ border-right-color: var(--#{$prefix}popover-bg);
77
98
  }
78
99
  }
79
100
  }
80
101
 
102
+ /* rtl:end:ignore */
103
+
81
104
  .bs-popover-bottom {
82
- margin-top: $popover-arrow-height;
105
+ > .popover-arrow {
106
+ top: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
83
107
 
84
- > .arrow {
85
- top: subtract(-$popover-arrow-height, $popover-border-width);
108
+ &::before,
109
+ &::after {
110
+ border-width: 0 calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
111
+ }
86
112
 
87
113
  &::before {
88
114
  top: 0;
89
- border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
90
- border-bottom-color: $popover-arrow-outer-color;
115
+ border-bottom-color: var(--#{$prefix}popover-arrow-border);
91
116
  }
92
117
 
93
118
  &::after {
94
- top: $popover-border-width;
95
- border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
96
- border-bottom-color: $popover-arrow-color;
119
+ top: var(--#{$prefix}popover-border-width);
120
+ border-bottom-color: var(--#{$prefix}popover-bg);
97
121
  }
98
122
  }
99
123
 
@@ -103,61 +127,63 @@
103
127
  top: 0;
104
128
  left: 50%;
105
129
  display: block;
106
- width: $popover-arrow-width;
107
- margin-left: -$popover-arrow-width / 2;
130
+ width: var(--#{$prefix}popover-arrow-width);
131
+ margin-left: calc(-.5 * var(--#{$prefix}popover-arrow-width)); // stylelint-disable-line function-disallowed-list
108
132
  content: "";
109
- border-bottom: $popover-border-width solid $popover-header-bg;
133
+ border-bottom: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-header-bg);
110
134
  }
111
135
  }
112
136
 
113
- .bs-popover-left {
114
- margin-right: $popover-arrow-height;
137
+ /* rtl:begin:ignore */
138
+ .bs-popover-start {
139
+ > .popover-arrow {
140
+ right: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
141
+ width: var(--#{$prefix}popover-arrow-height);
142
+ height: var(--#{$prefix}popover-arrow-width);
115
143
 
116
- > .arrow {
117
- right: subtract(-$popover-arrow-height, $popover-border-width);
118
- width: $popover-arrow-height;
119
- height: $popover-arrow-width;
120
- margin: $popover-border-radius 0; // make sure the arrow does not touch the popover's rounded corners
144
+ &::before,
145
+ &::after {
146
+ border-width: calc(var(--#{$prefix}popover-arrow-width) * .5) 0 calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
147
+ }
121
148
 
122
149
  &::before {
123
150
  right: 0;
124
- border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
125
- border-left-color: $popover-arrow-outer-color;
151
+ border-left-color: var(--#{$prefix}popover-arrow-border);
126
152
  }
127
153
 
128
154
  &::after {
129
- right: $popover-border-width;
130
- border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
131
- border-left-color: $popover-arrow-color;
155
+ right: var(--#{$prefix}popover-border-width);
156
+ border-left-color: var(--#{$prefix}popover-bg);
132
157
  }
133
158
  }
134
159
  }
135
160
 
161
+ /* rtl:end:ignore */
162
+
136
163
  .bs-popover-auto {
137
- &[x-placement^="top"] {
164
+ &[data-popper-placement^="top"] {
138
165
  @extend .bs-popover-top;
139
166
  }
140
- &[x-placement^="right"] {
141
- @extend .bs-popover-right;
167
+ &[data-popper-placement^="right"] {
168
+ @extend .bs-popover-end;
142
169
  }
143
- &[x-placement^="bottom"] {
170
+ &[data-popper-placement^="bottom"] {
144
171
  @extend .bs-popover-bottom;
145
172
  }
146
- &[x-placement^="left"] {
147
- @extend .bs-popover-left;
173
+ &[data-popper-placement^="left"] {
174
+ @extend .bs-popover-start;
148
175
  }
149
176
  }
150
177
 
151
-
152
178
  // Offset the popover to account for the popover arrow
153
179
  .popover-header {
154
- padding: $popover-header-padding-y $popover-header-padding-x;
180
+ padding: var(--#{$prefix}popover-header-padding-y) var(--#{$prefix}popover-header-padding-x);
155
181
  margin-bottom: 0; // Reset the default from Reboot
156
- @include font-size($font-size-base);
157
- color: $popover-header-color;
158
- background-color: $popover-header-bg;
159
- border-bottom: $popover-border-width solid darken($popover-header-bg, 5%);
160
- @include border-top-radius($popover-inner-border-radius);
182
+ @include font-size(var(--#{$prefix}popover-header-font-size));
183
+ color: var(--#{$prefix}popover-header-color);
184
+ background-color: var(--#{$prefix}popover-header-bg);
185
+ border-bottom: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-border-color);
186
+ @include border-top-radius(var(--#{$prefix}popover-inner-border-radius));
161
187
 
162
188
  &:empty {
163
189
  display: none;
@@ -165,6 +191,6 @@
165
191
  }
166
192
 
167
193
  .popover-body {
168
- padding: $popover-body-padding-y $popover-body-padding-x;
169
- color: $popover-body-color;
194
+ padding: var(--#{$prefix}popover-body-padding-y) var(--#{$prefix}popover-body-padding-x);
195
+ color: var(--#{$prefix}popover-body-color);
170
196
  }
@@ -1,20 +1,33 @@
1
1
  // Disable animation if transitions are disabled
2
+
3
+ // scss-docs-start progress-keyframes
2
4
  @if $enable-transitions {
3
5
  @keyframes progress-bar-stripes {
4
- from { background-position: $progress-height 0; }
5
- to { background-position: 0 0; }
6
+ 0% { background-position-x: $progress-height; }
6
7
  }
7
8
  }
9
+ // scss-docs-end progress-keyframes
10
+
11
+ .progress,
12
+ .progress-stacked {
13
+ // scss-docs-start progress-css-vars
14
+ --#{$prefix}progress-height: #{$progress-height};
15
+ @include rfs($progress-font-size, --#{$prefix}progress-font-size);
16
+ --#{$prefix}progress-bg: #{$progress-bg};
17
+ --#{$prefix}progress-border-radius: #{$progress-border-radius};
18
+ --#{$prefix}progress-box-shadow: #{$progress-box-shadow};
19
+ --#{$prefix}progress-bar-color: #{$progress-bar-color};
20
+ --#{$prefix}progress-bar-bg: #{$progress-bar-bg};
21
+ --#{$prefix}progress-bar-transition: #{$progress-bar-transition};
22
+ // scss-docs-end progress-css-vars
8
23
 
9
- .progress {
10
24
  display: flex;
11
- height: $progress-height;
25
+ height: var(--#{$prefix}progress-height);
12
26
  overflow: hidden; // force rounded corners by cropping it
13
- line-height: 0;
14
- @include font-size($progress-font-size);
15
- background-color: $progress-bg;
16
- @include border-radius($progress-border-radius);
17
- @include box-shadow($progress-box-shadow);
27
+ @include font-size(var(--#{$prefix}progress-font-size));
28
+ background-color: var(--#{$prefix}progress-bg);
29
+ @include border-radius(var(--#{$prefix}progress-border-radius));
30
+ @include box-shadow(var(--#{$prefix}progress-box-shadow));
18
31
  }
19
32
 
20
33
  .progress-bar {
@@ -22,23 +35,31 @@
22
35
  flex-direction: column;
23
36
  justify-content: center;
24
37
  overflow: hidden;
25
- color: $progress-bar-color;
38
+ color: var(--#{$prefix}progress-bar-color);
26
39
  text-align: center;
27
40
  white-space: nowrap;
28
- background-color: $progress-bar-bg;
29
- @include transition($progress-bar-transition);
41
+ background-color: var(--#{$prefix}progress-bar-bg);
42
+ @include transition(var(--#{$prefix}progress-bar-transition));
30
43
  }
31
44
 
32
45
  .progress-bar-striped {
33
46
  @include gradient-striped();
34
- background-size: $progress-height $progress-height;
47
+ background-size: var(--#{$prefix}progress-height) var(--#{$prefix}progress-height);
48
+ }
49
+
50
+ .progress-stacked > .progress {
51
+ overflow: visible;
52
+ }
53
+
54
+ .progress-stacked > .progress > .progress-bar {
55
+ width: 100%;
35
56
  }
36
57
 
37
58
  @if $enable-transitions {
38
59
  .progress-bar-animated {
39
60
  animation: $progress-bar-animation-timing progress-bar-stripes;
40
61
 
41
- @if $enable-prefers-reduced-motion-media-query {
62
+ @if $enable-reduced-motion {
42
63
  @media (prefers-reduced-motion: reduce) {
43
64
  animation: none;
44
65
  }