bootstrap 4.3.1 → 4.5.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +15 -1
- data/CHANGELOG.md +2 -14
- data/README.md +1 -1
- data/assets/javascripts/bootstrap/alert.js +26 -35
- data/assets/javascripts/bootstrap/button.js +93 -52
- data/assets/javascripts/bootstrap/carousel.js +122 -120
- data/assets/javascripts/bootstrap/collapse.js +75 -71
- data/assets/javascripts/bootstrap/dropdown.js +143 -140
- data/assets/javascripts/bootstrap/modal.js +165 -134
- data/assets/javascripts/bootstrap/popover.js +47 -39
- data/assets/javascripts/bootstrap/scrollspy.js +71 -71
- data/assets/javascripts/bootstrap/tab.js +51 -60
- data/assets/javascripts/bootstrap/toast.js +84 -72
- data/assets/javascripts/bootstrap/tooltip.js +141 -131
- data/assets/javascripts/bootstrap/util.js +28 -7
- data/assets/javascripts/bootstrap-sprockets.js +6 -6
- data/assets/javascripts/bootstrap.js +811 -826
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +3 -3
- data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
- data/assets/stylesheets/_bootstrap.scss +3 -3
- data/assets/stylesheets/bootstrap/_badge.scss +1 -1
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +4 -1
- data/assets/stylesheets/bootstrap/_button-group.scss +1 -1
- data/assets/stylesheets/bootstrap/_buttons.scss +13 -8
- data/assets/stylesheets/bootstrap/_card.scss +28 -35
- data/assets/stylesheets/bootstrap/_carousel.scss +6 -6
- data/assets/stylesheets/bootstrap/_close.scss +2 -3
- data/assets/stylesheets/bootstrap/_code.scss +1 -1
- data/assets/stylesheets/bootstrap/_custom-forms.scss +24 -9
- data/assets/stylesheets/bootstrap/_dropdown.scss +5 -4
- data/assets/stylesheets/bootstrap/_forms.scss +26 -9
- data/assets/stylesheets/bootstrap/_functions.scss +60 -5
- data/assets/stylesheets/bootstrap/_grid.scss +33 -8
- data/assets/stylesheets/bootstrap/_images.scss +2 -2
- data/assets/stylesheets/bootstrap/_input-group.scss +1 -2
- data/assets/stylesheets/bootstrap/_list-group.scss +36 -31
- data/assets/stylesheets/bootstrap/_mixins.scss +3 -3
- data/assets/stylesheets/bootstrap/_modal.scss +28 -16
- data/assets/stylesheets/bootstrap/_nav.scss +4 -3
- data/assets/stylesheets/bootstrap/_navbar.scss +45 -15
- data/assets/stylesheets/bootstrap/_pagination.scss +3 -2
- data/assets/stylesheets/bootstrap/_popover.scss +8 -9
- data/assets/stylesheets/bootstrap/_print.scss +2 -2
- data/assets/stylesheets/bootstrap/_progress.scss +6 -2
- data/assets/stylesheets/bootstrap/_reboot.scss +24 -27
- data/assets/stylesheets/bootstrap/_root.scss +1 -0
- data/assets/stylesheets/bootstrap/_spinners.scss +1 -0
- data/assets/stylesheets/bootstrap/_tables.scss +3 -3
- data/assets/stylesheets/bootstrap/_type.scss +2 -2
- data/assets/stylesheets/bootstrap/_utilities.scss +2 -1
- data/assets/stylesheets/bootstrap/_variables.scss +46 -22
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +26 -13
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -8
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +8 -8
- data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +34 -49
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +30 -15
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +17 -7
- data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
- data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_text.scss +3 -4
- data/bootstrap.gemspec +1 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/network.rb +2 -2
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +18 -13
- metadata +11 -5
@@ -10,21 +10,36 @@
|
|
10
10
|
//
|
11
11
|
// Example usage: change the default blue border and shadow to white for better
|
12
12
|
// contrast against a dark gray background.
|
13
|
-
@mixin form-control-focus() {
|
13
|
+
@mixin form-control-focus($ignore-warning: false) {
|
14
14
|
&:focus {
|
15
15
|
color: $input-focus-color;
|
16
16
|
background-color: $input-focus-bg;
|
17
17
|
border-color: $input-focus-border-color;
|
18
18
|
outline: 0;
|
19
|
-
// Avoid using mixin so we can pass custom focus shadow properly
|
20
19
|
@if $enable-shadows {
|
21
|
-
box-shadow
|
20
|
+
@include box-shadow($input-box-shadow, $input-focus-box-shadow);
|
22
21
|
} @else {
|
22
|
+
// Avoid using mixin so we can pass custom focus shadow properly
|
23
23
|
box-shadow: $input-focus-box-shadow;
|
24
24
|
}
|
25
25
|
}
|
26
|
+
@include deprecate("The `form-control-focus()` mixin", "v4.4.0", "v5", $ignore-warning);
|
26
27
|
}
|
27
28
|
|
29
|
+
// This mixin uses an `if()` technique to be compatible with Dart Sass
|
30
|
+
// See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
|
31
|
+
@mixin form-validation-state-selector($state) {
|
32
|
+
@if ($state == "valid" or $state == "invalid") {
|
33
|
+
.was-validated #{if(&, "&", "")}:#{$state},
|
34
|
+
#{if(&, "&", "")}.is-#{$state} {
|
35
|
+
@content;
|
36
|
+
}
|
37
|
+
} @else {
|
38
|
+
#{if(&, "&", "")}.is-#{$state} {
|
39
|
+
@content;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
28
43
|
|
29
44
|
@mixin form-validation-state($state, $color, $icon) {
|
30
45
|
.#{$state}-feedback {
|
@@ -50,16 +65,22 @@
|
|
50
65
|
@include border-radius($form-feedback-tooltip-border-radius);
|
51
66
|
}
|
52
67
|
|
68
|
+
@include form-validation-state-selector($state) {
|
69
|
+
~ .#{$state}-feedback,
|
70
|
+
~ .#{$state}-tooltip {
|
71
|
+
display: block;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
53
75
|
.form-control {
|
54
|
-
|
55
|
-
&.is-#{$state} {
|
76
|
+
@include form-validation-state-selector($state) {
|
56
77
|
border-color: $color;
|
57
78
|
|
58
79
|
@if $enable-validation-icons {
|
59
80
|
padding-right: $input-height-inner;
|
60
|
-
background-image: $icon;
|
81
|
+
background-image: escape-svg($icon);
|
61
82
|
background-repeat: no-repeat;
|
62
|
-
background-position:
|
83
|
+
background-position: right $input-height-inner-quarter center;
|
63
84
|
background-size: $input-height-inner-half $input-height-inner-half;
|
64
85
|
}
|
65
86
|
|
@@ -67,18 +88,12 @@
|
|
67
88
|
border-color: $color;
|
68
89
|
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
69
90
|
}
|
70
|
-
|
71
|
-
~ .#{$state}-feedback,
|
72
|
-
~ .#{$state}-tooltip {
|
73
|
-
display: block;
|
74
|
-
}
|
75
91
|
}
|
76
92
|
}
|
77
93
|
|
78
94
|
// stylelint-disable-next-line selector-no-qualifying-type
|
79
95
|
textarea.form-control {
|
80
|
-
|
81
|
-
&.is-#{$state} {
|
96
|
+
@include form-validation-state-selector($state) {
|
82
97
|
@if $enable-validation-icons {
|
83
98
|
padding-right: $input-height-inner;
|
84
99
|
background-position: top $input-height-inner-quarter right $input-height-inner-quarter;
|
@@ -87,41 +102,23 @@
|
|
87
102
|
}
|
88
103
|
|
89
104
|
.custom-select {
|
90
|
-
|
91
|
-
&.is-#{$state} {
|
105
|
+
@include form-validation-state-selector($state) {
|
92
106
|
border-color: $color;
|
93
107
|
|
94
108
|
@if $enable-validation-icons {
|
95
109
|
padding-right: $custom-select-feedback-icon-padding-right;
|
96
|
-
background: $custom-select-background, $icon $custom-select-bg no-repeat $custom-select-feedback-icon-position / $custom-select-feedback-icon-size;
|
110
|
+
background: $custom-select-background, escape-svg($icon) $custom-select-bg no-repeat $custom-select-feedback-icon-position / $custom-select-feedback-icon-size;
|
97
111
|
}
|
98
112
|
|
99
113
|
&:focus {
|
100
114
|
border-color: $color;
|
101
115
|
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
102
116
|
}
|
103
|
-
|
104
|
-
~ .#{$state}-feedback,
|
105
|
-
~ .#{$state}-tooltip {
|
106
|
-
display: block;
|
107
|
-
}
|
108
|
-
}
|
109
|
-
}
|
110
|
-
|
111
|
-
|
112
|
-
.form-control-file {
|
113
|
-
.was-validated &:#{$state},
|
114
|
-
&.is-#{$state} {
|
115
|
-
~ .#{$state}-feedback,
|
116
|
-
~ .#{$state}-tooltip {
|
117
|
-
display: block;
|
118
|
-
}
|
119
117
|
}
|
120
118
|
}
|
121
119
|
|
122
120
|
.form-check-input {
|
123
|
-
|
124
|
-
&.is-#{$state} {
|
121
|
+
@include form-validation-state-selector($state) {
|
125
122
|
~ .form-check-label {
|
126
123
|
color: $color;
|
127
124
|
}
|
@@ -134,8 +131,7 @@
|
|
134
131
|
}
|
135
132
|
|
136
133
|
.custom-control-input {
|
137
|
-
|
138
|
-
&.is-#{$state} {
|
134
|
+
@include form-validation-state-selector($state) {
|
139
135
|
~ .custom-control-label {
|
140
136
|
color: $color;
|
141
137
|
|
@@ -144,11 +140,6 @@
|
|
144
140
|
}
|
145
141
|
}
|
146
142
|
|
147
|
-
~ .#{$state}-feedback,
|
148
|
-
~ .#{$state}-tooltip {
|
149
|
-
display: block;
|
150
|
-
}
|
151
|
-
|
152
143
|
&:checked {
|
153
144
|
~ .custom-control-label::before {
|
154
145
|
border-color: lighten($color, 10%);
|
@@ -170,17 +161,11 @@
|
|
170
161
|
|
171
162
|
// custom file
|
172
163
|
.custom-file-input {
|
173
|
-
|
174
|
-
&.is-#{$state} {
|
164
|
+
@include form-validation-state-selector($state) {
|
175
165
|
~ .custom-file-label {
|
176
166
|
border-color: $color;
|
177
167
|
}
|
178
168
|
|
179
|
-
~ .#{$state}-feedback,
|
180
|
-
~ .#{$state}-tooltip {
|
181
|
-
display: block;
|
182
|
-
}
|
183
|
-
|
184
169
|
&:focus {
|
185
170
|
~ .custom-file-label {
|
186
171
|
border-color: $color;
|
@@ -15,12 +15,15 @@
|
|
15
15
|
@each $breakpoint in map-keys($breakpoints) {
|
16
16
|
$infix: breakpoint-infix($breakpoint, $breakpoints);
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
@if $columns > 0 {
|
19
|
+
// Allow columns to stretch full width below their breakpoints
|
20
|
+
@for $i from 1 through $columns {
|
21
|
+
.col#{$infix}-#{$i} {
|
22
|
+
@extend %grid-column;
|
23
|
+
}
|
22
24
|
}
|
23
25
|
}
|
26
|
+
|
24
27
|
.col#{$infix},
|
25
28
|
.col#{$infix}-auto {
|
26
29
|
@extend %grid-column;
|
@@ -31,17 +34,27 @@
|
|
31
34
|
.col#{$infix} {
|
32
35
|
flex-basis: 0;
|
33
36
|
flex-grow: 1;
|
37
|
+
min-width: 0; // See https://github.com/twbs/bootstrap/issues/25410
|
34
38
|
max-width: 100%;
|
35
39
|
}
|
40
|
+
|
41
|
+
@if $grid-row-columns > 0 {
|
42
|
+
@for $i from 1 through $grid-row-columns {
|
43
|
+
.row-cols#{$infix}-#{$i} {
|
44
|
+
@include row-cols($i);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
36
49
|
.col#{$infix}-auto {
|
37
|
-
|
38
|
-
width: auto;
|
39
|
-
max-width: 100%; // Reset earlier grid tiers
|
50
|
+
@include make-col-auto();
|
40
51
|
}
|
41
52
|
|
42
|
-
@
|
43
|
-
|
44
|
-
|
53
|
+
@if $columns > 0 {
|
54
|
+
@for $i from 1 through $columns {
|
55
|
+
.col#{$infix}-#{$i} {
|
56
|
+
@include make-col($i, $columns);
|
57
|
+
}
|
45
58
|
}
|
46
59
|
}
|
47
60
|
|
@@ -53,11 +66,13 @@
|
|
53
66
|
.order#{$infix}-#{$i} { order: $i; }
|
54
67
|
}
|
55
68
|
|
56
|
-
|
57
|
-
|
58
|
-
@
|
59
|
-
|
60
|
-
|
69
|
+
@if $columns > 0 {
|
70
|
+
// `$columns - 1` because offsetting by the width of an entire row isn't possible
|
71
|
+
@for $i from 0 through ($columns - 1) {
|
72
|
+
@if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
|
73
|
+
.offset#{$infix}-#{$i} {
|
74
|
+
@include make-col-offset($i, $columns);
|
75
|
+
}
|
61
76
|
}
|
62
77
|
}
|
63
78
|
}
|
@@ -45,7 +45,25 @@
|
|
45
45
|
max-width: percentage($size / $columns);
|
46
46
|
}
|
47
47
|
|
48
|
+
@mixin make-col-auto() {
|
49
|
+
flex: 0 0 auto;
|
50
|
+
width: auto;
|
51
|
+
max-width: 100%; // Reset earlier grid tiers
|
52
|
+
}
|
53
|
+
|
48
54
|
@mixin make-col-offset($size, $columns: $grid-columns) {
|
49
55
|
$num: $size / $columns;
|
50
56
|
margin-left: if($num == 0, 0, percentage($num));
|
51
57
|
}
|
58
|
+
|
59
|
+
// Row columns
|
60
|
+
//
|
61
|
+
// Specify on a parent element(e.g., .row) to force immediate children into NN
|
62
|
+
// numberof columns. Supports wrapping to new lines, but does not do a Masonry
|
63
|
+
// style grid.
|
64
|
+
@mixin row-cols($count) {
|
65
|
+
& > * {
|
66
|
+
flex: 0 0 100% / $count;
|
67
|
+
max-width: 100% / $count;
|
68
|
+
}
|
69
|
+
}
|
@@ -9,18 +9,18 @@
|
|
9
9
|
//
|
10
10
|
// Issue: https://github.com/twbs/bootstrap/issues/25195
|
11
11
|
|
12
|
-
@mixin hover {
|
12
|
+
@mixin hover() {
|
13
13
|
&:hover { @content; }
|
14
14
|
}
|
15
15
|
|
16
|
-
@mixin hover-focus {
|
16
|
+
@mixin hover-focus() {
|
17
17
|
&:hover,
|
18
18
|
&:focus {
|
19
19
|
@content;
|
20
20
|
}
|
21
21
|
}
|
22
22
|
|
23
|
-
@mixin plain-hover-focus {
|
23
|
+
@mixin plain-hover-focus() {
|
24
24
|
&,
|
25
25
|
&:hover,
|
26
26
|
&:focus {
|
@@ -28,7 +28,7 @@
|
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
31
|
-
@mixin hover-focus-active {
|
31
|
+
@mixin hover-focus-active() {
|
32
32
|
&:hover,
|
33
33
|
&:focus,
|
34
34
|
&:active {
|
@@ -7,7 +7,7 @@
|
|
7
7
|
//
|
8
8
|
// Keep images from scaling beyond the width of their parents.
|
9
9
|
|
10
|
-
@mixin img-fluid {
|
10
|
+
@mixin img-fluid() {
|
11
11
|
// Part 1: Set a maximum relative to the parent
|
12
12
|
max-width: 100%;
|
13
13
|
// Part 2: Override the height to auto, otherwise images will be stretched
|
@@ -2,9 +2,10 @@
|
|
2
2
|
//
|
3
3
|
// Dividers (basically an hr) within dropdowns and nav lists
|
4
4
|
|
5
|
-
@mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y) {
|
5
|
+
@mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y, $ignore-warning: false) {
|
6
6
|
height: 0;
|
7
7
|
margin: $margin-y 0;
|
8
8
|
overflow: hidden;
|
9
9
|
border-top: 1px solid $color;
|
10
|
+
@include deprecate("The `nav-divider()` mixin", "v4.4.0", "v5", $ignore-warning);
|
10
11
|
}
|
@@ -3,11 +3,12 @@
|
|
3
3
|
// See: https://a11yproject.com/posts/how-to-hide-content/
|
4
4
|
// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
|
5
5
|
|
6
|
-
@mixin sr-only {
|
6
|
+
@mixin sr-only() {
|
7
7
|
position: absolute;
|
8
8
|
width: 1px;
|
9
9
|
height: 1px;
|
10
10
|
padding: 0;
|
11
|
+
margin: -1px; // Fix for https://github.com/twbs/bootstrap/issues/25686
|
11
12
|
overflow: hidden;
|
12
13
|
clip: rect(0, 0, 0, 0);
|
13
14
|
white-space: nowrap;
|
@@ -20,7 +21,7 @@
|
|
20
21
|
//
|
21
22
|
// Credit: HTML5 Boilerplate
|
22
23
|
|
23
|
-
@mixin sr-only-focusable {
|
24
|
+
@mixin sr-only-focusable() {
|
24
25
|
&:active,
|
25
26
|
&:focus {
|
26
27
|
position: static;
|
@@ -2,15 +2,16 @@
|
|
2
2
|
|
3
3
|
// Typography
|
4
4
|
|
5
|
-
@mixin text-emphasis-variant($parent, $color) {
|
5
|
+
@mixin text-emphasis-variant($parent, $color, $ignore-warning: false) {
|
6
6
|
#{$parent} {
|
7
7
|
color: $color !important;
|
8
8
|
}
|
9
9
|
@if $emphasized-link-hover-darken-percentage != 0 {
|
10
10
|
a#{$parent} {
|
11
|
-
@include hover-focus {
|
11
|
+
@include hover-focus() {
|
12
12
|
color: darken($color, $emphasized-link-hover-darken-percentage) !important;
|
13
13
|
}
|
14
14
|
}
|
15
15
|
}
|
16
|
+
@include deprecate("`text-emphasis-variant()`", "v4.4.0", "v5", $ignore-warning);
|
16
17
|
}
|
@@ -1,16 +1,26 @@
|
|
1
1
|
// stylelint-disable property-blacklist
|
2
2
|
@mixin transition($transition...) {
|
3
|
+
@if length($transition) == 0 {
|
4
|
+
$transition: $transition-base;
|
5
|
+
}
|
6
|
+
|
7
|
+
@if length($transition) > 1 {
|
8
|
+
@each $value in $transition {
|
9
|
+
@if $value == null or $value == none {
|
10
|
+
@warn "The keyword 'none' or 'null' must be used as a single argument.";
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
3
15
|
@if $enable-transitions {
|
4
|
-
@if
|
5
|
-
transition: $transition-base;
|
6
|
-
} @else {
|
16
|
+
@if nth($transition, 1) != null {
|
7
17
|
transition: $transition;
|
8
18
|
}
|
9
|
-
}
|
10
19
|
|
11
|
-
|
12
|
-
|
13
|
-
|
20
|
+
@if $enable-prefers-reduced-motion-media-query and nth($transition, 1) != null and nth($transition, 1) != none {
|
21
|
+
@media (prefers-reduced-motion: reduce) {
|
22
|
+
transition: none;
|
23
|
+
}
|
14
24
|
}
|
15
25
|
}
|
16
26
|
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
// stylelint-disable declaration-no-important
|
2
2
|
|
3
3
|
@each $color, $value in $theme-colors {
|
4
|
-
@include bg-variant(".bg-#{$color}", $value);
|
4
|
+
@include bg-variant(".bg-#{$color}", $value, true);
|
5
5
|
}
|
6
6
|
|
7
7
|
@if $enable-gradients {
|
8
8
|
@each $color, $value in $theme-colors {
|
9
|
-
@include bg-gradient-variant(".bg-gradient-#{$color}", $value);
|
9
|
+
@include bg-gradient-variant(".bg-gradient-#{$color}", $value, true);
|
10
10
|
}
|
11
11
|
}
|
12
12
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
.text-justify { text-align: justify !important; }
|
12
12
|
.text-wrap { white-space: normal !important; }
|
13
13
|
.text-nowrap { white-space: nowrap !important; }
|
14
|
-
.text-truncate { @include text-truncate; }
|
14
|
+
.text-truncate { @include text-truncate(); }
|
15
15
|
|
16
16
|
// Responsive alignment
|
17
17
|
|
@@ -45,7 +45,7 @@
|
|
45
45
|
.text-white { color: $white !important; }
|
46
46
|
|
47
47
|
@each $color, $value in $theme-colors {
|
48
|
-
@include text-emphasis-variant(".text-#{$color}", $value);
|
48
|
+
@include text-emphasis-variant(".text-#{$color}", $value, true);
|
49
49
|
}
|
50
50
|
|
51
51
|
.text-body { color: $body-color !important; }
|
@@ -63,8 +63,7 @@
|
|
63
63
|
.text-decoration-none { text-decoration: none !important; }
|
64
64
|
|
65
65
|
.text-break {
|
66
|
-
word-
|
67
|
-
overflow-wrap: break-word !important;
|
66
|
+
word-wrap: break-word !important;
|
68
67
|
}
|
69
68
|
|
70
69
|
// Reset
|
data/bootstrap.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_development_dependency 'term-ansicolor'
|
26
26
|
# Integration testing
|
27
27
|
s.add_development_dependency 'capybara', '>= 2.6.0'
|
28
|
-
s.add_development_dependency '
|
28
|
+
s.add_development_dependency 'cuprite'
|
29
29
|
# Dummy Rails app dependencies
|
30
30
|
s.add_development_dependency 'actionpack', '>= 4.1.5'
|
31
31
|
s.add_development_dependency 'activesupport', '>= 4.1.5'
|
data/lib/bootstrap/version.rb
CHANGED
data/tasks/updater/network.rb
CHANGED
@@ -25,7 +25,7 @@ class Updater
|
|
25
25
|
log_http_get_files files, path_url, false
|
26
26
|
files.map do |name|
|
27
27
|
Thread.start {
|
28
|
-
contents[name] = open("#{path_url}/#{name}").read
|
28
|
+
contents[name] = URI.open("#{path_url}/#{name}").read
|
29
29
|
WRITE_FILES_MUTEX.synchronize { write_cached_files path, name => contents[name] }
|
30
30
|
}
|
31
31
|
end.each(&:join)
|
@@ -62,7 +62,7 @@ class Updater
|
|
62
62
|
File.read(cache_path, mode: 'rb')
|
63
63
|
else
|
64
64
|
log_http_get_file url, false
|
65
|
-
content = open(url).read
|
65
|
+
content = URI.open(url).read
|
66
66
|
File.open(cache_path, 'wb') { |f| f.write content }
|
67
67
|
content
|
68
68
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Chrome >= 25
|
@@ -17,7 +17,9 @@ module DummyRailsIntegration
|
|
17
17
|
|
18
18
|
def screenshot!
|
19
19
|
path = "tmp/#{name}.png"
|
20
|
-
|
20
|
+
full_path = File.join(GEM_PATH, path)
|
21
|
+
FileUtils.mkdir_p(File.dirname(full_path))
|
22
|
+
page.driver.render(full_path, full: true)
|
21
23
|
STDERR.puts "Screenshot saved to #{path}"
|
22
24
|
end
|
23
25
|
|
data/test/test_helper.rb
CHANGED
@@ -12,24 +12,29 @@ end
|
|
12
12
|
|
13
13
|
GEM_PATH = File.expand_path('../', File.dirname(__FILE__))
|
14
14
|
|
15
|
-
#= Capybara
|
16
|
-
require 'capybara/
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
15
|
+
#= Capybara
|
16
|
+
require 'capybara/cuprite'
|
17
|
+
|
18
|
+
browser_path = ENV['CHROMIUM_BIN'] || %w[
|
19
|
+
/usr/bin/chromium-browser
|
20
|
+
/snap/bin/chromium
|
21
|
+
/Applications/Chromium.app/Contents/MacOS/Chromium
|
22
|
+
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
|
23
|
+
].find { |path| File.executable?(path) }
|
24
|
+
|
25
|
+
Capybara.register_driver :cuprite do |app|
|
26
|
+
options = {
|
27
|
+
window_size: [1280, 1024]
|
28
|
+
}
|
29
|
+
options[:browser_path] = browser_path if browser_path
|
30
|
+
Capybara::Cuprite::Driver.new(app, options)
|
26
31
|
end
|
27
32
|
|
28
33
|
Capybara.configure do |config|
|
29
34
|
config.server = :webrick
|
30
35
|
config.app_host = 'http://localhost:7000'
|
31
|
-
config.default_driver = :
|
32
|
-
config.javascript_driver = :
|
36
|
+
config.default_driver = :cuprite
|
37
|
+
config.javascript_driver = :cuprite
|
33
38
|
config.server_port = 7000
|
34
39
|
config.default_max_wait_time = 10
|
35
40
|
end
|