bootstrap 4.0.0.alpha6 → 4.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/Gemfile +2 -4
  4. data/README.md +20 -22
  5. data/assets/javascripts/bootstrap.js +657 -361
  6. data/assets/javascripts/bootstrap.min.js +2 -3
  7. data/assets/javascripts/bootstrap/alert.js +8 -8
  8. data/assets/javascripts/bootstrap/button.js +16 -9
  9. data/assets/javascripts/bootstrap/carousel.js +48 -21
  10. data/assets/javascripts/bootstrap/collapse.js +42 -33
  11. data/assets/javascripts/bootstrap/dropdown.js +196 -52
  12. data/assets/javascripts/bootstrap/modal.js +71 -29
  13. data/assets/javascripts/bootstrap/popover.js +25 -13
  14. data/assets/javascripts/bootstrap/scrollspy.js +23 -21
  15. data/assets/javascripts/bootstrap/tab.js +14 -18
  16. data/assets/javascripts/bootstrap/tooltip.js +139 -83
  17. data/assets/javascripts/bootstrap/util.js +10 -8
  18. data/assets/stylesheets/_bootstrap-grid.scss +2 -8
  19. data/assets/stylesheets/_bootstrap-reboot.scss +1 -2
  20. data/assets/stylesheets/_bootstrap.scss +2 -15
  21. data/assets/stylesheets/bootstrap/_alert.scss +4 -11
  22. data/assets/stylesheets/bootstrap/_badge.scss +4 -33
  23. data/assets/stylesheets/bootstrap/_breadcrumb.scss +1 -1
  24. data/assets/stylesheets/bootstrap/_button-group.scss +11 -15
  25. data/assets/stylesheets/bootstrap/_buttons.scss +13 -42
  26. data/assets/stylesheets/bootstrap/_card.scss +27 -80
  27. data/assets/stylesheets/bootstrap/_carousel.scss +24 -17
  28. data/assets/stylesheets/bootstrap/_close.scss +0 -2
  29. data/assets/stylesheets/bootstrap/_custom-forms.scss +27 -36
  30. data/assets/stylesheets/bootstrap/_dropdown.scss +15 -48
  31. data/assets/stylesheets/bootstrap/_forms.scss +70 -68
  32. data/assets/stylesheets/bootstrap/_functions.scss +90 -0
  33. data/assets/stylesheets/bootstrap/_grid.scss +3 -2
  34. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  35. data/assets/stylesheets/bootstrap/_input-group.scss +6 -8
  36. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -4
  37. data/assets/stylesheets/bootstrap/_list-group.scss +9 -36
  38. data/assets/stylesheets/bootstrap/_mixins.scss +2 -18
  39. data/assets/stylesheets/bootstrap/_modal.scss +3 -3
  40. data/assets/stylesheets/bootstrap/_nav.scss +15 -16
  41. data/assets/stylesheets/bootstrap/_navbar.scss +70 -54
  42. data/assets/stylesheets/bootstrap/_pagination.scss +3 -4
  43. data/assets/stylesheets/bootstrap/_popover.scss +96 -72
  44. data/assets/stylesheets/bootstrap/_print.scss +1 -9
  45. data/assets/stylesheets/bootstrap/_progress.scss +4 -4
  46. data/assets/stylesheets/bootstrap/_reboot.scss +187 -95
  47. data/assets/stylesheets/bootstrap/_tables.scss +34 -19
  48. data/assets/stylesheets/bootstrap/_tooltip.scss +52 -35
  49. data/assets/stylesheets/bootstrap/_type.scss +8 -28
  50. data/assets/stylesheets/bootstrap/_utilities.scss +1 -0
  51. data/assets/stylesheets/bootstrap/_variables.scss +286 -410
  52. data/assets/stylesheets/bootstrap/mixins/_alert.scss +4 -5
  53. data/assets/stylesheets/bootstrap/mixins/_badge.scss +6 -5
  54. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +3 -3
  55. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +5 -0
  56. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +23 -13
  57. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -14
  58. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +1 -1
  59. data/assets/stylesheets/bootstrap/mixins/_forms.scss +57 -55
  60. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +1 -1
  61. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +9 -18
  62. data/assets/stylesheets/bootstrap/mixins/_grid.scss +12 -65
  63. data/assets/stylesheets/bootstrap/mixins/_hover.scss +6 -6
  64. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -4
  65. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +3 -3
  66. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -0
  67. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +4 -3
  68. data/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  69. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +5 -2
  70. data/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +1 -1
  71. data/assets/stylesheets/bootstrap/mixins/_transition.scss +9 -0
  72. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +2 -2
  73. data/assets/stylesheets/bootstrap/utilities/_background.scss +4 -17
  74. data/assets/stylesheets/bootstrap/utilities/_borders.scss +20 -5
  75. data/assets/stylesheets/bootstrap/utilities/_display.scss +36 -1
  76. data/assets/stylesheets/bootstrap/{_responsive-embed.scss → utilities/_embed.scss} +0 -0
  77. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -4
  78. data/assets/stylesheets/bootstrap/utilities/_position.scss +5 -3
  79. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +10 -12
  80. data/assets/stylesheets/bootstrap/utilities/_text.scss +5 -17
  81. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -48
  82. data/bootstrap.gemspec +2 -0
  83. data/lib/bootstrap.rb +2 -0
  84. data/lib/bootstrap/version.rb +2 -2
  85. data/tasks/updater/js.rb +7 -9
  86. data/tasks/updater/scss.rb +1 -4
  87. data/templates/project/_bootstrap-variables.scss +289 -396
  88. data/test/dummy_rails/app/assets/javascripts/application.js +1 -1
  89. data/test/dummy_rails/config/application.rb +0 -1
  90. data/test/gemfiles/rails_4_2.gemfile +0 -4
  91. data/test/gemfiles/rails_5_0.gemfile +0 -4
  92. data/test/gemfiles/rails_5_1.gemfile +8 -0
  93. metadata +23 -8
  94. data/assets/stylesheets/bootstrap/_custom.scss +0 -4
  95. data/assets/stylesheets/bootstrap/_normalize.scss +0 -461
  96. data/assets/stylesheets/bootstrap/mixins/_cards.scss +0 -47
  97. data/assets/stylesheets/bootstrap/mixins/_transforms.scss +0 -14
