bootstrap 4.0.0 → 4.3.1

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 (104) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +8 -0
  4. data/README.md +2 -2
  5. data/Rakefile +4 -2
  6. data/assets/javascripts/bootstrap/alert.js +45 -22
  7. data/assets/javascripts/bootstrap/button.js +39 -19
  8. data/assets/javascripts/bootstrap/carousel.js +213 -51
  9. data/assets/javascripts/bootstrap/collapse.js +105 -52
  10. data/assets/javascripts/bootstrap/dropdown.js +169 -45
  11. data/assets/javascripts/bootstrap/modal.js +139 -71
  12. data/assets/javascripts/bootstrap/popover.js +77 -20
  13. data/assets/javascripts/bootstrap/scrollspy.js +87 -29
  14. data/assets/javascripts/bootstrap/tab.js +50 -32
  15. data/assets/javascripts/bootstrap/toast.js +282 -0
  16. data/assets/javascripts/bootstrap/tooltip.js +295 -59
  17. data/assets/javascripts/bootstrap/util.js +78 -45
  18. data/assets/javascripts/bootstrap-sprockets.js +7 -6
  19. data/assets/javascripts/bootstrap.js +1537 -996
  20. data/assets/javascripts/bootstrap.min.js +3 -3
  21. data/assets/stylesheets/_bootstrap-grid.scss +4 -7
  22. data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
  23. data/assets/stylesheets/_bootstrap.scss +5 -3
  24. data/assets/stylesheets/bootstrap/_alert.scss +1 -1
  25. data/assets/stylesheets/bootstrap/_badge.scss +8 -1
  26. data/assets/stylesheets/bootstrap/_breadcrumb.scss +9 -6
  27. data/assets/stylesheets/bootstrap/_button-group.scss +16 -19
  28. data/assets/stylesheets/bootstrap/_buttons.scss +10 -16
  29. data/assets/stylesheets/bootstrap/_card.scss +53 -34
  30. data/assets/stylesheets/bootstrap/_carousel.scss +66 -60
  31. data/assets/stylesheets/bootstrap/_close.scss +15 -8
  32. data/assets/stylesheets/bootstrap/_code.scss +5 -13
  33. data/assets/stylesheets/bootstrap/_custom-forms.scss +250 -40
  34. data/assets/stylesheets/bootstrap/_dropdown.scss +65 -5
  35. data/assets/stylesheets/bootstrap/_forms.scss +32 -35
  36. data/assets/stylesheets/bootstrap/_functions.scss +9 -9
  37. data/assets/stylesheets/bootstrap/_images.scss +2 -2
  38. data/assets/stylesheets/bootstrap/_input-group.scss +45 -11
  39. data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -0
  40. data/assets/stylesheets/bootstrap/_list-group.scss +39 -5
  41. data/assets/stylesheets/bootstrap/_mixins.scss +6 -1
  42. data/assets/stylesheets/bootstrap/_modal.scss +80 -19
  43. data/assets/stylesheets/bootstrap/_nav.scss +2 -0
  44. data/assets/stylesheets/bootstrap/_navbar.scss +9 -26
  45. data/assets/stylesheets/bootstrap/_pagination.scss +2 -6
  46. data/assets/stylesheets/bootstrap/_popover.scss +47 -59
  47. data/assets/stylesheets/bootstrap/_print.scss +23 -6
  48. data/assets/stylesheets/bootstrap/_progress.scss +16 -6
  49. data/assets/stylesheets/bootstrap/_reboot.scss +51 -50
  50. data/assets/stylesheets/bootstrap/_spinners.scss +55 -0
  51. data/assets/stylesheets/bootstrap/_tables.scss +16 -11
  52. data/assets/stylesheets/bootstrap/_toasts.scss +44 -0
  53. data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
  54. data/assets/stylesheets/bootstrap/_transitions.scss +4 -20
  55. data/assets/stylesheets/bootstrap/_type.scss +16 -16
  56. data/assets/stylesheets/bootstrap/_utilities.scss +3 -0
  57. data/assets/stylesheets/bootstrap/_variables.scss +430 -201
  58. data/assets/stylesheets/bootstrap/mixins/_badge.scss +7 -2
  59. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +29 -1
  60. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
  61. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +3 -3
  62. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +12 -14
  63. data/assets/stylesheets/bootstrap/mixins/_caret.scss +5 -8
  64. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  65. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -0
  66. data/assets/stylesheets/bootstrap/mixins/_forms.scss +68 -13
  67. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +7 -7
  68. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +3 -4
  69. data/assets/stylesheets/bootstrap/mixins/_grid.scss +9 -10
  70. data/assets/stylesheets/bootstrap/mixins/_hover.scss +3 -5
  71. data/assets/stylesheets/bootstrap/mixins/_image.scss +2 -2
  72. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  73. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -2
  74. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
  75. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  76. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -3
  77. data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
  78. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +10 -1
  79. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +5 -3
  80. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +3 -1
  81. data/assets/stylesheets/bootstrap/mixins/_transition.scss +7 -0
  82. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
  83. data/assets/stylesheets/bootstrap/utilities/_borders.scss +17 -1
  84. data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -18
  85. data/assets/stylesheets/bootstrap/utilities/_embed.scss +7 -20
  86. data/assets/stylesheets/bootstrap/utilities/_flex.scss +5 -0
  87. data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
  88. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +5 -0
  89. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -4
  90. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +6 -0
  91. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +8 -0
  92. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +23 -1
  93. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
  94. data/assets/stylesheets/bootstrap/utilities/_text.scss +26 -6
  95. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
  96. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +204 -0
  97. data/bootstrap.gemspec +6 -3
  98. data/lib/bootstrap/engine.rb +3 -0
  99. data/lib/bootstrap/version.rb +4 -2
  100. data/lib/bootstrap.rb +10 -7
  101. data/tasks/updater/js.rb +1 -1
  102. data/test/test_helper.rb +7 -6
  103. metadata +19 -12
  104. data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
