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
@@ -102,12 +102,12 @@
|
|
102
102
|
|
103
103
|
// Set gradients for backgrounds
|
104
104
|
&.left {
|
105
|
-
@include gradient-
|
105
|
+
@include gradient-x($start-color: rgba(0,0,0,.5), $end-color: rgba(0,0,0,.0001));
|
106
106
|
}
|
107
107
|
&.right {
|
108
108
|
right: 0;
|
109
109
|
left: auto;
|
110
|
-
@include gradient-
|
110
|
+
@include gradient-x($start-color: rgba(0,0,0,.0001), $end-color: rgba(0,0,0,.5));
|
111
111
|
}
|
112
112
|
|
113
113
|
// Hover/focus state
|
@@ -125,19 +125,19 @@
|
|
125
125
|
top: 50%;
|
126
126
|
z-index: 5;
|
127
127
|
display: inline-block;
|
128
|
-
width:
|
129
|
-
height:
|
130
|
-
margin-top: -
|
128
|
+
width: $carousel-icon-width;
|
129
|
+
height: $carousel-icon-width;
|
130
|
+
margin-top: -($carousel-icon-width / 2);
|
131
131
|
font-family: serif;
|
132
132
|
line-height: 1;
|
133
133
|
}
|
134
134
|
.icon-prev {
|
135
135
|
left: 50%;
|
136
|
-
margin-left: -
|
136
|
+
margin-left: -($carousel-icon-width / 2);
|
137
137
|
}
|
138
138
|
.icon-next {
|
139
139
|
right: 50%;
|
140
|
-
margin-right: -
|
140
|
+
margin-right: -($carousel-icon-width / 2);
|
141
141
|
}
|
142
142
|
|
143
143
|
.icon-prev {
|
@@ -163,16 +163,16 @@
|
|
163
163
|
bottom: 10px;
|
164
164
|
left: 50%;
|
165
165
|
z-index: 15;
|
166
|
-
width:
|
166
|
+
width: $carousel-indicators-width;
|
167
167
|
padding-left: 0;
|
168
|
-
margin-left: -
|
168
|
+
margin-left: -($carousel-indicators-width / 2);
|
169
169
|
text-align: center;
|
170
170
|
list-style: none;
|
171
171
|
|
172
172
|
li {
|
173
173
|
display: inline-block;
|
174
|
-
width:
|
175
|
-
height:
|
174
|
+
width: $carousel-indicator-size;
|
175
|
+
height: $carousel-indicator-size;
|
176
176
|
margin: 1px;
|
177
177
|
text-indent: -999px;
|
178
178
|
cursor: pointer;
|
@@ -183,11 +183,12 @@
|
|
183
183
|
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer
|
184
184
|
background-color: rgba(0,0,0,0); // IE9
|
185
185
|
border: 1px solid $carousel-indicator-border-color;
|
186
|
-
border-radius:
|
186
|
+
border-radius: $carousel-indicator-size;
|
187
187
|
}
|
188
|
+
|
188
189
|
.active {
|
189
|
-
width:
|
190
|
-
height:
|
190
|
+
width: $carousel-indicator-active-size;
|
191
|
+
height: $carousel-indicator-active-size;
|
191
192
|
margin: 0;
|
192
193
|
background-color: $carousel-indicator-active-bg;
|
193
194
|
}
|
@@ -200,9 +201,9 @@
|
|
200
201
|
|
201
202
|
.carousel-caption {
|
202
203
|
position: absolute;
|
203
|
-
right:
|
204
|
+
right: ((100% - $carousel-caption-width) / 2);
|
204
205
|
bottom: 20px;
|
205
|
-
left:
|
206
|
+
left: ((100% - $carousel-caption-width) / 2);
|
206
207
|
z-index: 10;
|
207
208
|
padding-top: 20px;
|
208
209
|
padding-bottom: 20px;
|
@@ -225,23 +226,23 @@
|
|
225
226
|
.carousel-control {
|
226
227
|
.icon-prev,
|
227
228
|
.icon-next {
|
228
|
-
width:
|
229
|
-
height:
|
230
|
-
margin-top: -
|
231
|
-
font-size:
|
229
|
+
width: $carousel-control-sm-up-size;
|
230
|
+
height: $carousel-control-sm-up-size;
|
231
|
+
margin-top: -($carousel-control-sm-up-size / 2);
|
232
|
+
font-size: $carousel-control-sm-up-size;
|
232
233
|
}
|
233
234
|
.icon-prev {
|
234
|
-
margin-left: -
|
235
|
+
margin-left: -($carousel-control-sm-up-size / 2);
|
235
236
|
}
|
236
237
|
.icon-next {
|
237
|
-
margin-right: -
|
238
|
+
margin-right: -($carousel-control-sm-up-size / 2);
|
238
239
|
}
|
239
240
|
}
|
240
241
|
|
241
242
|
// Show and left align the captions
|
242
243
|
.carousel-caption {
|
243
|
-
right:
|
244
|
-
left:
|
244
|
+
right: ((100% - $carousel-caption-sm-up-width) / 2);
|
245
|
+
left: ((100% - $carousel-caption-sm-up-width) / 2);
|
245
246
|
padding-bottom: 30px;
|
246
247
|
}
|
247
248
|
|
@@ -19,6 +19,8 @@
|
|
19
19
|
// iOS requires the button element instead of an anchor tag.
|
20
20
|
// If you want the anchor version, it requires `href="#"`.
|
21
21
|
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
22
|
+
|
23
|
+
// scss-lint:disable QualifyingElement
|
22
24
|
button.close {
|
23
25
|
padding: 0;
|
24
26
|
cursor: pointer;
|
@@ -26,3 +28,4 @@ button.close {
|
|
26
28
|
border: 0;
|
27
29
|
-webkit-appearance: none;
|
28
30
|
}
|
31
|
+
// scss-lint:enable QualifyingElement
|
@@ -8,8 +8,8 @@ samp {
|
|
8
8
|
|
9
9
|
// Inline code
|
10
10
|
code {
|
11
|
-
padding:
|
12
|
-
font-size:
|
11
|
+
padding: $code-padding-y $code-padding-x;
|
12
|
+
font-size: $code-font-size;
|
13
13
|
color: $code-color;
|
14
14
|
background-color: $code-bg;
|
15
15
|
@include border-radius($border-radius);
|
@@ -17,12 +17,12 @@ code {
|
|
17
17
|
|
18
18
|
// User input typically entered via keyboard
|
19
19
|
kbd {
|
20
|
-
padding:
|
21
|
-
font-size:
|
20
|
+
padding: $code-padding-y $code-padding-x;
|
21
|
+
font-size: $code-font-size;
|
22
22
|
color: $kbd-color;
|
23
23
|
background-color: $kbd-bg;
|
24
24
|
@include border-radius($border-radius-sm);
|
25
|
-
@include box-shadow(
|
25
|
+
@include box-shadow($kbd-box-shadow);
|
26
26
|
|
27
27
|
kbd {
|
28
28
|
padding: 0;
|
@@ -37,8 +37,7 @@ pre {
|
|
37
37
|
display: block;
|
38
38
|
margin-top: 0;
|
39
39
|
margin-bottom: 1rem;
|
40
|
-
font-size:
|
41
|
-
line-height: $line-height;
|
40
|
+
font-size: $code-font-size;
|
42
41
|
color: $pre-color;
|
43
42
|
|
44
43
|
// Account for some code outputs that place code tags in pre tags
|
@@ -1,3 +1,5 @@
|
|
1
|
+
// scss-lint:disable PropertyCount
|
2
|
+
|
1
3
|
// Embedded icons from Open Iconic.
|
2
4
|
// Released under MIT and copyright 2014 Waybury.
|
3
5
|
// http://useiconic.com/open
|
@@ -7,38 +9,49 @@
|
|
7
9
|
//
|
8
10
|
// Base class takes care of all the key behavioral aspects.
|
9
11
|
|
10
|
-
.
|
12
|
+
.custom-control {
|
11
13
|
position: relative;
|
12
14
|
display: inline;
|
13
|
-
padding-left:
|
14
|
-
color: #555;
|
15
|
+
padding-left: $custom-control-gutter;
|
15
16
|
cursor: pointer;
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
+ .custom-control {
|
19
|
+
margin-left: $custom-control-spacer-x;
|
20
|
+
}
|
21
|
+
}
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
}
|
23
|
+
.custom-control-input {
|
24
|
+
position: absolute;
|
25
|
+
z-index: -1; // Put the input behind the label so it doesn't overlay text
|
26
|
+
opacity: 0;
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
&:checked ~ .custom-control-indicator {
|
29
|
+
color: $custom-control-checked-indicator-color;
|
30
|
+
background-color: $custom-control-checked-indicator-bg;
|
31
|
+
@include box-shadow($custom-control-checked-indicator-box-shadow);
|
32
|
+
}
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
&:focus ~ .custom-control-indicator {
|
35
|
+
// the mixin is not used here to make sure there is feedback
|
36
|
+
box-shadow: $custom-control-focus-indicator-box-shadow;
|
37
|
+
}
|
38
|
+
|
39
|
+
&:active ~ .custom-control-indicator {
|
40
|
+
color: $custom-control-active-indicator-color;
|
41
|
+
background-color: $custom-control-active-indicator-bg;
|
42
|
+
@include box-shadow($custom-control-active-indicator-box-shadow);
|
38
43
|
}
|
39
44
|
|
40
|
-
|
41
|
-
|
45
|
+
&:disabled {
|
46
|
+
~ .custom-control-indicator {
|
47
|
+
cursor: $custom-control-disabled-cursor;
|
48
|
+
background-color: $custom-control-disabled-indicator-bg;
|
49
|
+
}
|
50
|
+
|
51
|
+
~ .custom-control-description {
|
52
|
+
color: $custom-control-disabled-description-color;
|
53
|
+
cursor: $custom-control-disabled-cursor;
|
54
|
+
}
|
42
55
|
}
|
43
56
|
}
|
44
57
|
|
@@ -46,42 +59,39 @@
|
|
46
59
|
//
|
47
60
|
// Generates a shadow element to create our makeshift checkbox/radio background.
|
48
61
|
|
49
|
-
.
|
62
|
+
.custom-control-indicator {
|
50
63
|
position: absolute;
|
51
|
-
top:
|
64
|
+
top: .0625rem;
|
52
65
|
left: 0;
|
53
66
|
display: block;
|
54
|
-
width:
|
55
|
-
height:
|
56
|
-
|
57
|
-
line-height: 1rem;
|
58
|
-
color: #eee;
|
59
|
-
text-align: center;
|
67
|
+
width: $custom-control-indicator-size;
|
68
|
+
height: $custom-control-indicator-size;
|
69
|
+
pointer-events: none;
|
60
70
|
user-select: none;
|
61
|
-
background-color:
|
71
|
+
background-color: $custom-control-indicator-bg;
|
62
72
|
background-repeat: no-repeat;
|
63
73
|
background-position: center center;
|
64
|
-
background-size:
|
65
|
-
@include box-shadow(
|
74
|
+
background-size: $custom-control-indicator-bg-size;
|
75
|
+
@include box-shadow($custom-control-indicator-box-shadow);
|
66
76
|
}
|
67
77
|
|
68
78
|
// Checkboxes
|
69
79
|
//
|
70
80
|
// Tweak just a few things for checkboxes.
|
71
81
|
|
72
|
-
.
|
73
|
-
.
|
74
|
-
border-radius
|
82
|
+
.custom-checkbox {
|
83
|
+
.custom-control-indicator {
|
84
|
+
@include border-radius($custom-checkbox-radius);
|
75
85
|
}
|
76
86
|
|
77
|
-
input:checked ~ .
|
78
|
-
background-image:
|
87
|
+
.custom-control-input:checked ~ .custom-control-indicator {
|
88
|
+
background-image: $custom-checkbox-checked-icon;
|
79
89
|
}
|
80
90
|
|
81
|
-
input:indeterminate ~ .
|
82
|
-
background-color:
|
83
|
-
background-image:
|
84
|
-
@include box-shadow(
|
91
|
+
.custom-control-input:indeterminate ~ .custom-control-indicator {
|
92
|
+
background-color: $custom-checkbox-indeterminate-bg;
|
93
|
+
background-image: $custom-checkbox-indeterminate-icon;
|
94
|
+
@include box-shadow($custom-checkbox-indeterminate-box-shadow);
|
85
95
|
}
|
86
96
|
}
|
87
97
|
|
@@ -89,13 +99,13 @@
|
|
89
99
|
//
|
90
100
|
// Tweak just a few things for radios.
|
91
101
|
|
92
|
-
.
|
93
|
-
.
|
94
|
-
border-radius:
|
102
|
+
.custom-radio {
|
103
|
+
.custom-control-indicator {
|
104
|
+
border-radius: $custom-radio-radius;
|
95
105
|
}
|
96
106
|
|
97
|
-
input:checked ~ .
|
98
|
-
background-image:
|
107
|
+
.custom-control-input:checked ~ .custom-control-indicator {
|
108
|
+
background-image: $custom-radio-checked-icon;
|
99
109
|
}
|
100
110
|
}
|
101
111
|
|
@@ -105,17 +115,17 @@
|
|
105
115
|
// By default radios and checkboxes are `inline-block` with no additional spacing
|
106
116
|
// set. Use these optional classes to tweak the layout.
|
107
117
|
|
108
|
-
.
|
109
|
-
.
|
118
|
+
.custom-controls-stacked {
|
119
|
+
.custom-control {
|
110
120
|
display: inline;
|
111
121
|
|
112
122
|
&::after {
|
113
123
|
display: block;
|
114
|
-
margin-bottom:
|
124
|
+
margin-bottom: $custom-control-spacer-y;
|
115
125
|
content: "";
|
116
126
|
}
|
117
127
|
|
118
|
-
+ .
|
128
|
+
+ .custom-control {
|
119
129
|
margin-left: 0;
|
120
130
|
}
|
121
131
|
}
|
@@ -129,25 +139,42 @@
|
|
129
139
|
//
|
130
140
|
// Includes IE9-specific hacks (noted by ` \9`).
|
131
141
|
|
132
|
-
.
|
142
|
+
.custom-select {
|
133
143
|
display: inline-block;
|
134
144
|
max-width: 100%;
|
135
|
-
padding:
|
136
|
-
padding-right:
|
137
|
-
color: $
|
145
|
+
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
|
146
|
+
padding-right: $custom-select-padding-x \9;
|
147
|
+
color: $custom-select-color;
|
138
148
|
vertical-align: middle;
|
139
|
-
background:
|
149
|
+
background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
|
140
150
|
background-image: none \9;
|
141
|
-
background-size:
|
142
|
-
border: $
|
151
|
+
background-size: $custom-select-bg-size;
|
152
|
+
border: $custom-select-border-width solid $custom-select-border-color;
|
153
|
+
@include border-radius($custom-select-border-radius);
|
143
154
|
// Use vendor prefixes as `appearance` isn't part of the CSS spec.
|
144
155
|
-moz-appearance: none;
|
145
156
|
-webkit-appearance: none;
|
146
157
|
|
147
158
|
&:focus {
|
148
|
-
border-color:
|
159
|
+
border-color: $custom-select-focus-border-color;
|
149
160
|
outline: none;
|
150
|
-
@include box-shadow(
|
161
|
+
@include box-shadow($custom-select-focus-box-shadow);
|
162
|
+
|
163
|
+
&::-ms-value {
|
164
|
+
// For visual consistency with other platforms/browsers,
|
165
|
+
// supress the default white text on blue background highlight given to
|
166
|
+
// the selected option text when the (still closed) <select> receives focus
|
167
|
+
// in IE and (under certain conditions) Edge.
|
168
|
+
// See https://github.com/twbs/bootstrap/issues/19398.
|
169
|
+
color: $input-color;
|
170
|
+
background-color: $input-bg;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
&:disabled {
|
175
|
+
color: $custom-select-disabled-color;
|
176
|
+
cursor: $cursor-disabled;
|
177
|
+
background-color: $custom-select-disabled-bg;
|
151
178
|
}
|
152
179
|
|
153
180
|
// Hides the default caret in IE11
|
@@ -156,15 +183,15 @@
|
|
156
183
|
}
|
157
184
|
}
|
158
185
|
|
159
|
-
.
|
160
|
-
padding-top:
|
161
|
-
padding-bottom:
|
162
|
-
font-size:
|
186
|
+
.custom-select-sm {
|
187
|
+
padding-top: $custom-select-padding-y;
|
188
|
+
padding-bottom: $custom-select-padding-y;
|
189
|
+
font-size: $custom-select-sm-font-size;
|
163
190
|
|
164
|
-
&:not([multiple]) {
|
165
|
-
|
166
|
-
|
167
|
-
}
|
191
|
+
// &:not([multiple]) {
|
192
|
+
// height: 26px;
|
193
|
+
// min-height: 26px;
|
194
|
+
// }
|
168
195
|
}
|
169
196
|
|
170
197
|
|
@@ -172,55 +199,67 @@
|
|
172
199
|
//
|
173
200
|
// Custom file input.
|
174
201
|
|
175
|
-
.file {
|
202
|
+
.custom-file {
|
176
203
|
position: relative;
|
177
204
|
display: inline-block;
|
178
|
-
|
205
|
+
max-width: 100%;
|
206
|
+
height: $custom-file-height;
|
179
207
|
cursor: pointer;
|
180
208
|
}
|
181
|
-
|
182
|
-
|
209
|
+
|
210
|
+
.custom-file-input {
|
211
|
+
min-width: $custom-file-width;
|
212
|
+
max-width: 100%;
|
183
213
|
margin: 0;
|
184
214
|
filter: alpha(opacity = 0);
|
185
215
|
opacity: 0;
|
216
|
+
|
217
|
+
&:focus ~ .custom-file-control {
|
218
|
+
@include box-shadow($custom-file-focus-box-shadow);
|
219
|
+
}
|
186
220
|
}
|
187
|
-
|
221
|
+
|
222
|
+
.custom-file-control {
|
188
223
|
position: absolute;
|
189
224
|
top: 0;
|
190
225
|
right: 0;
|
191
226
|
left: 0;
|
192
227
|
z-index: 5;
|
193
|
-
height:
|
194
|
-
padding:
|
195
|
-
line-height:
|
196
|
-
color:
|
228
|
+
height: $custom-file-height;
|
229
|
+
padding: $custom-file-padding-x $custom-file-padding-y;
|
230
|
+
line-height: $custom-file-line-height;
|
231
|
+
color: $custom-file-color;
|
197
232
|
user-select: none;
|
198
|
-
background-color:
|
199
|
-
border: $
|
200
|
-
border-radius
|
201
|
-
@include box-shadow(
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
top: -.075rem;
|
209
|
-
right: -.075rem;
|
210
|
-
bottom: -.075rem;
|
211
|
-
z-index: 6;
|
212
|
-
display: block;
|
213
|
-
height: 2.5rem;
|
214
|
-
padding: .5rem 1rem;
|
215
|
-
line-height: 1.5;
|
216
|
-
color: #555;
|
217
|
-
content: "Browse";
|
218
|
-
background-color: #eee;
|
219
|
-
border: $input-btn-border-width solid #ddd;
|
220
|
-
border-radius: 0 .25rem .25rem 0;
|
221
|
-
}
|
233
|
+
background-color: $custom-file-bg;
|
234
|
+
border: $custom-file-border-width solid $custom-file-border-color;
|
235
|
+
@include border-radius($custom-file-border-radius);
|
236
|
+
@include box-shadow($custom-file-box-shadow);
|
237
|
+
|
238
|
+
@each $lang, $text in map-get($custom-file-text, placeholder) {
|
239
|
+
&:lang(#{$lang})::after {
|
240
|
+
content: $text;
|
241
|
+
}
|
242
|
+
}
|
222
243
|
|
223
|
-
|
224
|
-
|
225
|
-
|
244
|
+
&::before {
|
245
|
+
position: absolute;
|
246
|
+
top: -$custom-file-border-width;
|
247
|
+
right: -$custom-file-border-width;
|
248
|
+
bottom: -$custom-file-border-width;
|
249
|
+
z-index: 6;
|
250
|
+
display: block;
|
251
|
+
height: $custom-file-height;
|
252
|
+
padding: $custom-file-padding-x $custom-file-padding-y;
|
253
|
+
line-height: $custom-file-line-height;
|
254
|
+
color: $custom-file-button-color;
|
255
|
+
background-color: $custom-file-button-bg;
|
256
|
+
border: $custom-file-border-width solid $custom-file-border-color;
|
257
|
+
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
|
258
|
+
}
|
259
|
+
|
260
|
+
@each $lang, $text in map-get($custom-file-text, button-label) {
|
261
|
+
&:lang(#{$lang})::before {
|
262
|
+
content: $text;
|
263
|
+
}
|
264
|
+
}
|
226
265
|
}
|