@@ -8,16 +8,18 @@
8
8
  // }
9
9
  // }
10
10
  // @else {
11
+ // scss-lint:disable Indentation
11
12
  &:hover { @content }
13
+ // scss-lint:enable Indentation
12
14
  // }
13
15
  }
14
16
 
17
+
15
18
  @mixin hover-focus {
16
19
  @if $enable-hover-media-query {
17
20
  &:focus { @content }
18
21
  @include hover { @content }
19
- }
20
- @else {
22
+ } @else {
21
23
  &:focus,
22
24
  &:hover {
23
25
  @content
@@ -32,8 +34,7 @@
32
34
  @content
33
35
  }
34
36
  @include hover { @content }
35
- }
36
- @else {
37
+ } @else {
37
38
  &,
38
39
  &:focus,
39
40
  &:hover {
@@ -49,8 +50,7 @@
49
50
  @content
50
51
  }
51
52
  @include hover { @content }
52
- }
53
- @else {
53
+ } @else {
54
54
  &:focus,
55
55
  &:active,
56
56
  &:hover {
@@ -6,14 +6,11 @@
6
6
  background-color: $background;
7
7
  }
8
8
 
9
+ //scss-lint:disable QualifyingElement
9
10
  a.list-group-item-#{$state},
10
11
  button.list-group-item-#{$state} {
11
12
  color: $color;
12
13
 
13
- .list-group-item-heading {
14
- color: inherit;
15
- }
16
-
17
14
  @include hover-focus {
18
15
  color: $color;
19
16
  background-color: darken($background, 5%);
@@ -25,4 +22,5 @@
25
22
  border-color: $color;
26
23
  }
27
24
  }
25
+ // scss-lint:enable QualifyingElement
28
26
  }
@@ -3,8 +3,8 @@
3
3
  // Dividers (basically an hr) within dropdowns and nav lists
4
4
 
