materialize-sass 0.97.8 → 1.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitattributes +1 -0
- data/.gitignore +1 -0
- data/README.md +34 -32
- data/Rakefile +38 -21
- data/assets/javascripts/materialize/anime.min.js +417 -0
- data/assets/javascripts/materialize/autocomplete.js +504 -0
- data/assets/javascripts/materialize/buttons.js +409 -0
- data/assets/javascripts/materialize/cards.js +34 -0
- data/assets/javascripts/materialize/carousel.js +797 -0
- data/assets/javascripts/materialize/cash.js +990 -0
- data/assets/javascripts/materialize/characterCounter.js +180 -0
- data/assets/javascripts/materialize/chips.js +564 -0
- data/assets/javascripts/materialize/collapsible.js +337 -0
- data/assets/javascripts/materialize/component.js +57 -0
- data/assets/javascripts/materialize/datepicker.js +935 -0
- data/assets/javascripts/materialize/dropdown.js +659 -0
- data/assets/javascripts/materialize/extras/nouislider.js +2147 -0
- data/assets/javascripts/materialize/extras/nouislider.min.js +1 -0
- data/assets/javascripts/materialize/forms.js +244 -0
- data/assets/javascripts/materialize/global.js +408 -0
- data/assets/javascripts/materialize/materialbox.js +513 -0
- data/assets/javascripts/materialize/modal.js +449 -0
- data/assets/javascripts/materialize/parallax.js +173 -0
- data/assets/javascripts/materialize/pushpin.js +179 -0
- data/assets/javascripts/materialize/range.js +310 -0
- data/assets/javascripts/materialize/scrollspy.js +328 -0
- data/assets/javascripts/materialize/select.js +497 -0
- data/assets/javascripts/materialize/sidenav.js +655 -0
- data/assets/javascripts/materialize/slider.js +424 -0
- data/assets/javascripts/materialize/tabs.js +476 -0
- data/assets/javascripts/materialize/tapTarget.js +364 -0
- data/assets/javascripts/materialize/timepicker.js +647 -0
- data/assets/javascripts/materialize/toasts.js +355 -0
- data/assets/javascripts/materialize/tooltip.js +351 -0
- data/{app/assets → assets}/javascripts/materialize/waves.js +42 -47
- data/{app/assets → assets}/javascripts/materialize-sprockets.js +12 -13
- data/assets/javascripts/materialize.js +12374 -0
- data/assets/stylesheets/materialize/components/_badges.scss +55 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_buttons.scss +99 -58
- data/{app/assets → assets}/stylesheets/materialize/components/_cards.scss +14 -6
- data/{app/assets → assets}/stylesheets/materialize/components/_carousel.scss +12 -7
- data/{app/assets → assets}/stylesheets/materialize/components/_chips.scss +13 -6
- data/{app/assets → assets}/stylesheets/materialize/components/_collapsible.scss +16 -15
- data/assets/stylesheets/materialize/components/_color-classes.scss +32 -0
- data/{app/assets/stylesheets/materialize/components/_color.scss → assets/stylesheets/materialize/components/_color-variables.scss} +2 -44
- data/assets/stylesheets/materialize/components/_datepicker.scss +191 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_dropdown.scss +35 -15
- data/{app/assets → assets}/stylesheets/materialize/components/_global.scss +96 -125
- data/{app/assets → assets}/stylesheets/materialize/components/_grid.scss +45 -36
- data/{app/assets → assets}/stylesheets/materialize/components/_icons-material-design.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_materialbox.scss +13 -12
- data/{app/assets → assets}/stylesheets/materialize/components/_modal.scss +7 -3
- data/{app/assets → assets}/stylesheets/materialize/components/_navbar.scss +29 -11
- data/assets/stylesheets/materialize/components/_normalize.scss +447 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_preloader.scss +2 -2
- data/assets/stylesheets/materialize/components/_pulse.scss +34 -0
- data/{app/assets/stylesheets/materialize/components/_sideNav.scss → assets/stylesheets/materialize/components/_sidenav.scss} +47 -47
- data/{app/assets → assets}/stylesheets/materialize/components/_slider.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_table_of_contents.scss +5 -5
- data/{app/assets → assets}/stylesheets/materialize/components/_tabs.scss +10 -10
- data/assets/stylesheets/materialize/components/_tapTarget.scss +103 -0
- data/assets/stylesheets/materialize/components/_timepicker.scss +183 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_toast.scss +7 -14
- data/{app/assets → assets}/stylesheets/materialize/components/_tooltip.scss +3 -3
- data/assets/stylesheets/materialize/components/_transitions.scss +13 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_typography.scss +8 -9
- data/{app/assets → assets}/stylesheets/materialize/components/_variables.scss +65 -29
- data/assets/stylesheets/materialize/components/_waves.scss +114 -0
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_checkboxes.scss +26 -46
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_file-input.scss +6 -0
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_forms.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_input-fields.scss +131 -63
- data/assets/stylesheets/materialize/components/forms/_radio-buttons.scss +115 -0
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_range.scss +35 -33
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_select.scss +88 -19
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_switches.scss +32 -21
- data/assets/stylesheets/materialize/extras/nouislider.css +406 -0
- data/{app/assets → assets}/stylesheets/materialize.scss +10 -9
- data/lib/materialize-sass/engine.rb +9 -7
- data/lib/materialize-sass/helpers.rb +38 -0
- data/lib/materialize-sass/version.rb +1 -1
- data/lib/materialize-sass.rb +13 -28
- data/materialize-sass.gemspec +5 -5
- metadata +97 -119
- data/app/assets/fonts/roboto/Roboto-Bold.eot +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.eot +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.eot +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.eot +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.eot +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
- data/app/assets/javascripts/materialize/animation.js +0 -9
- data/app/assets/javascripts/materialize/buttons.js +0 -267
- data/app/assets/javascripts/materialize/cards.js +0 -26
- data/app/assets/javascripts/materialize/carousel.js +0 -454
- data/app/assets/javascripts/materialize/character_counter.js +0 -72
- data/app/assets/javascripts/materialize/chips.js +0 -289
- data/app/assets/javascripts/materialize/collapsible.js +0 -160
- data/app/assets/javascripts/materialize/date_picker/picker.date.js +0 -1430
- data/app/assets/javascripts/materialize/date_picker/picker.js +0 -1123
- data/app/assets/javascripts/materialize/dropdown.js +0 -265
- data/app/assets/javascripts/materialize/extras/nouislider.js +0 -1666
- data/app/assets/javascripts/materialize/extras/nouislider.min.js +0 -1
- data/app/assets/javascripts/materialize/forms.js +0 -682
- data/app/assets/javascripts/materialize/global.js +0 -98
- data/app/assets/javascripts/materialize/hammer.min.js +0 -1
- data/app/assets/javascripts/materialize/init.js +0 -174
- data/app/assets/javascripts/materialize/initial.js +0 -11
- data/app/assets/javascripts/materialize/jquery.easing.1.3.js +0 -205
- data/app/assets/javascripts/materialize/jquery.hammer.js +0 -33
- data/app/assets/javascripts/materialize/jquery.timeago.min.js +0 -1
- data/app/assets/javascripts/materialize/materialbox.js +0 -269
- data/app/assets/javascripts/materialize/modal.js +0 -184
- data/app/assets/javascripts/materialize/parallax.js +0 -58
- data/app/assets/javascripts/materialize/prism.js +0 -8
- data/app/assets/javascripts/materialize/pushpin.js +0 -71
- data/app/assets/javascripts/materialize/scrollFire.js +0 -48
- data/app/assets/javascripts/materialize/scrollspy.js +0 -284
- data/app/assets/javascripts/materialize/sideNav.js +0 -370
- data/app/assets/javascripts/materialize/slider.js +0 -321
- data/app/assets/javascripts/materialize/tabs.js +0 -164
- data/app/assets/javascripts/materialize/toasts.js +0 -137
- data/app/assets/javascripts/materialize/tooltip.js +0 -236
- data/app/assets/javascripts/materialize/transitions.js +0 -169
- data/app/assets/javascripts/materialize/velocity.min.js +0 -5
- data/app/assets/javascripts/materialize.js +0 -5
- data/app/assets/stylesheets/materialize/components/_mixins.scss +0 -5
- data/app/assets/stylesheets/materialize/components/_normalize.scss +0 -424
- data/app/assets/stylesheets/materialize/components/_prefixer.scss +0 -384
- data/app/assets/stylesheets/materialize/components/_roboto.scss +0 -49
- data/app/assets/stylesheets/materialize/components/_waves.scss +0 -177
- data/app/assets/stylesheets/materialize/components/date_picker/_default.date.scss +0 -435
- data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +0 -201
- data/app/assets/stylesheets/materialize/components/date_picker/_default.time.scss +0 -125
- data/app/assets/stylesheets/materialize/components/forms/_radio-buttons.scss +0 -117
- data/app/assets/stylesheets/materialize/extras/nouislider.css +0 -259
@@ -3,36 +3,24 @@
|
|
3
3
|
|
4
4
|
/* Style Placeholders */
|
5
5
|
|
6
|
-
|
7
|
-
color: $placeholder-text-color;
|
8
|
-
}
|
9
|
-
|
10
|
-
:-moz-placeholder { /* Firefox 18- */
|
11
|
-
color: $placeholder-text-color;
|
12
|
-
}
|
13
|
-
|
14
|
-
::-moz-placeholder { /* Firefox 19+ */
|
15
|
-
color: $placeholder-text-color;
|
16
|
-
}
|
17
|
-
|
18
|
-
:-ms-input-placeholder {
|
6
|
+
::placeholder {
|
19
7
|
color: $placeholder-text-color;
|
20
8
|
}
|
21
9
|
|
22
10
|
/* Text inputs */
|
23
11
|
|
24
12
|
input:not([type]),
|
25
|
-
input[type=text],
|
26
|
-
input[type=password],
|
27
|
-
input[type=email],
|
28
|
-
input[type=url],
|
29
|
-
input[type=time],
|
30
|
-
input[type=date],
|
31
|
-
input[type=datetime],
|
32
|
-
input[type=datetime-local],
|
33
|
-
input[type=tel],
|
34
|
-
input[type=number],
|
35
|
-
input[type=search],
|
13
|
+
input[type=text]:not(.browser-default),
|
14
|
+
input[type=password]:not(.browser-default),
|
15
|
+
input[type=email]:not(.browser-default),
|
16
|
+
input[type=url]:not(.browser-default),
|
17
|
+
input[type=time]:not(.browser-default),
|
18
|
+
input[type=date]:not(.browser-default),
|
19
|
+
input[type=datetime]:not(.browser-default),
|
20
|
+
input[type=datetime-local]:not(.browser-default),
|
21
|
+
input[type=tel]:not(.browser-default),
|
22
|
+
input[type=number]:not(.browser-default),
|
23
|
+
input[type=search]:not(.browser-default),
|
36
24
|
textarea.materialize-textarea {
|
37
25
|
|
38
26
|
// General Styles
|
@@ -48,7 +36,7 @@ textarea.materialize-textarea {
|
|
48
36
|
padding: $input-padding;
|
49
37
|
box-shadow: none;
|
50
38
|
box-sizing: content-box;
|
51
|
-
transition:
|
39
|
+
transition: box-shadow .3s, border .3s;
|
52
40
|
|
53
41
|
// Disabled input style
|
54
42
|
&:disabled,
|
@@ -74,53 +62,89 @@ textarea.materialize-textarea {
|
|
74
62
|
color: $input-focus-color;
|
75
63
|
}
|
76
64
|
|
65
|
+
// Hide helper text on data message
|
66
|
+
&.valid ~ .helper-text[data-success],
|
67
|
+
&:focus.valid ~ .helper-text[data-success],
|
68
|
+
&.invalid ~ .helper-text[data-error],
|
69
|
+
&:focus.invalid ~ .helper-text[data-error] {
|
70
|
+
@extend %hidden-text;
|
71
|
+
}
|
72
|
+
|
77
73
|
// Valid Input Style
|
78
74
|
&.valid,
|
79
75
|
&:focus.valid {
|
80
|
-
|
81
|
-
box-shadow: 0 1px 0 0 $input-success-color;
|
76
|
+
@extend %valid-input-style;
|
82
77
|
}
|
83
78
|
|
84
79
|
// Custom Success Message
|
85
|
-
&.valid
|
86
|
-
&:focus.valid
|
87
|
-
|
80
|
+
&.valid ~ .helper-text:after,
|
81
|
+
&:focus.valid ~ .helper-text:after {
|
82
|
+
@extend %custom-success-message;
|
83
|
+
}
|
84
|
+
&:focus.valid ~ label {
|
88
85
|
color: $input-success-color;
|
89
|
-
opacity: 1;
|
90
86
|
}
|
91
87
|
|
92
88
|
// Invalid Input Style
|
93
89
|
&.invalid,
|
94
90
|
&:focus.invalid {
|
95
|
-
|
96
|
-
box-shadow: 0 1px 0 0 $input-error-color;
|
91
|
+
@extend %invalid-input-style;
|
97
92
|
}
|
98
93
|
|
99
94
|
// Custom Error message
|
100
|
-
&.invalid
|
101
|
-
&:focus.invalid
|
102
|
-
|
95
|
+
&.invalid ~ .helper-text:after,
|
96
|
+
&:focus.invalid ~ .helper-text:after {
|
97
|
+
@extend %custom-error-message;
|
98
|
+
}
|
99
|
+
&:focus.invalid ~ label {
|
103
100
|
color: $input-error-color;
|
104
|
-
opacity: 1;
|
105
101
|
}
|
106
102
|
|
107
103
|
// Full width label when using validate for error messages
|
108
104
|
&.validate + label {
|
109
105
|
width: 100%;
|
110
|
-
pointer-events: none;
|
111
106
|
}
|
112
107
|
|
113
108
|
// Form Message Shared Styles
|
114
109
|
& + label:after {
|
115
|
-
|
116
|
-
content: "";
|
117
|
-
position: absolute;
|
118
|
-
top: 60px;
|
119
|
-
opacity: 0;
|
120
|
-
transition: .2s opacity ease-out, .2s color ease-out;
|
110
|
+
@extend %input-after-style;
|
121
111
|
}
|
122
112
|
}
|
123
113
|
|
114
|
+
|
115
|
+
/* Validation Sass Placeholders */
|
116
|
+
%valid-input-style {
|
117
|
+
border-bottom: 1px solid $input-success-color;
|
118
|
+
box-shadow: 0 1px 0 0 $input-success-color;
|
119
|
+
}
|
120
|
+
%invalid-input-style {
|
121
|
+
border-bottom: $input-invalid-border;
|
122
|
+
box-shadow: 0 1px 0 0 $input-error-color;
|
123
|
+
}
|
124
|
+
%hidden-text {
|
125
|
+
color: transparent;
|
126
|
+
user-select: none;
|
127
|
+
pointer-events: none;
|
128
|
+
}
|
129
|
+
%custom-success-message {
|
130
|
+
content: attr(data-success);
|
131
|
+
color: $input-success-color;
|
132
|
+
}
|
133
|
+
%custom-error-message {
|
134
|
+
content: attr(data-error);
|
135
|
+
color: $input-error-color;
|
136
|
+
}
|
137
|
+
%input-after-style {
|
138
|
+
display: block;
|
139
|
+
content: "";
|
140
|
+
position: absolute;
|
141
|
+
top: 100%;
|
142
|
+
left: 0;
|
143
|
+
opacity: 0;
|
144
|
+
transition: .2s opacity ease-out, .2s color ease-out;
|
145
|
+
}
|
146
|
+
|
147
|
+
|
124
148
|
// Styling for input field wrapper
|
125
149
|
.input-field {
|
126
150
|
// Inline styles
|
@@ -149,28 +173,56 @@ textarea.materialize-textarea {
|
|
149
173
|
|
150
174
|
position: relative;
|
151
175
|
margin-top: 1rem;
|
176
|
+
margin-bottom: 1rem;
|
152
177
|
|
153
|
-
label {
|
178
|
+
& > label {
|
154
179
|
color: $input-border-color;
|
155
180
|
position: absolute;
|
156
|
-
top: 0
|
181
|
+
top: 0;
|
157
182
|
left: 0;
|
158
183
|
font-size: 1rem;
|
159
184
|
cursor: text;
|
160
|
-
transition: .2s ease-out;
|
185
|
+
transition: transform .2s ease-out, color .2s ease-out;
|
186
|
+
transform-origin: 0% 100%;
|
187
|
+
text-align: initial;
|
188
|
+
transform: translateY(12px);
|
189
|
+
|
190
|
+
&:not(.label-icon).active {
|
191
|
+
transform: translateY(-14px) scale(.8);
|
192
|
+
transform-origin: 0 0;
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
// Autofill + date + time inputs
|
197
|
+
& > input[type]:-webkit-autofill:not(.browser-default):not([type="search"]) + label,
|
198
|
+
& > input[type=date]:not(.browser-default) + label,
|
199
|
+
& > input[type=time]:not(.browser-default) + label {
|
200
|
+
transform: translateY(-14px) scale(.8);
|
201
|
+
transform-origin: 0 0;
|
161
202
|
}
|
162
203
|
|
163
|
-
|
164
|
-
|
165
|
-
|
204
|
+
.helper-text {
|
205
|
+
&::after {
|
206
|
+
opacity: 1;
|
207
|
+
position: absolute;
|
208
|
+
top: 0;
|
209
|
+
left: 0;
|
210
|
+
}
|
211
|
+
|
212
|
+
position: relative;
|
213
|
+
min-height: 18px;
|
214
|
+
display: block;
|
215
|
+
font-size: 12px;
|
216
|
+
color: rgba(0,0,0,.54);
|
166
217
|
}
|
167
218
|
|
168
219
|
// Prefix Icons
|
169
220
|
.prefix {
|
170
221
|
position: absolute;
|
171
222
|
width: $input-height;
|
172
|
-
font-size:
|
223
|
+
font-size: $input-icon-size;
|
173
224
|
transition: color .2s;
|
225
|
+
top: ($input-height - $input-icon-size) / 2;
|
174
226
|
|
175
227
|
&.active { color: $input-focus-color; }
|
176
228
|
}
|
@@ -179,6 +231,7 @@ textarea.materialize-textarea {
|
|
179
231
|
.prefix ~ textarea,
|
180
232
|
.prefix ~ label,
|
181
233
|
.prefix ~ .validate ~ label,
|
234
|
+
.prefix ~ .helper-text,
|
182
235
|
.prefix ~ .autocomplete-content {
|
183
236
|
margin-left: 3rem;
|
184
237
|
width: 92%;
|
@@ -208,10 +261,17 @@ textarea.materialize-textarea {
|
|
208
261
|
.input-field input[type=search] {
|
209
262
|
display: block;
|
210
263
|
line-height: inherit;
|
211
|
-
|
212
|
-
|
264
|
+
transition: .3s background-color;
|
265
|
+
|
266
|
+
.nav-wrapper & {
|
267
|
+
height: inherit;
|
268
|
+
padding-left: 4rem;
|
269
|
+
width: calc(100% - 4rem);
|
270
|
+
border: 0;
|
271
|
+
box-shadow: none;
|
272
|
+
}
|
213
273
|
|
214
|
-
&:focus {
|
274
|
+
&:focus:not(.browser-default) {
|
215
275
|
background-color: $input-background;
|
216
276
|
border: 0;
|
217
277
|
box-shadow: none;
|
@@ -224,7 +284,8 @@ textarea.materialize-textarea {
|
|
224
284
|
}
|
225
285
|
}
|
226
286
|
|
227
|
-
& + label {
|
287
|
+
& + .label-icon {
|
288
|
+
transform: none;
|
228
289
|
left: 1rem;
|
229
290
|
}
|
230
291
|
|
@@ -235,7 +296,7 @@ textarea.materialize-textarea {
|
|
235
296
|
right: 1rem;
|
236
297
|
color: transparent;
|
237
298
|
cursor: pointer;
|
238
|
-
font-size:
|
299
|
+
font-size: $input-icon-size;
|
239
300
|
transition: .3s color;
|
240
301
|
}
|
241
302
|
}
|
@@ -250,30 +311,32 @@ textarea {
|
|
250
311
|
background-color: transparent;
|
251
312
|
|
252
313
|
&.materialize-textarea {
|
314
|
+
line-height: normal;
|
253
315
|
overflow-y: hidden; /* prevents scroll bar flash */
|
254
|
-
padding: .8rem 0
|
316
|
+
padding: .8rem 0 .8rem 0; /* prevents text jump on Enter keypress */
|
255
317
|
resize: none;
|
256
318
|
min-height: $input-height;
|
319
|
+
box-sizing: border-box;
|
257
320
|
}
|
258
321
|
}
|
259
322
|
|
260
323
|
// For textarea autoresize
|
261
324
|
.hiddendiv {
|
262
|
-
|
325
|
+
visibility: hidden;
|
263
326
|
white-space: pre-wrap;
|
264
327
|
word-wrap: break-word;
|
265
328
|
overflow-wrap: break-word; /* future version of deprecated 'word-wrap' */
|
266
329
|
padding-top: 1.2rem; /* prevents text jump on Enter keypress */
|
330
|
+
|
331
|
+
// Reduces repaints
|
332
|
+
position: absolute;
|
333
|
+
top: 0;
|
334
|
+
z-index: -1;
|
267
335
|
}
|
268
336
|
|
269
337
|
|
270
338
|
/* Autocomplete */
|
271
339
|
.autocomplete-content {
|
272
|
-
margin-top: -15px;
|
273
|
-
display: block;
|
274
|
-
opacity: 1;
|
275
|
-
position: static;
|
276
|
-
|
277
340
|
li {
|
278
341
|
.highlight { color: #444; }
|
279
342
|
|
@@ -284,3 +347,8 @@ textarea {
|
|
284
347
|
}
|
285
348
|
}
|
286
349
|
}
|
350
|
+
|
351
|
+
/* Character Counter */
|
352
|
+
.character-counter {
|
353
|
+
min-height: 18px;
|
354
|
+
}
|
@@ -0,0 +1,115 @@
|
|
1
|
+
/* Radio Buttons
|
2
|
+
========================================================================== */
|
3
|
+
|
4
|
+
// Remove default Radio Buttons
|
5
|
+
[type="radio"]:not(:checked),
|
6
|
+
[type="radio"]:checked {
|
7
|
+
position: absolute;
|
8
|
+
opacity: 0;
|
9
|
+
pointer-events: none;
|
10
|
+
}
|
11
|
+
|
12
|
+
[type="radio"]:not(:checked) + span,
|
13
|
+
[type="radio"]:checked + span {
|
14
|
+
position: relative;
|
15
|
+
padding-left: 35px;
|
16
|
+
cursor: pointer;
|
17
|
+
display: inline-block;
|
18
|
+
height: 25px;
|
19
|
+
line-height: 25px;
|
20
|
+
font-size: 1rem;
|
21
|
+
transition: .28s ease;
|
22
|
+
user-select: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
[type="radio"] + span:before,
|
26
|
+
[type="radio"] + span:after {
|
27
|
+
content: '';
|
28
|
+
position: absolute;
|
29
|
+
left: 0;
|
30
|
+
top: 0;
|
31
|
+
margin: 4px;
|
32
|
+
width: 16px;
|
33
|
+
height: 16px;
|
34
|
+
z-index: 0;
|
35
|
+
transition: .28s ease;
|
36
|
+
}
|
37
|
+
|
38
|
+
/* Unchecked styles */
|
39
|
+
[type="radio"]:not(:checked) + span:before,
|
40
|
+
[type="radio"]:not(:checked) + span:after,
|
41
|
+
[type="radio"]:checked + span:before,
|
42
|
+
[type="radio"]:checked + span:after,
|
43
|
+
[type="radio"].with-gap:checked + span:before,
|
44
|
+
[type="radio"].with-gap:checked + span:after {
|
45
|
+
border-radius: 50%;
|
46
|
+
}
|
47
|
+
|
48
|
+
[type="radio"]:not(:checked) + span:before,
|
49
|
+
[type="radio"]:not(:checked) + span:after {
|
50
|
+
border: 2px solid $radio-empty-color;
|
51
|
+
}
|
52
|
+
|
53
|
+
[type="radio"]:not(:checked) + span:after {
|
54
|
+
transform: scale(0);
|
55
|
+
}
|
56
|
+
|
57
|
+
/* Checked styles */
|
58
|
+
[type="radio"]:checked + span:before {
|
59
|
+
border: 2px solid transparent;
|
60
|
+
}
|
61
|
+
|
62
|
+
[type="radio"]:checked + span:after,
|
63
|
+
[type="radio"].with-gap:checked + span:before,
|
64
|
+
[type="radio"].with-gap:checked + span:after {
|
65
|
+
border: $radio-border;
|
66
|
+
}
|
67
|
+
|
68
|
+
[type="radio"]:checked + span:after,
|
69
|
+
[type="radio"].with-gap:checked + span:after {
|
70
|
+
background-color: $radio-fill-color;
|
71
|
+
}
|
72
|
+
|
73
|
+
[type="radio"]:checked + span:after {
|
74
|
+
transform: scale(1.02);
|
75
|
+
}
|
76
|
+
|
77
|
+
/* Radio With gap */
|
78
|
+
[type="radio"].with-gap:checked + span:after {
|
79
|
+
transform: scale(.5);
|
80
|
+
}
|
81
|
+
|
82
|
+
/* Focused styles */
|
83
|
+
[type="radio"].tabbed:focus + span:before {
|
84
|
+
box-shadow: 0 0 0 10px rgba(0,0,0,.1);
|
85
|
+
}
|
86
|
+
|
87
|
+
/* Disabled Radio With gap */
|
88
|
+
[type="radio"].with-gap:disabled:checked + span:before {
|
89
|
+
border: 2px solid $input-disabled-color;
|
90
|
+
}
|
91
|
+
|
92
|
+
[type="radio"].with-gap:disabled:checked + span:after {
|
93
|
+
border: none;
|
94
|
+
background-color: $input-disabled-color;
|
95
|
+
}
|
96
|
+
|
97
|
+
/* Disabled style */
|
98
|
+
[type="radio"]:disabled:not(:checked) + span:before,
|
99
|
+
[type="radio"]:disabled:checked + span:before {
|
100
|
+
background-color: transparent;
|
101
|
+
border-color: $input-disabled-color;
|
102
|
+
}
|
103
|
+
|
104
|
+
[type="radio"]:disabled + span {
|
105
|
+
color: $input-disabled-color;
|
106
|
+
}
|
107
|
+
|
108
|
+
[type="radio"]:disabled:not(:checked) + span:before {
|
109
|
+
border-color: $input-disabled-color;
|
110
|
+
}
|
111
|
+
|
112
|
+
[type="radio"]:disabled:checked + span:after {
|
113
|
+
background-color: $input-disabled-color;
|
114
|
+
border-color: $input-disabled-solid-color;
|
115
|
+
}
|
@@ -27,13 +27,14 @@ input[type=range] {
|
|
27
27
|
|
28
28
|
input[type=range] + .thumb {
|
29
29
|
position: absolute;
|
30
|
+
top: 10px;
|
31
|
+
left: 0;
|
30
32
|
border: none;
|
31
33
|
height: 0;
|
32
34
|
width: 0;
|
33
35
|
border-radius: 50%;
|
34
36
|
background-color: $radio-fill-color;
|
35
|
-
|
36
|
-
margin-left: -6px;
|
37
|
+
margin-left: 7px;
|
37
38
|
|
38
39
|
transform-origin: 50% 50%;
|
39
40
|
transform: rotate(-45deg);
|
@@ -59,31 +60,42 @@ input[type=range] + .thumb {
|
|
59
60
|
}
|
60
61
|
}
|
61
62
|
|
63
|
+
// Shared
|
64
|
+
@mixin range-track {
|
65
|
+
height: $track-height;
|
66
|
+
background: #c2c0c2;
|
67
|
+
border: none;
|
68
|
+
}
|
69
|
+
|
70
|
+
@mixin range-thumb {
|
71
|
+
border: none;
|
72
|
+
height: $range-height;
|
73
|
+
width: $range-width;
|
74
|
+
border-radius: 50%;
|
75
|
+
background: $radio-fill-color;
|
76
|
+
transition: box-shadow .3s;
|
77
|
+
}
|
78
|
+
|
62
79
|
// WebKit
|
63
80
|
input[type=range] {
|
64
81
|
-webkit-appearance: none;
|
65
82
|
}
|
66
83
|
|
67
84
|
input[type=range]::-webkit-slider-runnable-track {
|
68
|
-
|
69
|
-
background: #c2c0c2;
|
70
|
-
border: none;
|
85
|
+
@include range-track;
|
71
86
|
}
|
72
87
|
|
73
88
|
input[type=range]::-webkit-slider-thumb {
|
89
|
+
@include range-thumb;
|
74
90
|
-webkit-appearance: none;
|
75
|
-
border: none;
|
76
|
-
height: $range-height;
|
77
|
-
width: $range-width;
|
78
|
-
border-radius: 50%;
|
79
91
|
background-color: $radio-fill-color;
|
80
92
|
transform-origin: 50% 50%;
|
81
93
|
margin: -5px 0 0 0;
|
82
|
-
|
94
|
+
|
83
95
|
}
|
84
96
|
|
85
|
-
input[type=range]:focus::-webkit-slider-
|
86
|
-
|
97
|
+
.keyboard-focused input[type=range]:focus:not(.active)::-webkit-slider-thumb {
|
98
|
+
box-shadow: 0 0 0 10px rgba($radio-fill-color, .26);
|
87
99
|
}
|
88
100
|
|
89
101
|
// FireFox
|
@@ -95,17 +107,15 @@ input[type=range] {
|
|
95
107
|
}
|
96
108
|
|
97
109
|
input[type=range]::-moz-range-track {
|
98
|
-
|
99
|
-
|
100
|
-
|
110
|
+
@include range-track;
|
111
|
+
}
|
112
|
+
|
113
|
+
input[type=range]::-moz-focus-inner {
|
114
|
+
border: 0;
|
101
115
|
}
|
102
116
|
|
103
117
|
input[type=range]::-moz-range-thumb {
|
104
|
-
|
105
|
-
height: $range-height;
|
106
|
-
width: $range-width;
|
107
|
-
border-radius: 50%;
|
108
|
-
background: $radio-fill-color;
|
118
|
+
@include range-thumb;
|
109
119
|
margin-top: -5px;
|
110
120
|
}
|
111
121
|
|
@@ -115,8 +125,8 @@ input[type=range]:-moz-focusring {
|
|
115
125
|
outline-offset: -1px;
|
116
126
|
}
|
117
127
|
|
118
|
-
input[type=range]:focus::-moz-range-
|
119
|
-
|
128
|
+
.keyboard-focused input[type=range]:focus:not(.active)::-moz-range-thumb {
|
129
|
+
box-shadow: 0 0 0 10px rgba($radio-fill-color, .26);
|
120
130
|
}
|
121
131
|
|
122
132
|
// IE 10+
|
@@ -143,17 +153,9 @@ input[type=range]::-ms-fill-upper {
|
|
143
153
|
}
|
144
154
|
|
145
155
|
input[type=range]::-ms-thumb {
|
146
|
-
|
147
|
-
height: $range-height;
|
148
|
-
width: $range-width;
|
149
|
-
border-radius: 50%;
|
150
|
-
background: $radio-fill-color;
|
151
|
-
}
|
152
|
-
|
153
|
-
input[type=range]:focus::-ms-fill-lower {
|
154
|
-
background: #888;
|
156
|
+
@include range-thumb;
|
155
157
|
}
|
156
158
|
|
157
|
-
input[type=range]:focus::-ms-
|
158
|
-
|
159
|
+
.keyboard-focused input[type=range]:focus:not(.active)::-ms-thumb {
|
160
|
+
box-shadow: 0 0 0 10px rgba($radio-fill-color, .26);
|
159
161
|
}
|