bootstrap 4.3.0 → 5.1.0

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.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +17 -2
  3. data/CHANGELOG.md +2 -14
  4. data/README.md +7 -4
  5. data/assets/javascripts/bootstrap/alert.js +173 -137
  6. data/assets/javascripts/bootstrap/base-component.js +182 -0
  7. data/assets/javascripts/bootstrap/button.js +102 -143
  8. data/assets/javascripts/bootstrap/carousel.js +481 -410
  9. data/assets/javascripts/bootstrap/collapse.js +340 -274
  10. data/assets/javascripts/bootstrap/dom/data.js +68 -0
  11. data/assets/javascripts/bootstrap/dom/event-handler.js +322 -0
  12. data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
  13. data/assets/javascripts/bootstrap/dom/selector-engine.js +127 -0
  14. data/assets/javascripts/bootstrap/dropdown.js +494 -400
  15. data/assets/javascripts/bootstrap/modal.js +834 -450
  16. data/assets/javascripts/bootstrap/offcanvas.js +866 -0
  17. data/assets/javascripts/bootstrap/popover.js +122 -199
  18. data/assets/javascripts/bootstrap/scrollspy.js +257 -241
  19. data/assets/javascripts/bootstrap/tab.js +219 -155
  20. data/assets/javascripts/bootstrap/toast.js +330 -190
  21. data/assets/javascripts/bootstrap/tooltip.js +710 -472
  22. data/assets/javascripts/bootstrap-global-this-define.js +6 -0
  23. data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
  24. data/assets/javascripts/bootstrap-sprockets.js +8 -1
  25. data/assets/javascripts/bootstrap.js +3547 -2809
  26. data/assets/javascripts/bootstrap.min.js +4 -4
  27. data/assets/stylesheets/_bootstrap-grid.scss +54 -18
  28. data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
  29. data/assets/stylesheets/_bootstrap.scss +20 -11
  30. data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
  31. data/assets/stylesheets/bootstrap/_alert.scss +15 -9
  32. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  33. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -18
  34. data/assets/stylesheets/bootstrap/_button-group.scss +21 -45
  35. data/assets/stylesheets/bootstrap/_buttons.scss +28 -54
  36. data/assets/stylesheets/bootstrap/_card.scss +52 -125
  37. data/assets/stylesheets/bootstrap/_carousel.scss +70 -38
  38. data/assets/stylesheets/bootstrap/_close.scss +30 -31
  39. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  40. data/assets/stylesheets/bootstrap/_dropdown.scss +88 -39
  41. data/assets/stylesheets/bootstrap/_forms.scss +9 -330
  42. data/assets/stylesheets/bootstrap/_functions.scss +237 -27
  43. data/assets/stylesheets/bootstrap/_grid.scss +14 -33
  44. data/assets/stylesheets/bootstrap/_helpers.scss +9 -0
  45. data/assets/stylesheets/bootstrap/_images.scss +3 -3
  46. data/assets/stylesheets/bootstrap/_list-group.scss +61 -36
  47. data/assets/stylesheets/bootstrap/_mixins.scss +12 -16
  48. data/assets/stylesheets/bootstrap/_modal.scss +64 -84
  49. data/assets/stylesheets/bootstrap/_nav.scss +29 -10
  50. data/assets/stylesheets/bootstrap/_navbar.scss +93 -52
  51. data/assets/stylesheets/bootstrap/_offcanvas.scss +83 -0
  52. data/assets/stylesheets/bootstrap/_pagination.scss +13 -22
  53. data/assets/stylesheets/bootstrap/_placeholders.scss +51 -0
  54. data/assets/stylesheets/bootstrap/_popover.scss +29 -42
  55. data/assets/stylesheets/bootstrap/_progress.scss +10 -5
  56. data/assets/stylesheets/bootstrap/_reboot.scss +350 -208
  57. data/assets/stylesheets/bootstrap/_root.scss +42 -8
  58. data/assets/stylesheets/bootstrap/_spinners.scss +21 -7
  59. data/assets/stylesheets/bootstrap/_tables.scss +80 -114
  60. data/assets/stylesheets/bootstrap/_toasts.scss +21 -14
  61. data/assets/stylesheets/bootstrap/_tooltip.scss +21 -21
  62. data/assets/stylesheets/bootstrap/_transitions.scss +8 -1
  63. data/assets/stylesheets/bootstrap/_type.scss +40 -61
  64. data/assets/stylesheets/bootstrap/_utilities.scss +630 -17
  65. data/assets/stylesheets/bootstrap/_variables.scss +993 -487
  66. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  67. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +63 -0
  68. data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
  69. data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
  70. data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
  71. data/assets/stylesheets/bootstrap/forms/_form-select.scss +70 -0
  72. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  73. data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
  74. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  75. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  76. data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
  77. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  78. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  79. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  80. data/assets/stylesheets/bootstrap/helpers/_stacks.scss +15 -0
  81. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  82. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  83. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  84. data/assets/stylesheets/bootstrap/helpers/_vr.scss +8 -0
  85. data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
  86. data/assets/stylesheets/bootstrap/mixins/_backdrop.scss +14 -0
  87. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +37 -22
  88. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
  89. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
  90. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +77 -51
  91. data/assets/stylesheets/bootstrap/mixins/_caret.scss +10 -8
  92. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  93. data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
  94. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  95. data/assets/stylesheets/bootstrap/mixins/_forms.scss +67 -115
  96. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
  97. data/assets/stylesheets/bootstrap/mixins/_grid.scss +131 -32
  98. data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
  99. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
  100. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +17 -8
  101. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  102. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  103. data/assets/stylesheets/bootstrap/mixins/_transition.scss +18 -8
  104. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +89 -0
  105. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
  106. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  107. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +274 -132
  108. data/bootstrap.gemspec +4 -6
  109. data/lib/bootstrap/version.rb +2 -2
  110. data/tasks/updater/js.rb +25 -6
  111. data/tasks/updater/network.rb +8 -2
  112. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  113. data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
  114. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  115. data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
  116. data/test/dummy_rails/app/views/pages/root.html +89 -0
  117. data/test/dummy_rails/config/application.rb +0 -3
  118. data/test/gemfiles/rails_6_0.gemfile +7 -0
  119. data/test/gemfiles/rails_6_1.gemfile +7 -0
  120. data/test/support/dummy_rails_integration.rb +3 -1
  121. data/test/test_helper.rb +18 -13
  122. metadata +61 -79
  123. data/assets/javascripts/bootstrap/util.js +0 -171
  124. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  125. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -507
  126. data/assets/stylesheets/bootstrap/_input-group.scss +0 -193
  127. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  128. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  129. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  130. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -21
  131. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  132. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  133. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -66
  134. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  135. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
  136. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -33
  137. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  138. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  139. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -16
  140. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  141. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  142. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  143. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  144. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  145. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  146. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  147. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  148. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  149. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  150. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  151. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  152. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  153. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  154. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  155. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  156. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  157. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
  158. data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