5
5
  @mixin nav-divider($color: #e5e5e5) {
6
- height: 1px;
7
- margin: ($spacer-y / 2) 0;
6
+ height: 0;
7
+ margin: ($spacer / 2) 0;
8
8
  overflow: hidden;
9
- background-color: $color;
9
+ border-top: 1px solid $color;
10
10
  }
@@ -4,6 +4,7 @@
4
4
  .page-link {
5
5
  padding: $padding-y $padding-x;
6
6
  font-size: $font-size;
7
+ line-height: $line-height;
7
8
  }
8
9
 
9
10
  .page-item {
@@ -1,17 +1,18 @@
1
+ // scss-lint:disable DuplicateProperty
1
2
  @mixin reset-text {
2
3
  font-family: $font-family-base;
3
4
  // We deliberately do NOT reset font-size or word-wrap.
4
5
  font-style: normal;
5
6
  font-weight: $font-weight-normal;
6
- letter-spacing: normal;
7
- line-break: auto;
8
7
  line-height: $line-height-base;
9
8
  text-align: left; // Fallback for where `start` is not supported
10
9
  text-align: start;
11
10
  text-decoration: none;
12
11
  text-shadow: none;
13
12
  text-transform: none;
14
- white-space: normal;
13
+ letter-spacing: normal;
15
14
  word-break: normal;
16
15
  word-spacing: normal;
16
+ white-space: normal;
17
+ line-break: auto;
17
18
  }
@@ -1,6 +1,6 @@
1
1
  // Resize anything
2
2
 
3
3
  @mixin resizable($direction) {
4
- resize: $direction; // Options: horizontal, vertical, both
5
4
  overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
5
+ resize: $direction; // Options: horizontal, vertical, both
6
6
  }
@@ -1,15 +1,17 @@
1
1
  // Only display content to screen readers
2
2
  //
3
3
  // See: http://a11yproject.com/posts/how-to-hide-content
4
+ // See: http://hugogiraudel.com/2016/10/13/css-hide-and-seek/
4
5
 
5
6
  @mixin sr-only {
6
7
  position: absolute;
7
8
  width: 1px;
8
9
  height: 1px;
9
10
  padding: 0;
10
- margin: -1px;
11
11
  overflow: hidden;
12
12
  clip: rect(0,0,0,0);
13
+ white-space: nowrap;
14
+ clip-path: inset(50%);
13
15
  border: 0;
14
16
  }
15
17
 
@@ -25,8 +27,9 @@
25
27
  position: static;
26
28
  width: auto;
27
29
  height: auto;
28
- margin: 0;
29
30
  overflow: visible;
30
31
  clip: auto;
32
+ white-space: normal;
33
+ clip-path: none;
31
34
  }
32
35
  }
@@ -5,4 +5,4 @@
5
5
  overflow: hidden;
6
6
  text-overflow: ellipsis;
7
7
  white-space: nowrap;
8
- }
8
+ }
@@ -0,0 +1,9 @@
1
+ @mixin transition($transition...) {
2
+ @if $enable-transitions {
3
+ @if length($transition) == 0 {
4
+ transition: $transition-base;
5
+ } @else {
6
+ transition: $transition;
7
+ }
8
+ }
9
+ }
@@ -1,5 +1,5 @@
1
1
  // Visibility
2
2
 