@@ -24,7 +24,7 @@
24
24
  padding: $navbar-padding-y $navbar-padding-x;
25
25
 
26
26
  // Because flex properties aren't inherited, we need to redeclare these first
27
- // few properities so that content nested within behave properly.
27
+ // few properties so that content nested within behave properly.
28
28
  > .container,
29
29
  > .container-fluid {
30
30
  display: flex;
@@ -44,7 +44,7 @@
44
44
  padding-top: $navbar-brand-padding-y;
45
45
  padding-bottom: $navbar-brand-padding-y;
46
46
  margin-right: $navbar-padding-x;
47
- font-size: $navbar-brand-font-size;
47
+ @include font-size($navbar-brand-font-size);
48
48
  line-height: inherit;
49
49
  white-space: nowrap;
50
50
 
@@ -94,7 +94,7 @@
94
94
  // Powered by the collapse Bootstrap JavaScript plugin.
95
95
 
96
96
  // When collapsed, prevent the toggleable navbar contents from appearing in
97
- // the default flexbox row orienation. Requires the use of `flex-wrap: wrap`
97
+ // the default flexbox row orientation. Requires the use of `flex-wrap: wrap`
98
98
  // on the `.navbar` parent.
99
99
  .navbar-collapse {
100
100
  flex-basis: 100%;
@@ -107,7 +107,7 @@
107
107
  // Button for toggling the navbar when in its collapsed state
108
108
  .navbar-toggler {
109
109
  padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
110
- font-size: $navbar-toggler-font-size;
110
+ @include font-size($navbar-toggler-font-size);
111
111
  line-height: 1;
112
112
  background-color: transparent; // remove default button style
113
113
  border: $border-width solid transparent; // remove default button style
@@ -116,11 +116,6 @@
116
116
  @include hover-focus {
117
117
  text-decoration: none;
118
118
  }
119
-
120
- // Opinionated: add "hand" cursor to non-disabled .navbar-toggler elements
121
- &:not(:disabled):not(.disabled) {
122
- cursor: pointer;
123
- }
124
119
  }
125
120
 
126
121
  // Keep as a separate element so folks can easily override it with another icon
@@ -162,11 +157,6 @@
162
157
  position: absolute;
163
158
  }
164
159
 
165
- .dropdown-menu-right {
166
- right: 0;
167
- left: auto; // Reset the default from `.dropdown-menu`
168
- }
169
-
170
160
  .nav-link {
171
161
  padding-right: $navbar-nav-link-padding-x;
172
162
  padding-left: $navbar-nav-link-padding-x;
@@ -180,7 +170,7 @@
180
170
  }
181
171
 
182
172
  .navbar-collapse {
183
- display: flex !important; // stylelint-disable-line declaration-no-important
173
+ display: flex !important; // stylelint-disable-line declaration-no-important
184
174
 
185
175
  // Changes flex-bases to auto because of an IE10 bug
186
176
  flex-basis: auto;
@@ -189,13 +179,6 @@
189
179
  .navbar-toggler {
190
180
  display: none;
191
181
  }
192
-
193
- .dropup {
194
- .dropdown-menu {
195
- top: auto;
196
- bottom: 100%;
197
- }
198
- }
199
182
  }
200
183
  }