@@ -1,59 +1,49 @@
1
1
  .pagination {
2
2
  display: flex;
3
3
  @include list-unstyled();
4
- @include border-radius();
5
4
  }
6
5
 
7
6
  .page-link {
8
7
  position: relative;
9
8
  display: block;
10
- padding: $pagination-padding-y $pagination-padding-x;
11
- margin-left: -$pagination-border-width;
12
- line-height: $pagination-line-height;
13
9
  color: $pagination-color;
10
+ text-decoration: if($link-decoration == none, null, none);
14
11
  background-color: $pagination-bg;
15
12
  border: $pagination-border-width solid $pagination-border-color;
13
+ @include transition($pagination-transition);
16
14
 
17
15
  &:hover {
18
16
  z-index: 2;
19
17
  color: $pagination-hover-color;
20
- text-decoration: none;
18
+ text-decoration: if($link-hover-decoration == underline, none, null);
21
19
  background-color: $pagination-hover-bg;
22
20
  border-color: $pagination-hover-border-color;
23
21
  }
24
22
 
25
23
  &:focus {
26
- z-index: 2;
24
+ z-index: 3;
25
+ color: $pagination-focus-color;
26
+ background-color: $pagination-focus-bg;
27
27
  outline: $pagination-focus-outline;
28
28
  box-shadow: $pagination-focus-box-shadow;
29
29
  }
30
30
  }
31
31
 
32
32
  .page-item {
33
- &:first-child {
34
- .page-link {
35
- margin-left: 0;
36
- @include border-left-radius($border-radius);
37
- }
38
- }
39
- &:last-child {
40
- .page-link {
41
- @include border-right-radius($border-radius);
42
- }
33
+ &:not(:first-child) .page-link {
34
+ margin-left: $pagination-margin-start;
43
35
  }
44
36
 
45
37
  &.active .page-link {
46
- z-index: 1;
38
+ z-index: 3;
47
39
  color: $pagination-active-color;
48
- background-color: $pagination-active-bg;
40
+ @include gradient-bg($pagination-active-bg);
49
41
  border-color: $pagination-active-border-color;
50
42
  }
51
43
 
52
44
  &.disabled .page-link {
53
45
  color: $pagination-disabled-color;
54
46
  pointer-events: none;
55
- // Opinionated: remove the "hand" cursor set previously for .page-link
56
- cursor: auto;
57
47
  background-color: $pagination-disabled-bg;
58
48
  border-color: $pagination-disabled-border-color;
59
49
  }
@@ -63,11 +53,12 @@
63
53
  //
64
54
  // Sizing
65
55
  //
56
+ @include pagination-size($pagination-padding-y, $pagination-padding-x, null, $pagination-border-radius);
66
57
 
67
58
  .pagination-lg {
68
- @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $border-radius-lg);
59
+ @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $pagination-border-radius-lg);
69
60
  }
70
61
 
71
62
  .pagination-sm {
72
- @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, $border-radius-sm);
63
+ @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $pagination-border-radius-sm);
73
64
  }