3
- @mixin invisible {
4
- visibility: hidden !important;
3
+ @mixin invisible($visibility) {
4
+ visibility: $visibility !important;
5
5
  }
@@ -1,19 +1,6 @@
1
- //
2
- // Contextual backgrounds
3
- //
4
-
5
- .bg-faded {
6
- background-color: darken($body-bg, 3%);
1
+ @each $color, $value in $theme-colors {
2
+ @include bg-variant('.bg-#{$color}', $value);
7
3
  }
8
4
 
9
- @include bg-variant('.bg-primary', $brand-primary);
10
-
11
- @include bg-variant('.bg-success', $brand-success);
12
-
13
- @include bg-variant('.bg-info', $brand-info);
14
-
15
- @include bg-variant('.bg-warning', $brand-warning);
16
-
17
- @include bg-variant('.bg-danger', $brand-danger);
18
-
19
- @include bg-variant('.bg-inverse', $brand-inverse);
5
+ .bg-white { background-color: $white !important; }
6
+ .bg-transparent { background-color: transparent !important; }
@@ -2,30 +2,45 @@
2
2
  // Border
3
3
  //
4
4
 
5
+ .border { border: 1px solid $gray-200 !important; }
5
6
  .border-0 { border: 0 !important; }
6
7
  .border-top-0 { border-top: 0 !important; }
7
8
  .border-right-0 { border-right: 0 !important; }
8
9
  .border-bottom-0 { border-bottom: 0 !important; }
9
10
  .border-left-0 { border-left: 0 !important; }
10
11
 
12
+ @each $color, $value in $theme-colors {
13
+ .border-#{$color} {
14
+ border-color: $value !important;
15
+ }
16
+ }
17
+
18
+ .border-white {
19
+ border-color: $white !important;
20
+ }
21
+
11
22
  //
12
23
  // Border-radius
13
24
  //
14
25
 
15
26
  .rounded {
16
- @include border-radius($border-radius);
27
+ border-radius: $border-radius !important;
17
28
  }
18
29
  .rounded-top {
19
- @include border-top-radius($border-radius);
30
+ border-top-left-radius: $border-radius !important;
31
+ border-top-right-radius: $border-radius !important;
20
32
  }
21
33
  .rounded-right {
22
- @include border-right-radius($border-radius);
34
+ border-top-right-radius: $border-radius !important;
35
+ border-bottom-right-radius: $border-radius !important;
23
36
  }
24
37
  .rounded-bottom {
25
- @include border-bottom-radius($border-radius);
38
+ border-bottom-right-radius: $border-radius !important;
39
+ border-bottom-left-radius: $border-radius !important;
26
40
  }
27
41
  .rounded-left {
28
- @include border-left-radius($border-radius);
42
+ border-top-left-radius: $border-radius !important;
43
+ border-bottom-left-radius: $border-radius !important;
29
44
  }
30
45
 
31
46
  .rounded-circle {
@@ -1,5 +1,5 @@
1
1
  //
2
- // Display utilities
2
+ // Utilities for common `display` values
3
3
  //
4
4
 
5
5
  @each $breakpoint in map-keys($grid-breakpoints) {
@@ -16,3 +16,38 @@
16
16
  .d#{$infix}-inline-flex { display: inline-flex !important; }
17
17
  }
18
18
  }
19
+
20
+
21
+ //
22
+ // Utilities for toggling `display` in print
23
+ //
24
+
25
+ .d-print-block {
26
+ display: none !important;
27
+
28
+ @media print {
29
+ display: block !important;
30
+ }
31
+ }
32
+
33
+ .d-print-inline {
34
+ display: none !important;
35
+
36
+ @media print {
37
+ display: inline !important;
38
+ }
39
+ }
40
+
41
+ .d-print-inline-block {
42
+ display: none !important;
43
+
44
+ @media print {
45
+ display: inline-block !important;
46
+ }
47
+ }
48
+
49
+ .d-print-none {
50
+ @media print {
51
+ display: none !important;
52
+ }
53
+ }
@@ -6,10 +6,6 @@
6
6
  @include media-breakpoint-up($breakpoint) {
7
7
  $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
8
8
 
9
- .flex#{$infix}-first { order: -1; }
10
- .flex#{$infix}-last { order: 1; }
11
- .flex#{$infix}-unordered { order: 0; }
12
-
13
9
  .flex#{$infix}-row { flex-direction: row !important; }
14
10
  .flex#{$infix}-column { flex-direction: column !important; }
15
11
  .flex#{$infix}-row-reverse { flex-direction: row-reverse !important; }
@@ -17,7 +17,9 @@
17
17
  }
18
18
 
19
19
  .sticky-top {
20
- position: sticky;
21
- top: 0;
22
- z-index: $zindex-sticky;
20
+ @supports (position: sticky) {
21
+ position: sticky;
22
+ top: 0;
23
+ z-index: $zindex-sticky;
24
+ }
23
25
  }
@@ -5,22 +5,20 @@
5
5
  $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
6
6
 
7
7
  @each $prop, $abbrev in (margin: m, padding: p) {
8
- @each $size, $lengths in $spacers {
9
- $length-x: map-get($lengths, x);
10
- $length-y: map-get($lengths, y);
8
+ @each $size, $length in $spacers {
11
9
 
12
- .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length-y $length-x !important; }
13
- .#{$abbrev}t#{$infix}-#{$size} { #{$prop}-top: $length-y !important; }
14
- .#{$abbrev}r#{$infix}-#{$size} { #{$prop}-right: $length-x !important; }
15
- .#{$abbrev}b#{$infix}-#{$size} { #{$prop}-bottom: $length-y !important; }
16
- .#{$abbrev}l#{$infix}-#{$size} { #{$prop}-left: $length-x !important; }
10
+ .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
11
+ .#{$abbrev}t#{$infix}-#{$size} { #{$prop}-top: $length !important; }
12
+ .#{$abbrev}r#{$infix}-#{$size} { #{$prop}-right: $length !important; }
13
+ .#{$abbrev}b#{$infix}-#{$size} { #{$prop}-bottom: $length !important; }
14
+ .#{$abbrev}l#{$infix}-#{$size} { #{$prop}-left: $length !important; }
17
15
  .#{$abbrev}x#{$infix}-#{$size} {
18
- #{$prop}-right: $length-x !important;
19
- #{$prop}-left: $length-x !important;
16
+ #{$prop}-right: $length !important;
17
+ #{$prop}-left: $length !important;
20
18
  }
21
19
  .#{$abbrev}y#{$infix}-#{$size} {
22
- #{$prop}-top: $length-y !important;
23
- #{$prop}-bottom: $length-y !important;
20
+ #{$prop}-top: $length !important;
21
+ #{$prop}-bottom: $length !important;
24
22
  }
25
23
  }
