bootstrap 4.0.0.beta2.1 → 4.0.0.beta3

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.

Potentially problematic release.


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

Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +1 -1
  4. data/assets/javascripts/bootstrap-sprockets.js +4 -4
  5. data/assets/javascripts/bootstrap.js +576 -534
  6. data/assets/javascripts/bootstrap.min.js +2 -2
  7. data/assets/javascripts/bootstrap/alert.js +3 -3
  8. data/assets/javascripts/bootstrap/button.js +3 -3
  9. data/assets/javascripts/bootstrap/carousel.js +10 -7
  10. data/assets/javascripts/bootstrap/collapse.js +7 -5
  11. data/assets/javascripts/bootstrap/dropdown.js +64 -37
  12. data/assets/javascripts/bootstrap/modal.js +8 -6
  13. data/assets/javascripts/bootstrap/popover.js +19 -7
  14. data/assets/javascripts/bootstrap/scrollspy.js +6 -4
  15. data/assets/javascripts/bootstrap/tab.js +8 -16
  16. data/assets/javascripts/bootstrap/tooltip.js +23 -17
  17. data/assets/javascripts/bootstrap/util.js +18 -21
  18. data/assets/stylesheets/_bootstrap-grid.scss +1 -1
  19. data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
  20. data/assets/stylesheets/_bootstrap.scss +2 -2
  21. data/assets/stylesheets/bootstrap/_alert.scss +2 -0
  22. data/assets/stylesheets/bootstrap/_button-group.scss +31 -72
  23. data/assets/stylesheets/bootstrap/_buttons.scss +22 -11
  24. data/assets/stylesheets/bootstrap/_card.scss +23 -12
  25. data/assets/stylesheets/bootstrap/_carousel.scss +2 -2
  26. data/assets/stylesheets/bootstrap/_close.scss +6 -1
  27. data/assets/stylesheets/bootstrap/_code.scss +4 -12
  28. data/assets/stylesheets/bootstrap/_custom-forms.scss +110 -85
  29. data/assets/stylesheets/bootstrap/_dropdown.scss +30 -2
  30. data/assets/stylesheets/bootstrap/_forms.scss +46 -71
  31. data/assets/stylesheets/bootstrap/_functions.scss +4 -4
  32. data/assets/stylesheets/bootstrap/_images.scss +0 -1
  33. data/assets/stylesheets/bootstrap/_input-group.scss +96 -126
  34. data/assets/stylesheets/bootstrap/_list-group.scss +2 -1
  35. data/assets/stylesheets/bootstrap/_modal.scss +24 -9
  36. data/assets/stylesheets/bootstrap/_nav.scss +2 -2
  37. data/assets/stylesheets/bootstrap/_navbar.scss +6 -1
  38. data/assets/stylesheets/bootstrap/_pagination.scss +27 -19
  39. data/assets/stylesheets/bootstrap/_popover.scss +104 -115
  40. data/assets/stylesheets/bootstrap/_progress.scss +4 -1
  41. data/assets/stylesheets/bootstrap/_reboot.scss +3 -2
  42. data/assets/stylesheets/bootstrap/_tables.scss +1 -1
  43. data/assets/stylesheets/bootstrap/_tooltip.scss +63 -55
  44. data/assets/stylesheets/bootstrap/_type.scss +2 -2
  45. data/assets/stylesheets/bootstrap/_variables.scss +135 -91
  46. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +2 -1
  47. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +4 -2
  48. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +25 -18
  49. data/assets/stylesheets/bootstrap/mixins/_caret.scss +30 -0
  50. data/assets/stylesheets/bootstrap/mixins/_forms.scss +42 -17
  51. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -1
  52. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +1 -0
  53. data/lib/bootstrap/version.rb +2 -2
  54. data/tasks/updater/js.rb +1 -1
  55. metadata +3 -3
@@ -59,6 +59,7 @@
59
59
  }
60
60
 
61
61
  @include hover-focus {
62
+ z-index: 1; // Place hover/active items above their siblings for proper border styling
62
63
  text-decoration: none;
63
64
  }
64
65
 
@@ -87,7 +88,7 @@
87
88
  .list-group-item {
88
89
  border-right: 0;
89
90
  border-left: 0;
90
- border-radius: 0;
91
+ @include border-radius(0);
91
92
  }
92
93
 