201
184
  }
@@ -209,10 +192,10 @@
209
192
  // Dark links against a light background
210
193
  .navbar-light {
211
194
  .navbar-brand {
212
- color: $navbar-light-active-color;
195
+ color: $navbar-light-brand-color;
213
196
 
214
197
  @include hover-focus {
215
- color: $navbar-light-active-color;
198
+ color: $navbar-light-brand-hover-color;
216
199
  }
217
200
  }
218
201
 
@@ -261,10 +244,10 @@
261
244
  // White links against a dark background
262
245
  .navbar-dark {
263
246
  .navbar-brand {
264
- color: $navbar-dark-active-color;
247
+ color: $navbar-dark-brand-color;
265
248
 
266
249
  @include hover-focus {
267
- color: $navbar-dark-active-color;
250
+ color: $navbar-dark-brand-hover-color;
268
251
  }
269
252
  }
270
253
 
@@ -15,6 +15,7 @@
15
15
  border: $pagination-border-width solid $pagination-border-color;
16
16
 
17
17
  &:hover {
18
+ z-index: 2;
18
19
  color: $pagination-hover-color;
19
20
  text-decoration: none;
20
21
  background-color: $pagination-hover-bg;
@@ -23,14 +24,9 @@
23
24
 
24
25
  &:focus {
25
26
  z-index: 2;
26
- outline: 0;
27
+ outline: $pagination-focus-outline;
27
28
  box-shadow: $pagination-focus-box-shadow;
28
29
  }
29
-
30
- // Opinionated: add "hand" cursor to non-disabled .page-link elements
31
- &:not(:disabled):not(.disabled) {
32
- cursor: pointer;
33
- }
34
30
  }
35
31
 
36
32
  .page-item {
@@ -8,7 +8,7 @@
8
8
  // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
9
9
  // So reset our font and text properties to avoid inheriting weird values.
10
10
  @include reset-text();
11
- font-size: $popover-font-size;
11
+ @include font-size($popover-font-size);
12
12
  // Allow breaking very long words so they don't overflow the popover's bounds
13
13
  word-wrap: break-word;
14
14
  background-color: $popover-bg;
@@ -38,72 +38,63 @@
38
38
  .bs-popover-top {
39
39
  margin-bottom: $popover-arrow-height;
40
40
 
41
- .arrow {
41
+ > .arrow {
42
42
  bottom: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
43
- }
44
43
 
45
- .arrow::before,
46
- .arrow::after {
47
- border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
48
- }
49
-
50
- .arrow::before {
51
- bottom: 0;
52
- border-top-color: $popover-arrow-outer-color;
53
- }
44
+ &::before {
45
+ bottom: 0;
46
+ border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
47
+ border-top-color: $popover-arrow-outer-color;
48
+ }
54
49
 
55
- .arrow::after {
56
- bottom: $popover-border-width;
57
- border-top-color: $popover-arrow-color;
50
+ &::after {
51
+ bottom: $popover-border-width;
52
+ border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
53
+ border-top-color: $popover-arrow-color;
54
+ }
58
55
  }
59
56
  }
60
57
 
61
58
  .bs-popover-right {
62
59
  margin-left: $popover-arrow-height;
63
60
 
64
- .arrow {
61
+ > .arrow {
65
62
  left: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
66
63
  width: $popover-arrow-height;
67
64
  height: $popover-arrow-width;
68
65
  margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
69
- }
70
-
71
- .arrow::before,
72
- .arrow::after {
73
- border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
74
- }
75
66
 
76
- .arrow::before {
77
- left: 0;
78
- border-right-color: $popover-arrow-outer-color;
79
- }
67
+ &::before {
68
+ 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;
71
+ }
80
72
 
81
- .arrow::after {
82
- left: $popover-border-width;
83
- border-right-color: $popover-arrow-color;
73
+ &::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;
77
+ }
84
78
  }
85
79
  }
86
80
 
87
81
  .bs-popover-bottom {
88
82
  margin-top: $popover-arrow-height;
89
83
 
90
- .arrow {
84
+ > .arrow {
91
85
  top: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
92
- }
93
-
94
- .arrow::before,
95
- .arrow::after {
96
- border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
97
- }
98
86
 
99
- .arrow::before {
100
- top: 0;
101
- border-bottom-color: $popover-arrow-outer-color;
102
- }
87
+ &::before {
88
+ 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;
91
+ }
103
92
 
104
- .arrow::after {
105
- top: $popover-border-width;
106
- border-bottom-color: $popover-arrow-color;
93
+ &::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;
97
+ }
107
98
  }
108
99
 
109
100
  // This will remove the popover-header's border just below the arrow
@@ -113,7 +104,7 @@
113
104
  left: 50%;
114
105
  display: block;
115
106
  width: $popover-arrow-width;
116
- margin-left: ($popover-arrow-width / -2);
107
+ margin-left: -$popover-arrow-width / 2;
117
108
  content: "";
118
109
  border-bottom: $popover-border-width solid $popover-header-bg;
119
110
  }
@@ -122,26 +113,23 @@
122
113
  .bs-popover-left {
123
114
  margin-right: $popover-arrow-height;
124
115
 
125
- .arrow {
116
+ > .arrow {
126
117
  right: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
127
118
  width: $popover-arrow-height;
128
119
  height: $popover-arrow-width;
129
120
  margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
130
- }
131
-
132
- .arrow::before,
133
- .arrow::after {
134
- border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
135
- }
136
121
 
137
- .arrow::before {
138
- right: 0;
139
- border-left-color: $popover-arrow-outer-color;
140
- }
122
+ &::before {
123
+ 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;
126
+ }
141
127
 
142
- .arrow::after {
143
- right: $popover-border-width;
144
- border-left-color: $popover-arrow-color;
128
+ &::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;
132
+ }
145
133
  }
146
134
  }
147
135
 
@@ -165,7 +153,7 @@
165
153
  .popover-header {
166
154
  padding: $popover-header-padding-y $popover-header-padding-x;
167
155
  margin-bottom: 0; // Reset the default from Reboot
168
- font-size: $font-size-base;
156
+ @include font-size($font-size-base);
169
157
  color: $popover-header-color;
170
158
  background-color: $popover-header-bg;
171
159
  border-bottom: $popover-border-width solid darken($popover-header-bg, 5%);
@@ -5,7 +5,7 @@
5
5
  // ==========================================================================
6
6
  // Print styles.
7
7
  // Inlined to avoid the additional HTTP request:
8
- // http://www.phpied.com/delay-loading-your-print-css/
8
+ // https://www.phpied.com/delay-loading-your-print-css/
9
9
  // ==========================================================================
10
10
 
11
11
  @if $enable-print-styles {
@@ -14,7 +14,7 @@
14
14
  *::before,
15
15
  *::after {
16
16
  // Bootstrap specific; comment out `color` and `background`
17
- //color: #000 !important; // Black prints faster: http://www.sanbeiji.com/archives/953
17
+ //color: $black !important; // Black prints faster
18
18
  text-shadow: none !important;
19
19
  //background: transparent !important;
20
20
  box-shadow: none !important;
@@ -51,7 +51,7 @@
51
51
  }
52
52
  pre,
53
53
  blockquote {
54
- border: $border-width solid #999; // Bootstrap custom code; using `$border-width` instead of 1px
54
+ border: $border-width solid $gray-500; // Bootstrap custom code; using `$border-width` instead of 1px
55
55
  page-break-inside: avoid;
56
56
  }
57
57
 
@@ -101,7 +101,7 @@
101
101
  display: none;
102
102
  }
103
103
  .badge {
104
- border: $border-width solid #000;
104
+ border: $border-width solid $black;
105
105
  }
106
106
 
107
107
  .table {
@@ -109,16 +109,33 @@
109
109
 
110
110
  td,
111
111
  th {
112
- background-color: #fff !important;
112
+ background-color: $white !important;
113
113
  }
114
114
  }
115
+
115
116
  .table-bordered {
116
117
  th,
117
118
  td {
118
- border: 1px solid #ddd !important;
119
+ border: 1px solid $gray-300 !important;
119
120
  }
120
121
  }
121
122
 
123
+ .table-dark {
124
+ color: inherit;
125
+
126
+ th,
127
+ td,
128
+ thead th,
129
+ tbody + tbody {
130
+ border-color: $table-border-color;
131
+ }
132
+ }
133
+
134
+ .table .thead-dark th {
135
+ color: inherit;
136
+ border-color: $table-border-color;
137
+ }
138
+
122
139
  // Bootstrap specific changes end
123
140
  }
124
141
  }
@@ -1,13 +1,16 @@
1
- @keyframes progress-bar-stripes {
2
- from { background-position: $progress-height 0; }
3
- to { background-position: 0 0; }
1
+ // Disable animation if transitions are disabled
2
+ @if $enable-transitions {
3
+ @keyframes progress-bar-stripes {
4
+ from { background-position: $progress-height 0; }
5
+ to { background-position: 0 0; }
6
+ }
4
7
  }
5
8
 
6
9
  .progress {
7
10
  display: flex;
8
11
  height: $progress-height;
9
12
  overflow: hidden; // force rounded corners by cropping it
10
- font-size: $progress-font-size;
13
+ @include font-size($progress-font-size);
11
14
  background-color: $progress-bg;
12
15
  @include border-radius($progress-border-radius);
13
16
  @include box-shadow($progress-box-shadow);
@@ -19,6 +22,7 @@
19
22
  justify-content: center;
20
23
  color: $progress-bar-color;
21
24
  text-align: center;
25
+ white-space: nowrap;
22
26
  background-color: $progress-bar-bg;
23
27
  @include transition($progress-bar-transition);
24
28
  }
@@ -28,6 +32,12 @@
28
32
  background-size: $progress-height $progress-height;
29
33
  }
30
34
 
31
- .progress-bar-animated {
32
- animation: progress-bar-stripes $progress-bar-animation-timing;
35
+ @if $enable-transitions {
36
+ .progress-bar-animated {
37
+ animation: progress-bar-stripes $progress-bar-animation-timing;
38
+
39
+ @media (prefers-reduced-motion: reduce) {
40
+ animation: none;
41
+ }
42
+ }
33
43
  }
@@ -14,9 +14,7 @@
14
14
  // 2. Change the default font family in all browsers.
15
15
  // 3. Correct the line height in all browsers.
16
16
  // 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
17
- // 5. Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
18
- // we force a non-overlapping, non-auto-hiding scrollbar to counteract.
19
- // 6. Change the default tap highlight to be completely transparent in iOS.
17
+ // 5. Change the default tap highlight to be completely transparent in iOS.
20
18
 
21
19
  *,
22
20
  *::before,
@@ -28,36 +26,27 @@ html {
28
26
  font-family: sans-serif; // 2
29
27
  line-height: 1.15; // 3
30
28
  -webkit-text-size-adjust: 100%; // 4
31
- -ms-text-size-adjust: 100%; // 4
32
- -ms-overflow-style: scrollbar; // 5
33
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // 6
29
+ -webkit-tap-highlight-color: rgba($black, 0); // 5
34
30
  }
35
31
 
36
- // IE10+ doesn't honor `<meta name="viewport">` in some cases.
37
- @at-root {
38
- @-ms-viewport {
39
- width: device-width;
40
- }
41
- }
42
-
43
- // stylelint-disable selector-list-comma-newline-after
44
32
  // Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
45
- article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
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 {
46
36
  display: block;
47
37
  }
48
- // stylelint-enable selector-list-comma-newline-after
49
38
 
50
39
  // Body
51
40
  //
52
41
  // 1. Remove the margin in all browsers.
53
42
  // 2. As a best practice, apply a default `background-color`.
54
- // 3. Set an explicit initial text-align value so that we can later use the
43
+ // 3. Set an explicit initial text-align value so that we can later use
55
44
  // the `inherit` value on things like `<th>` elements.
56
45
 
57
46
  body {
58
47
  margin: 0; // 1
59
48
  font-family: $font-family-base;
60
- font-size: $font-size-base;
49
+ @include font-size($font-size-base);
61
50
  font-weight: $font-weight-base;
62
51
  line-height: $line-height-base;
63
52
  color: $body-color;
@@ -95,12 +84,11 @@ hr {
95
84
  //
96
85
  // By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
97
86
  // margin for easier control within type scales as it avoids margin collapsing.
98
- // stylelint-disable selector-list-comma-newline-after
87
+ // stylelint-disable-next-line selector-list-comma-newline-after
99
88
  h1, h2, h3, h4, h5, h6 {
100
89
  margin-top: 0;
101
90
  margin-bottom: $headings-margin-bottom;
102
91
  }
103
- // stylelint-enable selector-list-comma-newline-after
104
92
 
105
93
  // Reset margins on paragraphs
106
94
  //
@@ -113,17 +101,19 @@ p {
113
101
 
114
102
  // Abbreviations
115
103
  //
116
- // 1. Remove the bottom border in Firefox 39-.
104
+ // 1. Duplicate behavior to the data-* attribute for our tooltip plugin
117
105
  // 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
118
106
  // 3. Add explicit cursor to indicate changed behavior.
119
- // 4. Duplicate behavior to the data-* attribute for our tooltip plugin
107
+ // 4. Remove the bottom border in Firefox 39-.
108
+ // 5. Prevent the text-decoration to be skipped.
120
109
 
121
110
  abbr[title],
122
- abbr[data-original-title] { // 4
111
+ abbr[data-original-title] { // 1
123
112
  text-decoration: underline; // 2
124
113
  text-decoration: underline dotted; // 2
125
114
  cursor: help; // 3
126
- border-bottom: 0; // 1
115
+ border-bottom: 0; // 4
116
+ text-decoration-skip-ink: none; // 5
127
117
  }
128
118
 
129
119
  address {
@@ -159,19 +149,13 @@ blockquote {
159
149
  margin: 0 0 1rem;
160
150
  }
161
151
 
162
- dfn {
163
- font-style: italic; // Add the correct font style in Android 4.3-
164
- }
165
-
166
- // stylelint-disable font-weight-notation
167
152
  b,
168
153
  strong {
169
- font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari
154
+ font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari
170
155
  }
171
- // stylelint-enable font-weight-notation
172
156
 
173
157
  small {
174
- font-size: 80%; // Add the correct font size in all browsers
158
+ @include font-size(80%); // Add the correct font size in all browsers
175
159
  }
176
160
 
177
161
  //
@@ -182,7 +166,7 @@ small {
182
166
  sub,
183
167
  sup {
184
168
  position: relative;
185
- font-size: 75%;
169
+ @include font-size(75%);
186
170
  line-height: 0;
187
171
  vertical-align: baseline;
188
172
  }
@@ -199,7 +183,6 @@ a {
199
183
  color: $link-color;
200
184
  text-decoration: $link-decoration;
201
185
  background-color: transparent; // Remove the gray background on active links in IE 10.
202
- -webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.
203
186
 
204
187
  @include hover {
205
188
  color: $link-hover-color;
@@ -232,15 +215,13 @@ a:not([href]):not([tabindex]) {
232
215
  // Code
233
216
  //
234
217
 
235
- // stylelint-disable font-family-no-duplicate-names
236
218
  pre,
237
219
  code,
238
220
  kbd,
239
221
  samp {
240
- font-family: monospace, monospace; // Correct the inheritance and scaling of font size in all browsers.
241
- font-size: 1em; // Correct the odd `em` font sizing in all browsers.
222
+ font-family: $font-family-monospace;
223
+ @include font-size(1em); // Correct the odd `em` font sizing in all browsers.
242
224
  }
243
- // stylelint-enable font-family-no-duplicate-names
244
225
 
245
226
  pre {
246
227
  // Remove browser default top margin
@@ -249,9 +230,6 @@ pre {
249
230
  margin-bottom: 1rem;
250
231
  // Don't allow content to break outside
251
232
  overflow: auto;
252
- // We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so
253
- // we force a non-overlapping, non-auto-hiding scrollbar to counteract.
254
- -ms-overflow-style: scrollbar;
255
233
  }
256
234
 
257
235
 
@@ -274,8 +252,11 @@ img {
274
252
  border-style: none; // Remove the border on images inside links in IE 10-.
275
253
  }
276
254
 
277
- svg:not(:root) {
278
- overflow: hidden; // Hide the overflow in IE
255
+ 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
+ vertical-align: middle;
279
260
  }
280
261
 
281
262
 
@@ -290,7 +271,7 @@ table {
290
271
  caption {
291
272
  padding-top: $table-cell-padding;
292
273
  padding-bottom: $table-cell-padding;
293
- color: $text-muted;
274
+ color: $table-caption-color;
294
275
  text-align: left;
295
276
  caption-side: bottom;
296
277
  }
@@ -309,13 +290,14 @@ th {
309
290
  label {
310
291
  // Allow labels to use `margin` for spacing.
311
292
  display: inline-block;
312
- margin-bottom: .5rem;
293
+ margin-bottom: $label-margin-bottom;
313
294
  }
314
295
 
315
296
  // Remove the default `border-radius` that macOS Chrome adds.
316
297
  //
317
298
  // Details at https://github.com/twbs/bootstrap/issues/24093
318
299
  button {
300
+ // stylelint-disable-next-line property-blacklist
319
301
  border-radius: 0;
320
302
  }
321
303
 
@@ -335,7 +317,7 @@ optgroup,
335
317
  textarea {
336
318
  margin: 0; // Remove the margin in Firefox and Safari
337
319
  font-family: inherit;
338
- font-size: inherit;
320
+ @include font-size(inherit);
339
321
  line-height: inherit;
340
322
  }
341
323
 
@@ -349,16 +331,36 @@ select {
349
331
  text-transform: none; // Remove the inheritance of text transform in Firefox
350
332
  }
351
333
 
334
+ // Remove the inheritance of word-wrap in Safari.
335
+ //
336
+ // Details at https://github.com/twbs/bootstrap/issues/24990
337
+ select {
338
+ word-wrap: normal;
339
+ }
340
+
341
+
352
342
  // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
353
343
  // controls in Android 4.
354
344
  // 2. Correct the inability to style clickable types in iOS and Safari.
355
345
  button,
356
- html [type="button"], // 1
346
+ [type="button"], // 1
357
347
  [type="reset"],
358
348
  [type="submit"] {
359
349
  -webkit-appearance: button; // 2
360
350
  }
361
351
 
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"] {
358
+ &:not(:disabled) {
359
+ cursor: pointer;
360
+ }
361
+ }
362
+ }
363
+
362
364
  // Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
363
365
  button::-moz-focus-inner,
364
366
  [type="button"]::-moz-focus-inner,
@@ -414,7 +416,7 @@ legend {
414
416
  max-width: 100%; // 1
415
417
  padding: 0;
416
418
  margin-bottom: .5rem;
417
- font-size: 1.5rem;
419
+ @include font-size(1.5rem);
418
420
  line-height: inherit;
419
421
  color: inherit; // 2
420
422
  white-space: normal; // 1
@@ -440,10 +442,9 @@ progress {
440
442
  }
441
443
 
442
444
  //
443
- // Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
445
+ // Remove the inner padding in Chrome and Safari on macOS.
444
446
  //
445
447
 
446
- [type="search"]::-webkit-search-cancel-button,
447
448
  [type="search"]::-webkit-search-decoration {
448
449
  -webkit-appearance: none;
449
450
  }