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
@@ -0,0 +1,55 @@
1
+ //
2
+ // Rotating border
3
+ //
4
+
5
+ @keyframes spinner-border {
6
+ to { transform: rotate(360deg); }
7
+ }
8
+
9
+ .spinner-border {
10
+ display: inline-block;
11
+ width: $spinner-width;
12
+ height: $spinner-height;
13
+ vertical-align: text-bottom;
14
+ border: $spinner-border-width solid currentColor;
15
+ border-right-color: transparent;
16
+ // stylelint-disable-next-line property-blacklist
17
+ border-radius: 50%;
18
+ animation: spinner-border .75s linear infinite;
19
+ }
20
+
21
+ .spinner-border-sm {
22
+ width: $spinner-width-sm;
23
+ height: $spinner-height-sm;
24
+ border-width: $spinner-border-width-sm;
25
+ }
26
+
27
+ //
28
+ // Growing circle
29
+ //
30
+
31
+ @keyframes spinner-grow {
32
+ 0% {
33
+ transform: scale(0);
34
+ }
35
+ 50% {
36
+ opacity: 1;
37
+ }
38
+ }
39
+
40
+ .spinner-grow {
41
+ display: inline-block;
42
+ width: $spinner-width;
43
+ height: $spinner-height;
44
+ vertical-align: text-bottom;
45
+ background-color: currentColor;
46
+ // stylelint-disable-next-line property-blacklist
47
+ border-radius: 50%;
48
+ opacity: 0;
49
+ animation: spinner-grow .75s linear infinite;
50
+ }
51
+
52
+ .spinner-grow-sm {
53
+ width: $spinner-width-sm;
54
+ height: $spinner-height-sm;
55
+ }
@@ -4,8 +4,8 @@
4
4
 
5
5
  .table {
6
6
  width: 100%;
7
- max-width: 100%;
8
7
  margin-bottom: $spacer;
8
+ color: $table-color;
9
9
  background-color: $table-bg; // Reset for nesting within parents with `background-color`.
10
10
 
11
11
  th,
@@ -23,10 +23,6 @@
23
23
  tbody + tbody {
24
24
  border-top: (2 * $table-border-width) solid $table-border-color;
25
25
  }
26
-
27
- .table {
28
- background-color: $body-bg;
29
- }
30
26
  }
31
27
 
32
28
 
@@ -42,9 +38,9 @@
42
38
  }
43
39
 
44
40
 
45
- // Bordered version
41
+ // Border versions
46
42
  //
47
- // Add borders all around the table and between all the columns.
43
+ // Add or remove borders all around the table and between all the columns.
48
44
 
49
45
  .table-bordered {
50
46
  border: $table-border-width solid $table-border-color;
@@ -57,18 +53,26 @@
57
53
  thead {
58
54
  th,
59
55
  td {
60
- border-bottom-width: (2 * $table-border-width);
56
+ border-bottom-width: 2 * $table-border-width;
61
57
  }
62
58
  }
63
59
  }
64
60
 
61
+ .table-borderless {
62
+ th,
63
+ td,
64
+ thead th,
65
+ tbody + tbody {
66
+ border: 0;
67
+ }
68
+ }
65
69
 
66
70
  // Zebra-striping
67
71
  //
68
72
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
69
73
 