26
24
  }
@@ -34,25 +34,13 @@
34
34
 
35
35
  // Contextual colors
36
36
 
37
- .text-white {
38
- color: #fff !important;
39
- }
40
-
41
- @include text-emphasis-variant('.text-muted', $text-muted);
42
-
43
- @include text-emphasis-variant('.text-primary', $brand-primary);
44
-
45
- @include text-emphasis-variant('.text-success', $brand-success);
37
+ .text-white { color: #fff !important; }
46
38
 
47
- @include text-emphasis-variant('.text-info', $brand-info);
48
-
49
- @include text-emphasis-variant('.text-warning', $brand-warning);
50
-
51
- @include text-emphasis-variant('.text-danger', $brand-danger);
52
-
53
- // Font color
39
+ @each $color, $value in $theme-colors {
40
+ @include text-emphasis-variant('.text-#{$color}', $value);
41
+ }
54
42
 
55
- @include text-emphasis-variant('.text-gray-dark', $gray-dark);
43
+ .text-muted { color: $text-muted !important; }
56
44
 
57
45
  // Misc
58
46
 
@@ -2,54 +2,10 @@
2
2
  // Visibility utilities
3
3
  //
4
4
 
5
- .invisible {
6
- @include invisible();
7
- }
8
-
9
- // Responsive visibility utilities
10
-
11
- @each $bp in map-keys($grid-breakpoints) {
12
- .hidden-#{$bp}-up {
13
- @include media-breakpoint-up($bp) {
14
- display: none !important;
15
- }
16
- }
17
- .hidden-#{$bp}-down {
18
- @include media-breakpoint-down($bp) {
19
- display: none !important;
20
- }
21
- }
5
+ .visible {
6
+ @include invisible(visible);
22
7
  }
23
8
 
24
-
25
- // Print utilities
26
- //
27
- // Media queries are placed on the inside to be mixin-friendly.
28
-
29
- .visible-print-block {
30
- display: none !important;
31
-
32
- @media print {
33
- display: block !important;
34
- }
35
- }
36
- .visible-print-inline {
37
- display: none !important;
38
-
39
- @media print {
40
- display: inline !important;
41
- }
42
- }
43
- .visible-print-inline-block {
44
- display: none !important;
45
-
46
- @media print {
47
- display: inline-block !important;
48
- }
49
- }
50
-
51
- .hidden-print {
52
- @media print {
53
- display: none !important;
54
- }
9
+ .invisible {
10
+ @include invisible(hidden);
55
11
  }