@@ -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,7 +1,7 @@
1
1
  .popover {
2
2
  position: absolute;
3
3
  top: 0;
4
- left: 0;
4
+ left: 0 #{"/* rtl:ignore */"};
5
5
  z-index: $zindex-popover;
6
6
  display: block;
7
7
  max-width: $popover-max-width;
@@ -17,12 +17,11 @@
17
17
  @include border-radius($popover-border-radius);
18
18
  @include box-shadow($popover-box-shadow);
19
19
 
20
- .arrow {
20
+ .popover-arrow {
21
21
  position: absolute;
22
22
  display: block;
23
23
  width: $popover-arrow-width;
24
24
  height: $popover-arrow-height;
25
- margin: 0 $border-radius-lg;
26
25
 
27
26
  &::before,
28
27
  &::after {
@@ -36,63 +35,56 @@
36
35
  }
37
36
 
38
37
  .bs-popover-top {
39
- margin-bottom: $popover-arrow-height;
40
-
41
- > .arrow {
42
- bottom: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
38
+ > .popover-arrow {
39
+ bottom: subtract(-$popover-arrow-height, $popover-border-width);
43
40
 
44
41
  &::before {
45
42
  bottom: 0;
46
- border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
43
+ border-width: $popover-arrow-height ($popover-arrow-width * .5) 0;
47
44
  border-top-color: $popover-arrow-outer-color;
48
45
  }
49
46
 
50
47
  &::after {
51
48
  bottom: $popover-border-width;
52
- border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
49
+ border-width: $popover-arrow-height ($popover-arrow-width * .5) 0;
53
50
  border-top-color: $popover-arrow-color;
54
51
  }
55
52
  }
56
53
  }
57
54
 
58
- .bs-popover-right {
59
- margin-left: $popover-arrow-height;
60
-
61
- > .arrow {
62
- left: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
55
+ .bs-popover-end {
56
+ > .popover-arrow {
57
+ left: subtract(-$popover-arrow-height, $popover-border-width);
63
58
  width: $popover-arrow-height;
64
59
  height: $popover-arrow-width;
65
- margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
66
60
 
67
61
  &::before {
68
62
  left: 0;
69
- border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
63
+ border-width: ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5) 0;
70
64
  border-right-color: $popover-arrow-outer-color;
71
65
  }
72
66
 
73
67
  &::after {
74
68
  left: $popover-border-width;
75
- border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
69
+ border-width: ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5) 0;
76
70
  border-right-color: $popover-arrow-color;
77
71
  }
78
72
  }
79
73
  }
80
74
 
81
75
  .bs-popover-bottom {
82
- margin-top: $popover-arrow-height;
83
-
84
- > .arrow {
85
- top: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
76
+ > .popover-arrow {
77
+ top: subtract(-$popover-arrow-height, $popover-border-width);
86
78
 
87
79
  &::before {
88
80
  top: 0;
89
- border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
81
+ border-width: 0 ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5);
90
82
  border-bottom-color: $popover-arrow-outer-color;
91
83
  }
92
84
 
93
85
  &::after {
94
86
  top: $popover-border-width;
95
- border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
87
+ border-width: 0 ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5);
96
88
  border-bottom-color: $popover-arrow-color;
97
89
  }
98
90
  }
@@ -104,51 +96,47 @@
104
96
  left: 50%;
105
97
  display: block;
106
98
  width: $popover-arrow-width;
107
- margin-left: -$popover-arrow-width / 2;
99
+ margin-left: -$popover-arrow-width * .5;
108
100
  content: "";
109
101
  border-bottom: $popover-border-width solid $popover-header-bg;
110
102
  }
111
103
  }
112
104
 
113
- .bs-popover-left {
114
- margin-right: $popover-arrow-height;
115
-
116
- > .arrow {
117
- right: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
105
+ .bs-popover-start {
106
+ > .popover-arrow {
107
+ right: subtract(-$popover-arrow-height, $popover-border-width);
118
108
  width: $popover-arrow-height;
119
109
  height: $popover-arrow-width;
120
- margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
121
110
 
122
111
  &::before {
123
112
  right: 0;
124
- border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
113
+ border-width: ($popover-arrow-width * .5) 0 ($popover-arrow-width * .5) $popover-arrow-height;
125
114
  border-left-color: $popover-arrow-outer-color;
126
115
  }
127
116
 
128
117
  &::after {
129
118
  right: $popover-border-width;
130
- border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
119
+ border-width: ($popover-arrow-width * .5) 0 ($popover-arrow-width * .5) $popover-arrow-height;
131
120
  border-left-color: $popover-arrow-color;
132
121
  }
133
122
  }
134
123
  }
135
124
 
136
125
  .bs-popover-auto {
137
- &[x-placement^="top"] {
126
+ &[data-popper-placement^="top"] {
138
127
  @extend .bs-popover-top;
139
128
  }
140
- &[x-placement^="right"] {
141
- @extend .bs-popover-right;
129
+ &[data-popper-placement^="right"] {
130
+ @extend .bs-popover-end;
142
131
  }
143
- &[x-placement^="bottom"] {
132
+ &[data-popper-placement^="bottom"] {
144
133
  @extend .bs-popover-bottom;
145
134
  }
146
- &[x-placement^="left"] {
147
- @extend .bs-popover-left;
135
+ &[data-popper-placement^="left"] {
136
+ @extend .bs-popover-start;
148
137
  }
149
138
  }
150
139
 
151
-
152
140
  // Offset the popover to account for the popover arrow
153
141
  .popover-header {
154
142
  padding: $popover-header-padding-y $popover-header-padding-x;
@@ -156,9 +144,8 @@
156
144
  @include font-size($font-size-base);
157
145
  color: $popover-header-color;
158
146
  background-color: $popover-header-bg;
159
- border-bottom: $popover-border-width solid darken($popover-header-bg, 5%);
160
- $offset-border-width: calc(#{$border-radius-lg} - #{$popover-border-width});
161
- @include border-top-radius($offset-border-width);
147
+ border-bottom: $popover-border-width solid $popover-border-color;
148
+ @include border-top-radius($popover-inner-border-radius);
162
149
 
163
150
  &:empty {
164
151
  display: none;
@@ -1,10 +1,12 @@
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
8
10
 
9
11
  .progress {
10
12
  display: flex;
@@ -20,6 +22,7 @@
20
22
  display: flex;
21
23
  flex-direction: column;
22
24
  justify-content: center;
25
+ overflow: hidden;
23
26
  color: $progress-bar-color;
24
27
  text-align: center;
25
28
  white-space: nowrap;
@@ -34,10 +37,12 @@
34
37
 
35
38
  @if $enable-transitions {
36
39
  .progress-bar-animated {
37
- animation: progress-bar-stripes $progress-bar-animation-timing;
40
+ animation: $progress-bar-animation-timing progress-bar-stripes;
38
41
 
39
- @media (prefers-reduced-motion: reduce) {
40
- animation: none;
42
+ @if $enable-reduced-motion {
43
+ @media (prefers-reduced-motion: reduce) {
44
+ animation: none;
45
+ }
41
46
  }
42
47
  }
43
48
  }
@@ -1,4 +1,5 @@
1
- // stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
1
+ // stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
2
+
2
3
 
3
4
  // Reboot
4
5
  //
@@ -10,118 +11,163 @@
10
11
 
11
12
  // Document
12
13
  //
13
- // 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
14
- // 2. Change the default font family in all browsers.
15
- // 3. Correct the line height in all browsers.
16
- // 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
17
- // 5. Change the default tap highlight to be completely transparent in iOS.
14
+ // Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
18
15
 
19
16
  *,
20
17
  *::before,
21
18
  *::after {
22
- box-sizing: border-box; // 1
19
+ box-sizing: border-box;
23
20
  }
24
21
 
25
- html {
26
- font-family: sans-serif; // 2
27
- line-height: 1.15; // 3
28
- -webkit-text-size-adjust: 100%; // 4
29
- -webkit-tap-highlight-color: rgba($black, 0); // 5
30
- }
31
22
 
32
- // Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
33
- // TODO: remove in v5
34
- // stylelint-disable-next-line selector-list-comma-newline-after
35
- article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
36
- display: block;
23
+ // Root
24
+ //
25
+ // Ability to the value of the root font sizes, affecting the value of `rem`.
26
+ // null by default, thus nothing is generated.
27
+
28
+ :root {
29
+ @if $font-size-root != null {
30
+ font-size: var(--#{$variable-prefix}-root-font-size);
31
+ }
32
+
33
+ @if $enable-smooth-scroll {
34
+ @media (prefers-reduced-motion: no-preference) {
35
+ scroll-behavior: smooth;
36
+ }
37
+ }
37
38
  }
38
39
 
40
+
39
41
  // Body
40
42
  //
41
43
  // 1. Remove the margin in all browsers.
42
44
  // 2. As a best practice, apply a default `background-color`.
43
- // 3. Set an explicit initial text-align value so that we can later use
44
- // the `inherit` value on things like `<th>` elements.
45
+ // 3. Prevent adjustments of font size after orientation changes in iOS.
46
+ // 4. Change the default tap highlight to be completely transparent in iOS.
45
47
 
48
+ // scss-docs-start reboot-body-rules
46
49
  body {
47
50
  margin: 0; // 1
48
- font-family: $font-family-base;
49
- @include font-size($font-size-base);
50
- font-weight: $font-weight-base;
51
- line-height: $line-height-base;
52
- color: $body-color;
53
- text-align: left; // 3
54
- background-color: $body-bg; // 2
55
- }
56
-
57
- // Suppress the focus outline on elements that cannot be accessed via keyboard.
58
- // This prevents an unwanted focus outline from appearing around elements that
59
- // might still respond to pointer events.
60
- //
61
- // Credit: https://github.com/suitcss/base
62
- [tabindex="-1"]:focus {
63
- outline: 0 !important;
51
+ font-family: var(--#{$variable-prefix}body-font-family);
52
+ @include font-size(var(--#{$variable-prefix}body-font-size));
53
+ font-weight: var(--#{$variable-prefix}body-font-weight);
54
+ line-height: var(--#{$variable-prefix}body-line-height);
55
+ color: var(--#{$variable-prefix}body-color);
56
+ text-align: var(--#{$variable-prefix}body-text-align);
57
+ background-color: var(--#{$variable-prefix}body-bg); // 2
58
+ -webkit-text-size-adjust: 100%; // 3
59
+ -webkit-tap-highlight-color: rgba($black, 0); // 4
64
60
  }
61
+ // scss-docs-end reboot-body-rules
65
62
 
66
63
 
67
64
  // Content grouping
68
65
  //
69
- // 1. Add the correct box sizing in Firefox.
70
- // 2. Show the overflow in Edge and IE.
66
+ // 1. Reset Firefox's gray color
67
+ // 2. Set correct height and prevent the `size` attribute to make the `hr` look like an input field
71
68
 
72
69
  hr {
73
- box-sizing: content-box; // 1
74
- height: 0; // 1
75
- overflow: visible; // 2
70
+ margin: $hr-margin-y 0;
71
+ color: $hr-color; // 1
72
+ background-color: currentColor;
73
+ border: 0;
74
+ opacity: $hr-opacity;
75
+ }
76
+
77
+ hr:not([size]) {
78
+ height: $hr-height; // 2
76
79
  }
77
80
 
78
81
 
79
- //
80
82
  // Typography
81
83
  //
84
+ // 1. Remove top margins from headings
85
+ // By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
86
+ // margin for easier control within type scales as it avoids margin collapsing.
82
87
 
83
- // Remove top margins from headings
84
- //
85
- // By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
86
- // margin for easier control within type scales as it avoids margin collapsing.
87
- // stylelint-disable-next-line selector-list-comma-newline-after
88
- h1, h2, h3, h4, h5, h6 {
89
- margin-top: 0;
88
+ %heading {
89
+ margin-top: 0; // 1
90
90
  margin-bottom: $headings-margin-bottom;
91
+ font-family: $headings-font-family;
92
+ font-style: $headings-font-style;
93
+ font-weight: $headings-font-weight;
94
+ line-height: $headings-line-height;
95
+ color: $headings-color;
96
+ }
97
+
98
+ h1 {
99
+ @extend %heading;
100
+ @include font-size($h1-font-size);
101
+ }
102
+
103
+ h2 {
104
+ @extend %heading;
105
+ @include font-size($h2-font-size);
91
106
  }
92
107
 
108
+ h3 {
109
+ @extend %heading;
110
+ @include font-size($h3-font-size);
111
+ }
112
+
113
+ h4 {
114
+ @extend %heading;
115
+ @include font-size($h4-font-size);
116
+ }
117
+
118
+ h5 {
119
+ @extend %heading;
120
+ @include font-size($h5-font-size);
121
+ }
122
+
123
+ h6 {
124
+ @extend %heading;
125
+ @include font-size($h6-font-size);
126
+ }
127
+
128
+
93
129
  // Reset margins on paragraphs
94
130
  //
95
131
  // Similarly, the top margin on `<p>`s get reset. However, we also reset the
96
132
  // bottom margin to use `rem` units instead of `em`.
133
+
97
134
  p {
98
135
  margin-top: 0;
99
136
  margin-bottom: $paragraph-margin-bottom;
100
137
  }
101
138
 
139
+
102
140
  // Abbreviations
103
141
  //
104
- // 1. Duplicate behavior to the data-* attribute for our tooltip plugin
105
- // 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
142
+ // 1. Duplicate behavior to the data-bs-* attribute for our tooltip plugin
143
+ // 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari.
106
144
  // 3. Add explicit cursor to indicate changed behavior.
107
- // 4. Remove the bottom border in Firefox 39-.
108
- // 5. Prevent the text-decoration to be skipped.
145
+ // 4. Prevent the text-decoration to be skipped.
109
146
 
110
147
  abbr[title],
111
- abbr[data-original-title] { // 1
112
- text-decoration: underline; // 2
148
+ abbr[data-bs-original-title] { // 1
113
149
  text-decoration: underline dotted; // 2
114
150
  cursor: help; // 3
115
- border-bottom: 0; // 4
116
- text-decoration-skip-ink: none; // 5
151
+ text-decoration-skip-ink: none; // 4
117
152
  }
118
153
 
154
+
155
+ // Address
156
+
119
157
  address {
120
158
  margin-bottom: 1rem;
121
159
  font-style: normal;
122
160
  line-height: inherit;
123
161
  }
124
162
 
163
+
164
+ // Lists
165
+
166
+ ol,
167
+ ul {
168
+ padding-left: 2rem;
169
+ }
170
+
125
171
  ol,
126
172
  ul,
127
173
  dl {
@@ -140,33 +186,57 @@ dt {
140
186
  font-weight: $dt-font-weight;
141
187
  }
142
188
 
189
+ // 1. Undo browser default
190
+
143
191
  dd {
144
192
  margin-bottom: .5rem;
145
- margin-left: 0; // Undo browser default
193
+ margin-left: 0; // 1
146
194
  }
147
195
 
196
+
197
+ // Blockquote
198
+
148
199
  blockquote {
149
200
  margin: 0 0 1rem;
150
201
  }
151
202
 
203
+
204
+ // Strong
205
+ //
206
+ // Add the correct font weight in Chrome, Edge, and Safari
207
+
152
208
  b,
153
209
  strong {
154
- font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari
210
+ font-weight: $font-weight-bolder;
155
211
  }
156
212
 
213
+
214
+ // Small
215
+ //
216
+ // Add the correct font size in all browsers
217
+
157
218
  small {
158
- @include font-size(80%); // Add the correct font size in all browsers
219
+ @include font-size($small-font-size);
220
+ }
221
+
222
+
223
+ // Mark
224
+
225
+ mark {
226
+ padding: $mark-padding;
227
+ background-color: $mark-bg;
159
228
  }
160
229
 
230
+
231
+ // Sub and Sup
161
232
  //
162
233
  // Prevent `sub` and `sup` elements from affecting the line height in
163
234
  // all browsers.
164
- //
165
235
 
166
236
  sub,
167
237
  sup {
168
238
  position: relative;
169
- @include font-size(75%);
239
+ @include font-size($sub-sup-font-size);
170
240
  line-height: 0;
171
241
  vertical-align: baseline;
172
242
  }
@@ -175,309 +245,381 @@ sub { bottom: -.25em; }
175
245
  sup { top: -.5em; }
176
246
 
177
247
 
178
- //
179
248
  // Links
180
- //
181
249
 
182
250
  a {
183
251
  color: $link-color;
184
252
  text-decoration: $link-decoration;
185
- background-color: transparent; // Remove the gray background on active links in IE 10.
186
253
 
187
- @include hover {
254
+ &:hover {
188
255
  color: $link-hover-color;
189
256
  text-decoration: $link-hover-decoration;
190
257
  }
191
258
  }
192
259
 
193
- // And undo these styles for placeholder links/named anchors (without href)
194
- // which have not been made explicitly keyboard-focusable (without tabindex).
260
+ // And undo these styles for placeholder links/named anchors (without href).
195
261
  // It would be more straightforward to just use a[href] in previous block, but that
196
262
  // causes specificity issues in many other styles that are too complex to fix.
197
263
  // See https://github.com/twbs/bootstrap/issues/19402
198
264
 
199
- a:not([href]):not([tabindex]) {
200
- color: inherit;
201
- text-decoration: none;
202
-
203
- @include hover-focus {
265
+ a:not([href]):not([class]) {
266
+ &,
267
+ &:hover {
204
268
  color: inherit;
205
269
  text-decoration: none;
206
270
  }
207
-
208
- &:focus {
209
- outline: 0;
210
- }
211
271
  }
212
272
 
213
273
 
214
- //
215
274
  // Code
216
- //
217
275
 
218
276
  pre,
219
277
  code,
220
278
  kbd,
221
279
  samp {
222
- font-family: $font-family-monospace;
280
+ font-family: $font-family-code;
223
281
  @include font-size(1em); // Correct the odd `em` font sizing in all browsers.
282
+ direction: ltr #{"/* rtl:ignore */"};
283
+ unicode-bidi: bidi-override;
224
284
  }
225
285
 
286
+ // 1. Remove browser default top margin
287
+ // 2. Reset browser default of `1em` to use `rem`s
288
+ // 3. Don't allow content to break outside
289
+
226
290
  pre {
227
- // Remove browser default top margin
228
- margin-top: 0;
229
- // Reset browser default of `1em` to use `rem`s
230
- margin-bottom: 1rem;
231
- // Don't allow content to break outside
232
- overflow: auto;
291
+ display: block;
292
+ margin-top: 0; // 1
293
+ margin-bottom: 1rem; // 2
294
+ overflow: auto; // 3
295
+ @include font-size($code-font-size);
296
+ color: $pre-color;
297
+
298
+ // Account for some code outputs that place code tags in pre tags
299
+ code {
300
+ @include font-size(inherit);
301
+ color: inherit;
302
+ word-break: normal;
303
+ }
304
+ }
305
+
306
+ code {
307
+ @include font-size($code-font-size);
308
+ color: $code-color;
309
+ word-wrap: break-word;
310
+
311
+ // Streamline the style when inside anchors to avoid broken underline and more
312
+ a > & {
313
+ color: inherit;
314
+ }
315
+ }
316
+
317
+ kbd {
318
+ padding: $kbd-padding-y $kbd-padding-x;
319
+ @include font-size($kbd-font-size);
320
+ color: $kbd-color;
321
+ background-color: $kbd-bg;
322
+ @include border-radius($border-radius-sm);
323
+
324
+ kbd {
325
+ padding: 0;
326
+ @include font-size(1em);
327
+ font-weight: $nested-kbd-font-weight;
328
+ }
233
329
  }
234
330
 
235
331
 
236
- //
237
332
  // Figures
238
333
  //
334
+ // Apply a consistent margin strategy (matches our type styles).
239
335
 
240
336
  figure {
241
- // Apply a consistent margin strategy (matches our type styles).
242
337
  margin: 0 0 1rem;
243
338
  }
244
339
 
245
340
 
246
- //
247
341
  // Images and content
248
- //
249
-
250
- img {
251
- vertical-align: middle;
252
- border-style: none; // Remove the border on images inside links in IE 10-.
253
- }
254
342
 
343
+ img,
255
344
  svg {
256
- // Workaround for the SVG overflow bug in IE10/11 is still required.
257
- // See https://github.com/twbs/bootstrap/issues/26878
258
- overflow: hidden;
259
345
  vertical-align: middle;
260
346
  }
261
347
 
262
348
 
263
- //
264
349
  // Tables
265
350
  //
351
+ // Prevent double borders
266
352
 
267
353
  table {
268
- border-collapse: collapse; // Prevent double borders
354
+ caption-side: bottom;
355
+ border-collapse: collapse;
269
356
  }
270
357
 
271
358
  caption {
272
- padding-top: $table-cell-padding;
273
- padding-bottom: $table-cell-padding;
359
+ padding-top: $table-cell-padding-y;
360
+ padding-bottom: $table-cell-padding-y;
274
361
  color: $table-caption-color;
275
362
  text-align: left;
276
- caption-side: bottom;
277
363
  }
278
364
 
365
+ // 1. Removes font-weight bold by inheriting
366
+ // 2. Matches default `<td>` alignment by inheriting `text-align`.
367
+ // 3. Fix alignment for Safari
368
+
369
+ th {
370
+ font-weight: $table-th-font-weight; // 1
371
+ text-align: inherit; // 2
372
+ text-align: -webkit-match-parent; // 3
373
+ }
374
+
375
+ thead,
376
+ tbody,
377
+ tfoot,
378
+ tr,
379
+ td,
279
380
  th {
280
- // Matches default `<td>` alignment by inheriting from the `<body>`, or the
281
- // closest parent with a set `text-align`.
282
- text-align: inherit;
381
+ border-color: inherit;
382
+ border-style: solid;
383
+ border-width: 0;
283
384
  }
284
385
 
285
386
 
286
- //
287
387
  // Forms
288
388
  //
389
+ // 1. Allow labels to use `margin` for spacing.
289
390
 
290
391
  label {
291
- // Allow labels to use `margin` for spacing.
292
- display: inline-block;
293
- margin-bottom: $label-margin-bottom;
392
+ display: inline-block; // 1
294
393
  }
295
394
 
296
395
  // Remove the default `border-radius` that macOS Chrome adds.
297
- //
298
- // Details at https://github.com/twbs/bootstrap/issues/24093
396
+ // See https://github.com/twbs/bootstrap/issues/24093
397
+
299
398
  button {
300
- // stylelint-disable-next-line property-blacklist
399
+ // stylelint-disable-next-line property-disallowed-list
301
400
  border-radius: 0;
302
401
  }
303
402
 
304
- // Work around a Firefox/IE bug where the transparent `button` background
305
- // results in a loss of the default `button` focus styles.
306
- //
307
- // Credit: https://github.com/suitcss/base/
308
- button:focus {
309
- outline: 1px dotted;
310
- outline: 5px auto -webkit-focus-ring-color;
403
+ // Explicitly remove focus outline in Chromium when it shouldn't be
404
+ // visible (e.g. as result of mouse click or touch tap). It already
405
+ // should be doing this automatically, but seems to currently be
406
+ // confused and applies its very visible two-tone outline anyway.
407
+
408
+ button:focus:not(:focus-visible) {
409
+ outline: 0;
311
410
  }
312
411
 
412
+ // 1. Remove the margin in Firefox and Safari
413
+
313
414
  input,
314
415
  button,
315
416
  select,
316
417
  optgroup,
317
418
  textarea {
318
- margin: 0; // Remove the margin in Firefox and Safari
419
+ margin: 0; // 1
319
420
  font-family: inherit;
320
421
  @include font-size(inherit);
321
422
  line-height: inherit;
322
423
  }
323
424
 
324
- button,
325
- input {
326
- overflow: visible; // Show the overflow in Edge
327
- }
328
-
425
+ // Remove the inheritance of text transform in Firefox
329
426
  button,
330
427
  select {
331
- text-transform: none; // Remove the inheritance of text transform in Firefox
428
+ text-transform: none;
332
429
  }
333
-
334
- // Remove the inheritance of word-wrap in Safari.
430
+ // Set the cursor for non-`<button>` buttons
335
431
  //
336
- // Details at https://github.com/twbs/bootstrap/issues/24990
432
+ // Details at https://github.com/twbs/bootstrap/pull/30562
433
+ [role="button"] {
434
+ cursor: pointer;
435
+ }
436
+
337
437
  select {
438
+ // Remove the inheritance of word-wrap in Safari.
439
+ // See https://github.com/twbs/bootstrap/issues/24990
338
440
  word-wrap: normal;
441
+
442
+ // Undo the opacity change from Chrome
443
+ &:disabled {
444
+ opacity: 1;
445
+ }
339
446
  }
340
447
 
448
+ // Remove the dropdown arrow in Chrome from inputs built with datalists.
449
+ // See https://stackoverflow.com/a/54997118
450
+
451
+ [list]::-webkit-calendar-picker-indicator {
452
+ display: none;
453
+ }
341
454
 
342
455
  // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
343
456
  // controls in Android 4.
344
457
  // 2. Correct the inability to style clickable types in iOS and Safari.
458
+ // 3. Opinionated: add "hand" cursor to non-disabled button elements.
459
+
345
460
  button,
346
461
  [type="button"], // 1
347
462
  [type="reset"],
348
463
  [type="submit"] {
349
464
  -webkit-appearance: button; // 2
350
- }
351
465
 
352
- // Opinionated: add "hand" cursor to non-disabled button elements.
353
- @if $enable-pointer-cursor-for-buttons {
354
- button,
355
- [type="button"],
356
- [type="reset"],
357
- [type="submit"] {
466
+ @if $enable-button-pointers {
358
467
  &:not(:disabled) {
359
- cursor: pointer;
468
+ cursor: pointer; // 3
360
469
  }
361
470
  }
362
471
  }
363
472
 
364
473
  // Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
365
- button::-moz-focus-inner,
366
- [type="button"]::-moz-focus-inner,
367
- [type="reset"]::-moz-focus-inner,
368
- [type="submit"]::-moz-focus-inner {
474
+
475
+ ::-moz-focus-inner {
369
476
  padding: 0;
370
477
  border-style: none;
371
478
  }
372
479
 
373
- input[type="radio"],
374
- input[type="checkbox"] {
375
- box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
376
- padding: 0; // 2. Remove the padding in IE 10-
377
- }
378
-
379
-
380
- input[type="date"],
381
- input[type="time"],
382
- input[type="datetime-local"],
383
- input[type="month"] {
384
- // Remove the default appearance of temporal inputs to avoid a Mobile Safari
385
- // bug where setting a custom line-height prevents text from being vertically
386
- // centered within the input.
387
- // See https://bugs.webkit.org/show_bug.cgi?id=139848
388
- // and https://github.com/twbs/bootstrap/issues/11266
389
- -webkit-appearance: listbox;
390
- }
480
+ // 1. Textareas should really only resize vertically so they don't break their (horizontal) containers.
391
481
 
392
482
  textarea {
393
- overflow: auto; // Remove the default vertical scrollbar in IE.
394
- // Textareas should really only resize vertically so they don't break their (horizontal) containers.
395
- resize: vertical;
483
+ resize: vertical; // 1
396
484
  }
397
485
 
486
+ // 1. Browsers set a default `min-width: min-content;` on fieldsets,
487
+ // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
488
+ // So we reset that to ensure fieldsets behave more like a standard block element.
489
+ // See https://github.com/twbs/bootstrap/issues/12359
490
+ // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
491
+ // 2. Reset the default outline behavior of fieldsets so they don't affect page layout.
492
+
398
493
  fieldset {
399
- // Browsers set a default `min-width: min-content;` on fieldsets,
400
- // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
401
- // So we reset that to ensure fieldsets behave more like a standard block element.
402
- // See https://github.com/twbs/bootstrap/issues/12359
403
- // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
404
- min-width: 0;
405
- // Reset the default outline behavior of fieldsets so they don't affect page layout.
406
- padding: 0;
407
- margin: 0;
408
- border: 0;
494
+ min-width: 0; // 1
495
+ padding: 0; // 2
496
+ margin: 0; // 2
497
+ border: 0; // 2
409
498
  }
410
499
 
411
- // 1. Correct the text wrapping in Edge and IE.
412
- // 2. Correct the color inheritance from `fieldset` elements in IE.
500
+ // 1. By using `float: left`, the legend will behave like a block element.
501
+ // This way the border of a fieldset wraps around the legend if present.
502
+ // 2. Fix wrapping bug.
503
+ // See https://github.com/twbs/bootstrap/issues/29712
504
+
413
505
  legend {
414
- display: block;
506
+ float: left; // 1
415
507
  width: 100%;
416
- max-width: 100%; // 1
417
508
  padding: 0;
418
- margin-bottom: .5rem;
419
- @include font-size(1.5rem);
509
+ margin-bottom: $legend-margin-bottom;
510
+ @include font-size($legend-font-size);
511
+ font-weight: $legend-font-weight;
420
512
  line-height: inherit;
421
- color: inherit; // 2
422
- white-space: normal; // 1
513
+
514
+ + * {
515
+ clear: left; // 2
516
+ }
423
517
  }
424
518
 
425
- progress {
426
- vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
519
+ // Fix height of inputs with a type of datetime-local, date, month, week, or time
520
+ // See https://github.com/twbs/bootstrap/issues/18842
521
+
522
+ ::-webkit-datetime-edit-fields-wrapper,
523
+ ::-webkit-datetime-edit-text,
524
+ ::-webkit-datetime-edit-minute,
525
+ ::-webkit-datetime-edit-hour-field,
526
+ ::-webkit-datetime-edit-day-field,
527
+ ::-webkit-datetime-edit-month-field,
528
+ ::-webkit-datetime-edit-year-field {
529
+ padding: 0;
427
530
  }
428
531
 
429
- // Correct the cursor style of increment and decrement buttons in Chrome.
430
- [type="number"]::-webkit-inner-spin-button,
431
- [type="number"]::-webkit-outer-spin-button {
532
+ ::-webkit-inner-spin-button {
432
533
  height: auto;
433
534
  }
434
535
 
536
+ // 1. Correct the outline style in Safari.
537
+ // 2. This overrides the extra rounded corners on search inputs in iOS so that our
538
+ // `.form-control` class can properly style them. Note that this cannot simply
539
+ // be added to `.form-control` as it's not specific enough. For details, see
540
+ // https://github.com/twbs/bootstrap/issues/11586.
541
+
435
542
  [type="search"] {
436
- // This overrides the extra rounded corners on search inputs in iOS so that our
437
- // `.form-control` class can properly style them. Note that this cannot simply
438
- // be added to `.form-control` as it's not specific enough. For details, see
439
- // https://github.com/twbs/bootstrap/issues/11586.
440
- outline-offset: -2px; // 2. Correct the outline style in Safari.
441
- -webkit-appearance: none;
543
+ outline-offset: -2px; // 1
544
+ -webkit-appearance: textfield; // 2
442
545
  }
443
546
 
444
- //
547
+ // 1. A few input types should stay LTR
548
+ // See https://rtlstyling.com/posts/rtl-styling#form-inputs
549
+ // 2. RTL only output
550
+ // See https://rtlcss.com/learn/usage-guide/control-directives/#raw
551
+
552
+ /* rtl:raw:
553
+ [type="tel"],
554
+ [type="url"],
555
+ [type="email"],
556
+ [type="number"] {
557
+ direction: ltr;
558
+ }
559
+ */
560
+
445
561
  // Remove the inner padding in Chrome and Safari on macOS.
446
- //
447
562
 
448
- [type="search"]::-webkit-search-decoration {
563
+ ::-webkit-search-decoration {
449
564
  -webkit-appearance: none;
450
565
  }
451
566
 
452
- //
453
- // 1. Correct the inability to style clickable types in iOS and Safari.
454
- // 2. Change font properties to `inherit` in Safari.
455
- //
567
+ // Remove padding around color pickers in webkit browsers
568
+
569
+ ::-webkit-color-swatch-wrapper {
570
+ padding: 0;
571
+ }
572
+
573
+
574
+ // Inherit font family and line height for file input buttons
575
+
576
+ ::file-selector-button {
577
+ font: inherit;
578
+ }
579
+
580
+ // 1. Change font properties to `inherit`
581
+ // 2. Correct the inability to style clickable types in iOS and Safari.
456
582
 
457
583
  ::-webkit-file-upload-button {
458
- font: inherit; // 2
459
- -webkit-appearance: button; // 1
584
+ font: inherit; // 1
585
+ -webkit-appearance: button; // 2
460
586
  }
461
587
 
462
- //
463
588
  // Correct element displays
464
- //
465
589
 
466
590
  output {
467
591
  display: inline-block;
468
592
  }
469
593
 
594
+ // Remove border from iframe
595
+
596
+ iframe {
597
+ border: 0;
598
+ }
599
+
600
+ // Summary
601
+ //
602
+ // 1. Add the correct display in all browsers
603
+
470
604
  summary {
471
- display: list-item; // Add the correct display in all browsers
605
+ display: list-item; // 1
472
606
  cursor: pointer;
473
607
  }
474
608
 
475
- template {
476
- display: none; // Add the correct display in IE
609
+
610
+ // Progress
611
+ //
612
+ // Add the correct vertical alignment in Chrome, Firefox, and Opera.
613
+
614
+ progress {
615
+ vertical-align: baseline;
477
616
  }
478
617
 
479
- // Always hide an element with the `hidden` HTML attribute (from PureCSS).
480
- // Needed for proper display in IE 10-.
618
+
619
+ // Hidden attribute
620
+ //
621
+ // Always hide an element with the `hidden` HTML attribute.
622
+
481
623
  [hidden] {
482
624
  display: none !important;
483
625
  }