70
74
  .table-striped {
71
- tbody tr:nth-of-type(odd) {
75
+ tbody tr:nth-of-type(#{$table-striped-order}) {
72
76
  background-color: $table-accent-bg;
73
77
  }
74
78
  }
@@ -81,6 +85,7 @@
81
85
  .table-hover {
82
86
  tbody tr {
83
87
  @include hover {
88
+ color: $table-hover-color;
84
89
  background-color: $table-hover-bg;
85
90
  }
86
91
  }
@@ -93,7 +98,7 @@
93
98
  // inheritance to nested tables.
94
99
 
95
100
  @each $color, $value in $theme-colors {
96
- @include table-row-variant($color, theme-color-level($color, -9));
101
+ @include table-row-variant($color, theme-color-level($color, $table-bg-level), theme-color-level($color, $table-border-level));
97
102
  }
98
103
 
99
104
  @include table-row-variant(active, $table-active-bg);
@@ -145,6 +150,7 @@
145
150
  &.table-hover {
146
151
  tbody tr {
147
152
  @include hover {
153
+ color: $table-dark-hover-color;
148
154
  background-color: $table-dark-hover-bg;
149
155
  }
150
156
  }
@@ -168,7 +174,6 @@
168
174
  width: 100%;
169
175
  overflow-x: auto;
170
176
  -webkit-overflow-scrolling: touch;
171
- -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
172
177
 
173
178
  // Prevent double border on horizontal scroll due to use of `display: block;`
174
179
  > .table-bordered {
@@ -0,0 +1,44 @@
1
+ .toast {
2
+ max-width: $toast-max-width;
3
+ overflow: hidden; // cheap rounded corners on nested items
4
+ @include font-size($toast-font-size);
5
+ color: $toast-color;
6
+ background-color: $toast-background-color;
7
+ background-clip: padding-box;
8
+ border: $toast-border-width solid $toast-border-color;
9
+ box-shadow: $toast-box-shadow;
10
+ backdrop-filter: blur(10px);
11
+ opacity: 0;
12
+ @include border-radius($toast-border-radius);
13
+
14
+ &:not(:last-child) {
15
+ margin-bottom: $toast-padding-x;
16
+ }
17
+
18
+ &.showing {
19
+ opacity: 1;
20
+ }
21
+
22
+ &.show {
23
+ display: block;
24
+ opacity: 1;
25
+ }
26
+
27
+ &.hide {
28
+ display: none;
29
+ }
30
+ }
31
+
32
+ .toast-header {
33
+ display: flex;
34
+ align-items: center;
35
+ padding: $toast-padding-y $toast-padding-x;
36
+ color: $toast-header-color;
37
+ background-color: $toast-header-background-color;
38
+ background-clip: padding-box;
39
+ border-bottom: $toast-border-width solid $toast-header-border-color;
40
+ }
41
+
42
+ .toast-body {
43
+ padding: $toast-padding-x; // apply to both vertical and horizontal
44
+ }
@@ -7,7 +7,7 @@
7
7
  // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
8
8
  // So reset our font and text properties to avoid inheriting weird values.
9
9
  @include reset-text();
10
- font-size: $tooltip-font-size;
10
+ @include font-size($tooltip-font-size);
11
11
  // Allow breaking very long words so they don't overflow the tooltip's bounds
12
12
  word-wrap: break-word;
13
13
  opacity: 0;
@@ -1,30 +1,14 @@
1
- // stylelint-disable selector-no-qualifying-type
2
-
3
1
  .fade {
4
- opacity: 0;
5
2
  @include transition($transition-fade);
6
3
 
7
- &.show {
8
- opacity: 1;
4
+ &:not(.show) {
5
+ opacity: 0;
9
6
  }
10
7
  }
11
8
 
12
9
  .collapse {
13
- display: none;
14
- &.show {
15
- display: block;
16
- }
17
- }
18
-
19
- tr {
20
- &.collapse.show {
21
- display: table-row;
22
- }
23
- }
24
-
25
- tbody {
26
- &.collapse.show {
27
- display: table-row-group;
10
+ &:not(.show) {
11
+ display: none;
28
12
  }
29
13
  }
30
14
 
@@ -13,36 +13,36 @@ h1, h2, h3, h4, h5, h6,
13
13
  color: $headings-color;
14
14
  }
15
15
 
16
- h1, .h1 { font-size: $h1-font-size; }
17
- h2, .h2 { font-size: $h2-font-size; }
18
- h3, .h3 { font-size: $h3-font-size; }
19
- h4, .h4 { font-size: $h4-font-size; }
20
- h5, .h5 { font-size: $h5-font-size; }
21
- h6, .h6 { font-size: $h6-font-size; }
16
+ h1, .h1 { @include font-size($h1-font-size); }
17
+ h2, .h2 { @include font-size($h2-font-size); }
18
+ h3, .h3 { @include font-size($h3-font-size); }
19
+ h4, .h4 { @include font-size($h4-font-size); }
20
+ h5, .h5 { @include font-size($h5-font-size); }
21
+ h6, .h6 { @include font-size($h6-font-size); }
22
22
 
23
23
  .lead {
24
- font-size: $lead-font-size;
24
+ @include font-size($lead-font-size);
25
25
  font-weight: $lead-font-weight;
26
26
  }
27
27
 
28
28
  // Type display classes
29
29
  .display-1 {
30
- font-size: $display1-size;
30
+ @include font-size($display1-size);
31
31
  font-weight: $display1-weight;
32
32
  line-height: $display-line-height;
33
33
  }
34
34
  .display-2 {
35
- font-size: $display2-size;
35
+ @include font-size($display2-size);
36
36
  font-weight: $display2-weight;
37
37
  line-height: $display-line-height;
38
38
  }
39
39
  .display-3 {
40
- font-size: $display3-size;
40
+ @include font-size($display3-size);
41
41
  font-weight: $display3-weight;
42
42
  line-height: $display-line-height;
43
43
  }
44
44
  .display-4 {
45
- font-size: $display4-size;
45
+ @include font-size($display4-size);
46
46
  font-weight: $display4-weight;
47
47
  line-height: $display-line-height;
48
48
  }
@@ -66,7 +66,7 @@ hr {
66
66
 
67
67
  small,
68
68
  .small {
69
- font-size: $small-font-size;
69
+ @include font-size($small-font-size);
70
70
  font-weight: $font-weight-normal;
71
71
  }
72
72
 
@@ -104,22 +104,22 @@ mark,
104
104
 
105
105
  // Builds on `abbr`
106
106
  .initialism {
107
- font-size: 90%;
107
+ @include font-size(90%);
108
108
  text-transform: uppercase;
109
109
  }
110
110
 
111
111
  // Blockquotes
112
112
  .blockquote {
113
113
  margin-bottom: $spacer;
114
- font-size: $blockquote-font-size;
114
+ @include font-size($blockquote-font-size);
115
115
  }
116
116
 
117
117
  .blockquote-footer {
118
118
  display: block;
119
- font-size: 80%; // back to default font-size
119
+ @include font-size($blockquote-small-font-size);
120
120
  color: $blockquote-small-color;
121
121
 
122
122
  &::before {
123
- content: "\2014 \00A0"; // em dash, nbsp
123
+ content: "\2014\00A0"; // em dash, nbsp
124
124
  }
125
125
  }
@@ -6,9 +6,12 @@
6
6
  @import "utilities/embed";
7
7
  @import "utilities/flex";
8
8
  @import "utilities/float";
9
+ @import "utilities/overflow";
9
10
  @import "utilities/position";
10
11
  @import "utilities/screenreaders";
12
+ @import "utilities/shadows";
11
13
  @import "utilities/sizing";
14
+ @import "utilities/stretched-link";
12
15
  @import "utilities/spacing";
13
16
  @import "utilities/text";
14
17
  @import "utilities/visibility";