bootstrap 4.0.0.alpha3 → 4.0.0.alpha3.1
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.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/CHANGELOG.md +5 -0
- data/LICENSE +1 -1
- data/README.md +3 -3
- data/Rakefile +11 -8
- data/assets/javascripts/bootstrap.js +61 -48
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/javascripts/bootstrap/alert.js +2 -2
- data/assets/javascripts/bootstrap/button.js +4 -2
- data/assets/javascripts/bootstrap/carousel.js +10 -6
- data/assets/javascripts/bootstrap/collapse.js +2 -2
- data/assets/javascripts/bootstrap/dropdown.js +12 -8
- data/assets/javascripts/bootstrap/modal.js +9 -12
- data/assets/javascripts/bootstrap/popover.js +2 -2
- data/assets/javascripts/bootstrap/scrollspy.js +4 -3
- data/assets/javascripts/bootstrap/tab.js +2 -2
- data/assets/javascripts/bootstrap/tooltip.js +2 -2
- data/assets/javascripts/bootstrap/util.js +8 -3
- data/assets/stylesheets/_bootstrap-grid.scss +2 -41
- data/assets/stylesheets/_bootstrap-reboot.scss +1 -0
- data/assets/stylesheets/_bootstrap.scss +5 -7
- data/assets/stylesheets/bootstrap/_alert.scss +1 -10
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +25 -10
- data/assets/stylesheets/bootstrap/_button-group.scss +22 -12
- data/assets/stylesheets/bootstrap/_buttons.scss +14 -11
- data/assets/stylesheets/bootstrap/_card.scss +59 -30
- data/assets/stylesheets/bootstrap/_carousel.scss +25 -24
- data/assets/stylesheets/bootstrap/_close.scss +3 -0
- data/assets/stylesheets/bootstrap/_code.scss +6 -7
- data/assets/stylesheets/bootstrap/_custom-forms.scss +144 -105
- data/assets/stylesheets/bootstrap/_custom.scss +4 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +10 -24
- data/assets/stylesheets/bootstrap/_forms.scss +97 -185
- data/assets/stylesheets/bootstrap/_grid.scss +9 -46
- data/assets/stylesheets/bootstrap/_images.scss +3 -4
- data/assets/stylesheets/bootstrap/_input-group.scss +25 -26
- data/assets/stylesheets/bootstrap/_list-group.scss +33 -50
- data/assets/stylesheets/bootstrap/_media.scss +4 -5
- data/assets/stylesheets/bootstrap/_mixins.scss +1 -2
- data/assets/stylesheets/bootstrap/_modal.scss +13 -27
- data/assets/stylesheets/bootstrap/_nav.scss +18 -23
- data/assets/stylesheets/bootstrap/_navbar.scss +54 -26
- data/assets/stylesheets/bootstrap/_normalize.scss +164 -168
- data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
- data/assets/stylesheets/bootstrap/_popover.scss +12 -5
- data/assets/stylesheets/bootstrap/_print.scss +93 -65
- data/assets/stylesheets/bootstrap/_progress.scss +43 -54
- data/assets/stylesheets/bootstrap/_reboot.scss +59 -13
- data/assets/stylesheets/bootstrap/_tables.scss +32 -27
- data/assets/stylesheets/bootstrap/_tags.scss +77 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +7 -5
- data/assets/stylesheets/bootstrap/_type.scss +22 -29
- data/assets/stylesheets/bootstrap/_utilities.scss +9 -95
- data/assets/stylesheets/bootstrap/_variables.scss +302 -139
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +22 -9
- data/assets/stylesheets/bootstrap/mixins/_cards.scss +8 -2
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +7 -4
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +37 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +18 -9
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +10 -9
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +2 -3
- data/assets/stylesheets/bootstrap/mixins/_progress.scss +5 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -3
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/{_label.scss → _tag.scss} +2 -2
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +1 -1
- data/assets/stylesheets/bootstrap/{_utilities-background.scss → utilities/_background.scss} +1 -4
- data/assets/stylesheets/bootstrap/utilities/_clearfix.scss +3 -0
- data/assets/stylesheets/bootstrap/utilities/_display.scss +13 -0
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +37 -0
- data/assets/stylesheets/bootstrap/utilities/_pulls.scss +13 -0
- data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +11 -0
- data/assets/stylesheets/bootstrap/{_utilities-spacing.scss → utilities/_spacing.scss} +4 -0
- data/assets/stylesheets/bootstrap/utilities/_text.scss +51 -0
- data/assets/stylesheets/bootstrap/{_utilities-responsive.scss → utilities/_visibility.scss} +9 -1
- data/bootstrap.gemspec +1 -1
- data/lib/bootstrap.rb +6 -6
- data/lib/bootstrap/engine.rb +2 -0
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/network.rb +3 -1
- data/templates/project/_bootstrap-variables.scss +303 -140
- data/test/dummy_rails/config/boot.rb +1 -1
- data/test/gemfiles/rails_4_2.gemfile +4 -4
- data/test/gemfiles/rails_5_0.gemfile +12 -0
- data/test/rails_test.rb +1 -1
- data/test/support/dummy_rails_integration.rb +2 -2
- metadata +19 -14
- data/assets/stylesheets/bootstrap/_labels.scss +0 -77
- data/assets/stylesheets/bootstrap/_pager.scss +0 -57
- data/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
- data/test/gemfiles/rails_head.gemfile +0 -20
@@ -10,7 +10,7 @@
|
|
10
10
|
color: $color;
|
11
11
|
background-color: $background;
|
12
12
|
border-color: $border;
|
13
|
-
@include box-shadow(
|
13
|
+
@include box-shadow($btn-box-shadow);
|
14
14
|
|
15
15
|
@include hover {
|
16
16
|
color: $color;
|
@@ -33,7 +33,7 @@
|
|
33
33
|
border-color: $active-border;
|
34
34
|
// Remove the gradient for the pressed/active state
|
35
35
|
background-image: none;
|
36
|
-
@include box-shadow(
|
36
|
+
@include box-shadow($btn-active-box-shadow);
|
37
37
|
|
38
38
|
&:hover,
|
39
39
|
&:focus,
|
@@ -64,19 +64,33 @@
|
|
64
64
|
background-color: transparent;
|
65
65
|
border-color: $color;
|
66
66
|
|
67
|
+
@include hover {
|
68
|
+
color: #fff;
|
69
|
+
background-color: $color;
|
70
|
+
border-color: $color;
|
71
|
+
}
|
72
|
+
|
67
73
|
&:focus,
|
68
|
-
&.focus
|
69
|
-
&:active,
|
70
|
-
&.active,
|
71
|
-
.open > &.dropdown-toggle {
|
74
|
+
&.focus {
|
72
75
|
color: #fff;
|
73
76
|
background-color: $color;
|
74
77
|
border-color: $color;
|
75
78
|
}
|
76
|
-
|
79
|
+
|
80
|
+
&:active,
|
81
|
+
&.active,
|
82
|
+
.open > &.dropdown-toggle {
|
77
83
|
color: #fff;
|
78
84
|
background-color: $color;
|
79
85
|
border-color: $color;
|
86
|
+
|
87
|
+
&:hover,
|
88
|
+
&:focus,
|
89
|
+
&.focus {
|
90
|
+
color: #fff;
|
91
|
+
background-color: darken($color, 17%);
|
92
|
+
border-color: darken($color, 25%);
|
93
|
+
}
|
80
94
|
}
|
81
95
|
|
82
96
|
&.disabled,
|
@@ -92,9 +106,8 @@
|
|
92
106
|
}
|
93
107
|
|
94
108
|
// Button sizes
|
95
|
-
@mixin button-size($padding-y, $padding-x, $font-size, $
|
109
|
+
@mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
|
96
110
|
padding: $padding-y $padding-x;
|
97
111
|
font-size: $font-size;
|
98
|
-
line-height: $line-height;
|
99
112
|
@include border-radius($border-radius);
|
100
113
|
}
|
@@ -3,6 +3,11 @@
|
|
3
3
|
@mixin card-variant($background, $border) {
|
4
4
|
background-color: $background;
|
5
5
|
border-color: $border;
|
6
|
+
|
7
|
+
.card-header,
|
8
|
+
.card-footer {
|
9
|
+
background-color: transparent;
|
10
|
+
}
|
6
11
|
}
|
7
12
|
|
8
13
|
@mixin card-outline-variant($color) {
|
@@ -17,7 +22,7 @@
|
|
17
22
|
@mixin card-inverse {
|
18
23
|
.card-header,
|
19
24
|
.card-footer {
|
20
|
-
border-
|
25
|
+
border-color: rgba(255,255,255,.2);
|
21
26
|
}
|
22
27
|
.card-header,
|
23
28
|
.card-footer,
|
@@ -27,7 +32,8 @@
|
|
27
32
|
}
|
28
33
|
.card-link,
|
29
34
|
.card-text,
|
30
|
-
.card-
|
35
|
+
.card-subtitle,
|
36
|
+
.card-blockquote .blockquote-footer {
|
31
37
|
color: rgba(255,255,255,.65);
|
32
38
|
}
|
33
39
|
.card-link {
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
@mixin form-control-validation($color) {
|
7
7
|
// Color the label and help text
|
8
|
-
.
|
8
|
+
.form-control-feedback,
|
9
9
|
.form-control-label,
|
10
10
|
.radio,
|
11
11
|
.checkbox,
|
@@ -14,7 +14,8 @@
|
|
14
14
|
&.radio label,
|
15
15
|
&.checkbox label,
|
16
16
|
&.radio-inline label,
|
17
|
-
&.checkbox-inline label
|
17
|
+
&.checkbox-inline label,
|
18
|
+
.custom-control {
|
18
19
|
color: $color;
|
19
20
|
}
|
20
21
|
// Set the border and box shadow on specific inputs to match
|
@@ -55,6 +56,8 @@
|
|
55
56
|
// contrast against a dark gray background.
|
56
57
|
@mixin form-control-focus() {
|
57
58
|
&:focus {
|
59
|
+
color: $input-color-focus;
|
60
|
+
background-color: $input-bg-focus;
|
58
61
|
border-color: $input-border-focus;
|
59
62
|
outline: none;
|
60
63
|
$shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $input-box-shadow-focus;
|
@@ -68,10 +71,10 @@
|
|
68
71
|
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
|
69
72
|
// element gets special love because it's special, and that's a fact!
|
70
73
|
|
71
|
-
@mixin input-size($parent, $input-height, $padding-
|
74
|
+
@mixin input-size($parent, $input-height, $padding-y, $padding-x, $font-size, $line-height, $border-radius) {
|
72
75
|
#{$parent} {
|
73
76
|
height: $input-height;
|
74
|
-
padding: $padding-
|
77
|
+
padding: $padding-y $padding-x;
|
75
78
|
font-size: $font-size;
|
76
79
|
line-height: $line-height;
|
77
80
|
@include border-radius($border-radius);
|
@@ -4,7 +4,7 @@
|
|
4
4
|
//
|
5
5
|
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
6
6
|
// Color stops are not available in IE9.
|
7
|
-
@mixin gradient-
|
7
|
+
@mixin gradient-x($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
8
8
|
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
|
9
9
|
background-repeat: repeat-x;
|
10
10
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9
|
@@ -14,7 +14,7 @@
|
|
14
14
|
//
|
15
15
|
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
16
16
|
// Color stops are not available in IE9.
|
17
|
-
@mixin gradient-
|
17
|
+
@mixin gradient-y($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
18
18
|
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
|
19
19
|
background-repeat: repeat-x;
|
20
20
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9
|
@@ -24,12 +24,12 @@
|
|
24
24
|
background-repeat: repeat-x;
|
25
25
|
background-image: linear-gradient($deg, $start-color, $end-color);
|
26
26
|
}
|
27
|
-
@mixin gradient-
|
27
|
+
@mixin gradient-x-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
28
28
|
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
|
29
29
|
background-repeat: no-repeat;
|
30
30
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 gets no color-stop at all for proper fallback
|
31
31
|
}
|
32
|
-
@mixin gradient-
|
32
|
+
@mixin gradient-y-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
33
33
|
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
34
34
|
background-repeat: no-repeat;
|
35
35
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 gets no color-stop at all for proper fallback
|
@@ -4,41 +4,67 @@
|
|
4
4
|
// any value of `$grid-columns`.
|
5
5
|
|
6
6
|
@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
|
7
|
+
|
7
8
|
// Common properties for all breakpoints
|
8
9
|
%grid-column {
|
9
10
|
position: relative;
|
10
11
|
// Prevent columns from collapsing when empty
|
11
12
|
min-height: 1px;
|
12
13
|
// Inner gutter via padding
|
13
|
-
padding-left: ($gutter / 2);
|
14
14
|
padding-right: ($gutter / 2);
|
15
|
+
padding-left: ($gutter / 2);
|
16
|
+
|
17
|
+
@if $enable-flex {
|
18
|
+
width: 100%;
|
19
|
+
}
|
15
20
|
}
|
21
|
+
|
22
|
+
$breakpoint-counter: 0;
|
16
23
|
@each $breakpoint in map-keys($breakpoints) {
|
24
|
+
$breakpoint-counter: ($breakpoint-counter + 1);
|
25
|
+
|
17
26
|
@for $i from 1 through $columns {
|
18
27
|
.col-#{$breakpoint}-#{$i} {
|
19
28
|
@extend %grid-column;
|
20
29
|
}
|
21
30
|
}
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
31
|
+
|
32
|
+
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
33
|
+
// Provide basic `.col-{bp}` classes for equal-width flexbox columns
|
34
|
+
@if $enable-flex {
|
35
|
+
.col-#{$breakpoint} {
|
36
|
+
position: relative;
|
37
|
+
flex-basis: 0;
|
38
|
+
flex-grow: 1;
|
39
|
+
max-width: 100%;
|
40
|
+
min-height: 1px;
|
41
|
+
padding-right: ($grid-gutter-width / 2);
|
42
|
+
padding-left: ($grid-gutter-width / 2);
|
43
|
+
}
|
26
44
|
}
|
45
|
+
|
27
46
|
@for $i from 1 through $columns {
|
28
47
|
.col-#{$breakpoint}-#{$i} {
|
29
|
-
@
|
30
|
-
@extend %grid-column-float-#{$breakpoint};
|
31
|
-
}
|
32
|
-
@include make-col-span($i, $columns);
|
48
|
+
@include make-col($i, $columns, $gutter);
|
33
49
|
}
|
34
50
|
}
|
35
|
-
|
51
|
+
|
52
|
+
@each $modifier in (pull, push) {
|
36
53
|
@for $i from 0 through $columns {
|
37
|
-
|
54
|
+
.#{$modifier}-#{$breakpoint}-#{$i} {
|
38
55
|
@include make-col-modifier($modifier, $i, $columns)
|
39
56
|
}
|
40
57
|
}
|
41
58
|
}
|
59
|
+
|
60
|
+
// `$columns - 1` because offsetting by the width of an entire row isn't possible
|
61
|
+
@for $i from 0 through ($columns - 1) {
|
62
|
+
@if $breakpoint-counter != 1 or $i != 0 { // Avoid emitting useless .offset-xs-0
|
63
|
+
.offset-#{$breakpoint}-#{$i} {
|
64
|
+
@include make-col-modifier(offset, $i, $columns)
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
42
68
|
}
|
43
69
|
}
|
44
70
|
}
|
@@ -14,9 +14,9 @@
|
|
14
14
|
|
15
15
|
|
16
16
|
// For each breakpoint, define the maximum width of the container in a media query
|
17
|
-
@mixin make-container-max-widths($max-widths: $container-max-widths) {
|
17
|
+
@mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
|
18
18
|
@each $breakpoint, $container-max-width in $max-widths {
|
19
|
-
@include media-breakpoint-up($breakpoint) {
|
19
|
+
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
20
20
|
max-width: $container-max-width;
|
21
21
|
}
|
22
22
|
}
|
@@ -33,20 +33,29 @@
|
|
33
33
|
margin-right: ($gutter / -2);
|
34
34
|
}
|
35
35
|
|
36
|
-
@mixin make-col($gutter: $grid-gutter-width) {
|
36
|
+
@mixin make-col-ready($size, $columns: $grid-columns, $gutter: $grid-gutter-width) {
|
37
37
|
position: relative;
|
38
|
-
|
39
|
-
float: left;
|
40
|
-
}
|
41
|
-
min-height: 1px;
|
42
|
-
padding-left: ($gutter / 2);
|
38
|
+
min-height: 1px; // Prevent collapsing
|
43
39
|
padding-right: ($gutter / 2);
|
40
|
+
padding-left: ($gutter / 2);
|
41
|
+
|
42
|
+
// Prevent columns from becoming too narrow when at smaller grid tiers by
|
43
|
+
// always setting `width: 100%;`. This works because we use `flex` values
|
44
|
+
// later on to override this initial width.
|
45
|
+
@if $enable-flex {
|
46
|
+
width: 100%;
|
47
|
+
}
|
44
48
|
}
|
45
49
|
|
46
|
-
@mixin make-col
|
50
|
+
@mixin make-col($size, $columns: $grid-columns, $gutter: $grid-gutter-width) {
|
47
51
|
@if $enable-flex {
|
48
52
|
flex: 0 0 percentage($size / $columns);
|
53
|
+
// Add a `max-width` to ensure content within each column does not blow out
|
54
|
+
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
|
55
|
+
// do not appear to require this.
|
56
|
+
max-width: percentage($size / $columns);
|
49
57
|
} @else {
|
58
|
+
float: left;
|
50
59
|
width: percentage($size / $columns);
|
51
60
|
}
|
52
61
|
}
|
@@ -1,14 +1,15 @@
|
|
1
1
|
@mixin hover {
|
2
|
-
|
3
|
-
|
4
|
-
//
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
// TODO: re-enable along with mq4-hover-shim
|
3
|
+
// @if $enable-hover-media-query {
|
4
|
+
// // See Media Queries Level 4: http://drafts.csswg.org/mediaqueries/#hover
|
5
|
+
// // Currently shimmed by https://github.com/twbs/mq4-hover-shim
|
6
|
+
// @media (hover: hover) {
|
7
|
+
// &:hover { @content }
|
8
|
+
// }
|
9
|
+
// }
|
10
|
+
// @else {
|
10
11
|
&:hover { @content }
|
11
|
-
}
|
12
|
+
// }
|
12
13
|
}
|
13
14
|
|
14
15
|
@mixin hover-focus {
|
@@ -1,10 +1,9 @@
|
|
1
1
|
// Pagination
|
2
2
|
|
3
|
-
@mixin pagination-size($padding-
|
3
|
+
@mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
|
4
4
|
.page-link {
|
5
|
-
padding: $padding-
|
5
|
+
padding: $padding-y $padding-x;
|
6
6
|
font-size: $font-size;
|
7
|
-
line-height: $line-height;
|
8
7
|
}
|
9
8
|
|
10
9
|
.page-item {
|
@@ -1,11 +1,11 @@
|
|
1
1
|
@mixin reset-text {
|
2
2
|
font-family: $font-family-base;
|
3
|
-
// We deliberately do NOT reset font-size.
|
3
|
+
// We deliberately do NOT reset font-size or word-wrap.
|
4
4
|
font-style: normal;
|
5
5
|
font-weight: normal;
|
6
6
|
letter-spacing: normal;
|
7
7
|
line-break: auto;
|
8
|
-
line-height: $line-height;
|
8
|
+
line-height: $line-height-base;
|
9
9
|
text-align: left; // Fallback for where `start` is not supported
|
10
10
|
text-align: start;
|
11
11
|
text-decoration: none;
|
@@ -14,5 +14,4 @@
|
|
14
14
|
white-space: normal;
|
15
15
|
word-break: normal;
|
16
16
|
word-spacing: normal;
|
17
|
-
word-wrap: normal;
|
18
17
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
// WebKit-style focus
|
2
2
|
|
3
3
|
@mixin tab-focus() {
|
4
|
-
//
|
5
|
-
outline:
|
6
|
-
//
|
4
|
+
// WebKit-specific. Other browsers will keep their default outline style.
|
5
|
+
// (Initially tried to also force default via `outline: initial`,
|
6
|
+
// but that seems to erroneously remove the outline in Firefox altogether.)
|
7
7
|
outline: 5px auto -webkit-focus-ring-color;
|
8
8
|
outline-offset: -2px;
|
9
9
|
}
|