93
94
  &:first-child {
@@ -26,16 +26,10 @@
26
26
  // gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
27
27
  // See also https://github.com/twbs/bootstrap/issues/17695
28
28
 
29
- // When fading in the modal, animate it to slide down
30
- &.fade .modal-dialog {
31
- @include transition($modal-transition);
32
- transform: translate(0, -25%);
29
+ .modal-open & {
30
+ overflow-x: hidden;
31
+ overflow-y: auto;
33
32
  }
34
- &.show .modal-dialog { transform: translate(0, 0); }
35
- }
36
- .modal-open .modal {
37
- overflow-x: hidden;
38
- overflow-y: auto;
39
33
  }
40
34
 
41
35
  // Shell div to position the modal with bottom padding
@@ -45,6 +39,21 @@
45
39
  margin: $modal-dialog-margin;
46
40
  // allow clicks to pass through for custom click handling to close modal
47
41
  pointer-events: none;
42
+
43
+ // When fading in the modal, animate it to slide down
44
+ .modal.fade & {
45
+ @include transition($modal-transition);
46
+ transform: translate(0, -25%);
47
+ }
48
+ .modal.show & {
49
+ transform: translate(0, 0);
50
+ }
51
+ }
52
+
53
+ .modal-dialog-centered {
54
+ display: flex;
55
+ align-items: center;
56
+ min-height: calc(100% - (#{$modal-dialog-margin} * 2));
48
57
  }
49
58
 
50
59
  // Actual modal
@@ -52,6 +61,7 @@
52
61
  position: relative;
53
62
  display: flex;
54
63
  flex-direction: column;
64
+ width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
55
65
  // counteract the pointer-events: none; in the .modal-dialog
56
66
  pointer-events: auto;
57
67
  background-color: $modal-content-bg;
@@ -141,11 +151,16 @@
141
151
  margin: $modal-dialog-margin-y-sm-up auto;
142
152
  }
143
153
 
154
+ .modal-dialog-centered {
155
+ min-height: calc(100% - (#{$modal-dialog-margin-y-sm-up} * 2));
156
+ }
157
+
144
158
  .modal-content {
145
159
  @include box-shadow($modal-content-box-shadow-sm-up);
146
160
  }
147
161
 
148
162
  .modal-sm { max-width: $modal-sm; }
163
+
149
164
  }
150
165
 
151
166
  @include media-breakpoint-up(lg) {
@@ -41,7 +41,7 @@
41
41
  @include border-top-radius($nav-tabs-border-radius);
42
42
 
43
43
  @include hover-focus {
44
- border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color;
44
+ border-color: $nav-tabs-link-hover-border-color;
45
45
  }
46
46
 
47
47
  &.disabled {
@@ -55,7 +55,7 @@
55
55
  .nav-item.show .nav-link {
56
56
  color: $nav-tabs-link-active-color;
57
57
  background-color: $nav-tabs-link-active-bg;
58
- border-color: $nav-tabs-link-active-border-color $nav-tabs-link-active-border-color $nav-tabs-link-active-bg;
58
+ border-color: $nav-tabs-link-active-border-color;
59
59
  }
60
60
 
61
61
  .dropdown-menu {
@@ -109,13 +109,18 @@
109
109
  padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
110
110
  font-size: $navbar-toggler-font-size;
111
111
  line-height: 1;
112
- background: transparent; // remove default button style
112
+ background-color: transparent; // remove default button style
113
113
  border: $border-width solid transparent; // remove default button style
114
114
  @include border-radius($navbar-toggler-border-radius);
115
115
 
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
+ }
119
124
  }
120
125
 
121
126
  // Keep as a separate element so folks can easily override it with another icon
@@ -4,6 +4,30 @@
4
4
  @include border-radius();
5
5
  }
6
6
 
7
+ .page-link {
8
+ position: relative;
9
+ 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;
14
+ background-color: $pagination-bg;
15
+ border: $pagination-border-width solid $pagination-border-color;
16
+
17
+ @include hover-focus {
18
+ color: $pagination-hover-color;
19
+ text-decoration: none;
20
+ background-color: $pagination-hover-bg;
21
+ border-color: $pagination-hover-border-color;
22
+ }
23
+
24
+
25
+ // Opinionated: add "hand" cursor to non-disabled .page-link elements
26
+ &:not([disabled]):not(.disabled) {
27
+ cursor: pointer;
28
+ }
29
+ }
30
+
7
31
  .page-item {
8
32
  &:first-child {
9
33
  .page-link {
@@ -18,7 +42,7 @@
18
42
  }
19
43
 
20
44
  &.active .page-link {
21
- z-index: 2;
45
+ z-index: 1;
22
46
  color: $pagination-active-color;
23
47
  background-color: $pagination-active-bg;
24
48
  border-color: $pagination-active-border-color;
@@ -27,29 +51,13 @@
27
51
  &.disabled .page-link {
28
52
  color: $pagination-disabled-color;
29
53
  pointer-events: none;
54
+ // Opinionated: remove the "hand" cursor set previously for .page-link
55
+ cursor: auto;
30
56
  background-color: $pagination-disabled-bg;
31
57
  border-color: $pagination-disabled-border-color;
32
58
  }
33
59
  }
34
60
 
35
- .page-link {
36
- position: relative;
37
- display: block;
38
- padding: $pagination-padding-y $pagination-padding-x;
39
- margin-left: -$pagination-border-width;
40
- line-height: $pagination-line-height;
41
- color: $pagination-color;
42
- background-color: $pagination-bg;
43
- border: $pagination-border-width solid $pagination-border-color;
44
-
45
- @include hover-focus {
46
- color: $pagination-hover-color;
47
- text-decoration: none;
48
- background-color: $pagination-hover-bg;
49
- border-color: $pagination-hover-border-color;
50
- }
51
- }
52
-
53
61
 
54
62
  //
55
63
  // Sizing
@@ -17,157 +17,146 @@
17
17
  @include border-radius($border-radius-lg);
18
18
  @include box-shadow($popover-box-shadow);
19
19
 
20
- // Arrows
21
- //
22
- // .arrow is outer, .arrow::after is inner
23
-
24
20
  .arrow {
25
21
  position: absolute;
26
22
  display: block;
27
23
  width: $popover-arrow-width;
28
24
  height: $popover-arrow-height;
25
+ margin: 0 $border-radius-lg;
26
+
27
+ &::before,
28
+ &::after {
29
+ position: absolute;
30
+ display: block;
31
+ content: "";
32
+ border-color: transparent;
33
+ border-style: solid;
34
+ }
35
+ }
36
+ }
37
+
38
+ .bs-popover-top {
39
+ margin-bottom: $popover-arrow-height;
40
+
41
+ .arrow {
42
+ bottom: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
29
43
  }
30
44
 
31
45
  .arrow::before,
32
46
  .arrow::after {
33
- position: absolute;
34
- display: block;
35
- border-color: transparent;
36
- border-style: solid;
47
+ border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
37
48
  }
38
49
 
39
50
  .arrow::before {
40
- content: "";
41
- border-width: $popover-arrow-width;
51
+ bottom: 0;
52
+ border-top-color: $popover-arrow-outer-color;
42
53
  }
54
+
43
55
  .arrow::after {
44
- content: "";
45
- border-width: $popover-arrow-width;
56
+ bottom: $popover-border-width;
57
+ border-top-color: $popover-arrow-color;
46
58
  }
59
+ }
47
60
 
48
- // Popover directions
49
-
50
- &.bs-popover-top {
51
- margin-bottom: $popover-arrow-width;
52
-
53
- .arrow {
54
- bottom: 0;
55
- }
56
-
57
- .arrow::before,
58
- .arrow::after {
59
- border-bottom-width: 0;
60
- }
61
+ .bs-popover-right {
62
+ margin-left: $popover-arrow-height;
61
63
 
62
- .arrow::before {
63
- bottom: -$popover-arrow-width;
64
- margin-left: -$popover-arrow-width;
65
- border-top-color: $popover-arrow-outer-color;
66
- }
67
-
68
- .arrow::after {
69
- bottom: calc((#{$popover-arrow-width} - #{$popover-border-width}) * -1);
70
- margin-left: -$popover-arrow-width;
71
- border-top-color: $popover-arrow-color;
72
- }
64
+ .arrow {
65
+ left: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
66
+ width: $popover-arrow-height;
67
+ height: $popover-arrow-width;
68
+ margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
73
69
  }
74
70
 
75
- &.bs-popover-right {
76
- margin-left: $popover-arrow-width;
71
+ .arrow::before,
72
+ .arrow::after {
73
+ border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
74
+ }
77
75
 
78
- .arrow {
79
- left: 0;
80
- }
76
+ .arrow::before {
77
+ left: 0;
78
+ border-right-color: $popover-arrow-outer-color;
79
+ }
81
80
 
82
- .arrow::before,
83
- .arrow::after {
84
- margin-top: -$popover-arrow-width;
85
- border-left-width: 0;
86
- }
81
+ .arrow::after {
82
+ left: $popover-border-width;
83
+ border-right-color: $popover-arrow-color;
84
+ }
85
+ }
87
86
 
88
- .arrow::before {
89
- left: -$popover-arrow-width;
90
- border-right-color: $popover-arrow-outer-color;
91
- }
87
+ .bs-popover-bottom {
88
+ margin-top: $popover-arrow-height;
92
89
 
93
- .arrow::after {
94
- left: calc((#{$popover-arrow-width} - #{$popover-border-width}) * -1);
95
- border-right-color: $popover-arrow-color;
96
- }
90
+ .arrow {
91
+ top: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
97
92
  }
98
93
 
99
- &.bs-popover-bottom {
100
- margin-top: $popover-arrow-width;
94
+ .arrow::before,
95
+ .arrow::after {
96
+ border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
97
+ }
101
98
 
102
- .arrow {
103
- top: 0;
104
- }
99
+ .arrow::before {
100
+ top: 0;
101
+ border-bottom-color: $popover-arrow-outer-color;
102
+ }
105
103
 
106
- .arrow::before,
107
- .arrow::after {
108
- margin-left: -$popover-arrow-width;
109
- border-top-width: 0;
110
- }
104
+ .arrow::after {
105
+ top: $popover-border-width;
106
+ border-bottom-color: $popover-arrow-color;
107
+ }
111
108
 
112
- .arrow::before {
113
- top: -$popover-arrow-width;
114
- border-bottom-color: $popover-arrow-outer-color;
115
- }
109
+ // This will remove the popover-header's border just below the arrow
110
+ .popover-header::before {
111
+ position: absolute;
112
+ top: 0;
113
+ left: 50%;
114
+ display: block;
115
+ width: $popover-arrow-width;
116
+ margin-left: ($popover-arrow-width / -2);
117
+ content: "";
118
+ border-bottom: $popover-border-width solid $popover-header-bg;
119
+ }
120
+ }
116
121
 
117
- .arrow::after {
118
- top: calc((#{$popover-arrow-width} - #{$popover-border-width}) * -1);
119
- border-bottom-color: $popover-arrow-color;
120
- }
122
+ .bs-popover-left {
123
+ margin-right: $popover-arrow-height;
121
124
 
122
- // This will remove the popover-header's border just below the arrow
123
- .popover-header::before {
124
- position: absolute;
125
- top: 0;
126
- left: 50%;
127
- display: block;
128
- width: 20px;
129
- margin-left: -10px;
130
- content: "";
131
- border-bottom: $popover-border-width solid $popover-header-bg;
132
- }
125
+ .arrow {
126
+ right: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
127
+ width: $popover-arrow-height;
128
+ height: $popover-arrow-width;
129
+ margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
133
130
  }
134
131
 
135
- &.bs-popover-left {
136
- margin-right: $popover-arrow-width;
137
-
138
- .arrow {
139
- right: 0;
140
- }
132
+ .arrow::before,
133
+ .arrow::after {
134
+ border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
135
+ }
141
136
 
142
- .arrow::before,
143
- .arrow::after {
144
- margin-top: -$popover-arrow-width;
145
- border-right-width: 0;
146
- }
137
+ .arrow::before {
138
+ right: 0;
139
+ border-left-color: $popover-arrow-outer-color;
140
+ }
147
141
 
148
- .arrow::before {
149
- right: -$popover-arrow-width;
150
- border-left-color: $popover-arrow-outer-color;
151
- }
142
+ .arrow::after {
143
+ right: $popover-border-width;
144
+ border-left-color: $popover-arrow-color;
145
+ }
146
+ }
152
147
 
153
- .arrow::after {
154
- right: calc((#{$popover-arrow-width} - #{$popover-border-width}) * -1);
155
- border-left-color: $popover-arrow-color;
156
- }
148
+ .bs-popover-auto {
149
+ &[x-placement^="top"] {
150
+ @extend .bs-popover-top;
157
151
  }
158
- &.bs-popover-auto {
159
- &[x-placement^="top"] {
160
- @extend .bs-popover-top;
161
- }
162
- &[x-placement^="right"] {
163
- @extend .bs-popover-right;
164
- }
165
- &[x-placement^="bottom"] {
166
- @extend .bs-popover-bottom;
167
- }
168
- &[x-placement^="left"] {
169
- @extend .bs-popover-left;
170
- }
152
+ &[x-placement^="right"] {
153
+ @extend .bs-popover-right;
154
+ }
155
+ &[x-placement^="bottom"] {
156
+ @extend .bs-popover-bottom;
157
+ }
158
+ &[x-placement^="left"] {
159
+ @extend .bs-popover-left;
171
160
  }
172
161
  }
173
162