materialize-sass 0.100.2.1 → 1.0.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +18 -42
- data/Rakefile +17 -17
- data/{app/assets → assets}/javascripts/materialize-sprockets.js +8 -12
- data/assets/javascripts/materialize.js +11877 -0
- data/assets/javascripts/materialize/autocomplete.js +420 -0
- data/assets/javascripts/materialize/buttons.js +388 -0
- data/assets/javascripts/materialize/cards.js +28 -0
- data/assets/javascripts/materialize/carousel.js +791 -0
- data/assets/javascripts/materialize/cash.js +992 -0
- data/assets/javascripts/materialize/characterCounter.js +180 -0
- data/assets/javascripts/materialize/chips.js +555 -0
- data/assets/javascripts/materialize/collapsible.js +275 -0
- data/assets/javascripts/materialize/datepicker.js +898 -0
- data/assets/javascripts/materialize/dropdown.js +530 -0
- data/{app/assets → assets}/javascripts/materialize/extras/nouislider.js +1 -1
- data/{app/assets → assets}/javascripts/materialize/extras/nouislider.min.js +1 -1
- data/assets/javascripts/materialize/forms.js +223 -0
- data/assets/javascripts/materialize/global.js +353 -0
- data/assets/javascripts/materialize/materialbox.js +432 -0
- data/{app/assets → assets}/javascripts/materialize/modal.js +82 -113
- data/assets/javascripts/materialize/parallax.js +135 -0
- data/assets/javascripts/materialize/pushpin.js +158 -0
- data/assets/javascripts/materialize/range.js +305 -0
- data/assets/javascripts/materialize/scrollspy.js +322 -0
- data/assets/javascripts/materialize/select.js +426 -0
- data/assets/javascripts/materialize/sidenav.js +584 -0
- data/assets/javascripts/materialize/slider.js +383 -0
- data/assets/javascripts/materialize/tabs.js +460 -0
- data/assets/javascripts/materialize/tapTarget.js +347 -0
- data/assets/javascripts/materialize/timepicker.js +616 -0
- data/{app/assets → assets}/javascripts/materialize/toasts.js +42 -46
- data/assets/javascripts/materialize/tooltip.js +325 -0
- data/assets/javascripts/materialize/velocity.min.js +782 -0
- data/{app/assets → assets}/javascripts/materialize/waves.js +0 -0
- data/{app/assets → assets}/stylesheets/materialize.scss +5 -6
- data/{app/assets → assets}/stylesheets/materialize/components/_badges.scss +1 -1
- data/{app/assets → assets}/stylesheets/materialize/components/_buttons.scss +34 -2
- data/{app/assets → assets}/stylesheets/materialize/components/_cards.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_carousel.scss +1 -1
- data/{app/assets → assets}/stylesheets/materialize/components/_chips.scss +6 -5
- data/{app/assets → assets}/stylesheets/materialize/components/_collapsible.scss +3 -3
- data/{app/assets → assets}/stylesheets/materialize/components/_color.scss +0 -0
- data/assets/stylesheets/materialize/components/_datepicker.scss +180 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_dropdown.scss +16 -15
- data/{app/assets → assets}/stylesheets/materialize/components/_global.scss +49 -14
- data/{app/assets → assets}/stylesheets/materialize/components/_grid.scss +1 -1
- data/{app/assets → assets}/stylesheets/materialize/components/_icons-material-design.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_materialbox.scss +0 -0
- data/assets/stylesheets/materialize/components/_mixins.scss +5 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_modal.scss +1 -1
- data/{app/assets → assets}/stylesheets/materialize/components/_navbar.scss +0 -0
- data/assets/stylesheets/materialize/components/_normalize.scss +447 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_preloader.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_pulse.scss +0 -0
- data/{app/assets/stylesheets/materialize/components/_sideNav.scss → assets/stylesheets/materialize/components/_sidenav.scss} +23 -21
- data/{app/assets → assets}/stylesheets/materialize/components/_slider.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_table_of_contents.scss +3 -3
- data/{app/assets → assets}/stylesheets/materialize/components/_tabs.scss +2 -2
- data/{app/assets → assets}/stylesheets/materialize/components/_tapTarget.scss +0 -0
- data/assets/stylesheets/materialize/components/_timepicker.scss +182 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_toast.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_tooltip.scss +1 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_transitions.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_typography.scss +8 -8
- data/{app/assets → assets}/stylesheets/materialize/components/_variables.scss +42 -44
- data/{app/assets → assets}/stylesheets/materialize/components/_waves.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_checkboxes.scss +24 -24
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_file-input.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_forms.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_input-fields.scss +49 -35
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_radio-buttons.scss +29 -29
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_range.scss +32 -31
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_select.scss +20 -11
- data/{app/assets → assets}/stylesheets/materialize/components/forms/_switches.scss +0 -0
- data/{app/assets → assets}/stylesheets/materialize/extras/nouislider.css +1 -1
- data/lib/materialize-sass.rb +13 -23
- data/lib/materialize-sass/engine.rb +6 -9
- data/lib/materialize-sass/version.rb +1 -1
- data/materialize-sass.gemspec +2 -1
- metadata +97 -97
- 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.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.woff2 +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.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.woff2 +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.js +0 -10021
- data/app/assets/javascripts/materialize/animation.js +0 -7
- data/app/assets/javascripts/materialize/buttons.js +0 -253
- data/app/assets/javascripts/materialize/cards.js +0 -28
- data/app/assets/javascripts/materialize/carousel.js +0 -543
- data/app/assets/javascripts/materialize/character_counter.js +0 -64
- data/app/assets/javascripts/materialize/chips.js +0 -315
- data/app/assets/javascripts/materialize/collapsible.js +0 -178
- data/app/assets/javascripts/materialize/date_picker/picker.date.js +0 -1399
- data/app/assets/javascripts/materialize/date_picker/picker.js +0 -1196
- data/app/assets/javascripts/materialize/date_picker/picker.time.js +0 -646
- data/app/assets/javascripts/materialize/dropdown.js +0 -257
- data/app/assets/javascripts/materialize/forms.js +0 -806
- data/app/assets/javascripts/materialize/global.js +0 -170
- data/app/assets/javascripts/materialize/hammer.min.js +0 -424
- data/app/assets/javascripts/materialize/initial.js +0 -10
- data/app/assets/javascripts/materialize/jquery.easing.1.4.js +0 -144
- data/app/assets/javascripts/materialize/jquery.hammer.js +0 -33
- data/app/assets/javascripts/materialize/materialbox.js +0 -263
- data/app/assets/javascripts/materialize/parallax.js +0 -54
- data/app/assets/javascripts/materialize/pushpin.js +0 -68
- data/app/assets/javascripts/materialize/scrollFire.js +0 -49
- data/app/assets/javascripts/materialize/scrollspy.js +0 -230
- data/app/assets/javascripts/materialize/sideNav.js +0 -395
- data/app/assets/javascripts/materialize/slider.js +0 -295
- data/app/assets/javascripts/materialize/tabs.js +0 -244
- data/app/assets/javascripts/materialize/tapTarget.js +0 -184
- data/app/assets/javascripts/materialize/tooltip.js +0 -227
- data/app/assets/javascripts/materialize/transitions.js +0 -163
- data/app/assets/javascripts/materialize/velocity.min.js +0 -626
- data/app/assets/stylesheets/materialize/components/_normalize.scss +0 -424
- data/app/assets/stylesheets/materialize/components/_roboto.scss +0 -39
- data/app/assets/stylesheets/materialize/components/date_picker/_default.date.scss +0 -469
- data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +0 -216
- data/app/assets/stylesheets/materialize/components/date_picker/_default.time.scss +0 -267
File without changes
|
@@ -22,7 +22,7 @@ form p:last-child {
|
|
22
22
|
// Checkbox Styles
|
23
23
|
[type="checkbox"] {
|
24
24
|
// Text Label Style
|
25
|
-
+
|
25
|
+
+ span:not(.lever) {
|
26
26
|
position: relative;
|
27
27
|
padding-left: 35px;
|
28
28
|
cursor: pointer;
|
@@ -34,8 +34,8 @@ form p:last-child {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
/* checkbox aspect */
|
37
|
-
+
|
38
|
-
&:not(.filled-in) +
|
37
|
+
+ span:not(.lever):before,
|
38
|
+
&:not(.filled-in) + span:not(.lever):after {
|
39
39
|
content: '';
|
40
40
|
position: absolute;
|
41
41
|
top: 0;
|
@@ -45,22 +45,22 @@ form p:last-child {
|
|
45
45
|
z-index: 0;
|
46
46
|
border: 2px solid $radio-empty-color;
|
47
47
|
border-radius: 1px;
|
48
|
-
margin-top:
|
48
|
+
margin-top: 3px;
|
49
49
|
transition: .2s;
|
50
50
|
}
|
51
51
|
|
52
|
-
&:not(.filled-in) +
|
52
|
+
&:not(.filled-in) + span:not(.lever):after {
|
53
53
|
border: 0;
|
54
54
|
transform: scale(0);
|
55
55
|
}
|
56
56
|
|
57
|
-
&:not(:checked):disabled +
|
57
|
+
&:not(:checked):disabled + span:not(.lever):before {
|
58
58
|
border: none;
|
59
59
|
background-color: $input-disabled-color;
|
60
60
|
}
|
61
61
|
|
62
62
|
// Focused styles
|
63
|
-
&.tabbed:focus +
|
63
|
+
&.tabbed:focus + span:not(.lever):after {
|
64
64
|
transform: scale(1);
|
65
65
|
border: 0;
|
66
66
|
border-radius: 50%;
|
@@ -70,7 +70,7 @@ form p:last-child {
|
|
70
70
|
}
|
71
71
|
|
72
72
|
[type="checkbox"]:checked {
|
73
|
-
+
|
73
|
+
+ span:not(.lever):before {
|
74
74
|
top: -4px;
|
75
75
|
left: -5px;
|
76
76
|
width: 12px;
|
@@ -84,7 +84,7 @@ form p:last-child {
|
|
84
84
|
transform-origin: 100% 100%;
|
85
85
|
}
|
86
86
|
|
87
|
-
&:disabled +
|
87
|
+
&:disabled + span:before {
|
88
88
|
border-right: 2px solid $input-disabled-color;
|
89
89
|
border-bottom: 2px solid $input-disabled-color;
|
90
90
|
}
|
@@ -92,7 +92,7 @@ form p:last-child {
|
|
92
92
|
|
93
93
|
/* Indeterminate checkbox */
|
94
94
|
[type="checkbox"]:indeterminate {
|
95
|
-
+
|
95
|
+
+ span:not(.lever):before {
|
96
96
|
top: -11px;
|
97
97
|
left: -12px;
|
98
98
|
width: 10px;
|
@@ -107,7 +107,7 @@ form p:last-child {
|
|
107
107
|
}
|
108
108
|
|
109
109
|
// Disabled indeterminate
|
110
|
-
&:disabled +
|
110
|
+
&:disabled + span:not(.lever):before {
|
111
111
|
border-right: 2px solid $input-disabled-color;
|
112
112
|
background-color: transparent;
|
113
113
|
}
|
@@ -116,12 +116,12 @@ form p:last-child {
|
|
116
116
|
// Filled in Style
|
117
117
|
[type="checkbox"].filled-in {
|
118
118
|
// General
|
119
|
-
+
|
119
|
+
+ span:not(.lever):after {
|
120
120
|
border-radius: 2px;
|
121
121
|
}
|
122
122
|
|
123
|
-
+
|
124
|
-
+
|
123
|
+
+ span:not(.lever):before,
|
124
|
+
+ span:not(.lever):after {
|
125
125
|
content: '';
|
126
126
|
left: 0;
|
127
127
|
position: absolute;
|
@@ -131,7 +131,7 @@ form p:last-child {
|
|
131
131
|
}
|
132
132
|
|
133
133
|
// Unchecked style
|
134
|
-
&:not(:checked) +
|
134
|
+
&:not(:checked) + span:not(.lever):before {
|
135
135
|
width: 0;
|
136
136
|
height: 0;
|
137
137
|
border: 3px solid transparent;
|
@@ -141,7 +141,7 @@ form p:last-child {
|
|
141
141
|
transform-origin: 100% 100%;
|
142
142
|
}
|
143
143
|
|
144
|
-
&:not(:checked) +
|
144
|
+
&:not(:checked) + span:not(.lever):after {
|
145
145
|
height: 20px;
|
146
146
|
width: 20px;
|
147
147
|
background-color: transparent;
|
@@ -152,7 +152,7 @@ form p:last-child {
|
|
152
152
|
|
153
153
|
// Checked style
|
154
154
|
&:checked {
|
155
|
-
+
|
155
|
+
+ span:not(.lever):before {
|
156
156
|
top: 0;
|
157
157
|
left: 1px;
|
158
158
|
width: 8px;
|
@@ -165,7 +165,7 @@ form p:last-child {
|
|
165
165
|
transform-origin: 100% 100%;
|
166
166
|
}
|
167
167
|
|
168
|
-
+
|
168
|
+
+ span:not(.lever):after {
|
169
169
|
top: 0;
|
170
170
|
width: 20px;
|
171
171
|
height: 20px;
|
@@ -176,34 +176,34 @@ form p:last-child {
|
|
176
176
|
}
|
177
177
|
|
178
178
|
// Focused styles
|
179
|
-
&.tabbed:focus +
|
179
|
+
&.tabbed:focus + span:not(.lever):after {
|
180
180
|
border-radius: 2px;
|
181
181
|
border-color: $radio-empty-color;
|
182
182
|
background-color: rgba(0,0,0,.1);
|
183
183
|
}
|
184
184
|
|
185
|
-
&.tabbed:checked:focus +
|
185
|
+
&.tabbed:checked:focus + span:not(.lever):after {
|
186
186
|
border-radius: 2px;
|
187
187
|
background-color: $secondary-color;
|
188
188
|
border-color: $secondary-color;
|
189
189
|
}
|
190
190
|
|
191
191
|
// Disabled style
|
192
|
-
&:disabled:not(:checked) +
|
192
|
+
&:disabled:not(:checked) + span:not(.lever):before {
|
193
193
|
background-color: transparent;
|
194
194
|
border: 2px solid transparent;
|
195
195
|
}
|
196
196
|
|
197
|
-
&:disabled:not(:checked) +
|
197
|
+
&:disabled:not(:checked) + span:not(.lever):after {
|
198
198
|
border-color: transparent;
|
199
199
|
background-color: $input-disabled-solid-color;
|
200
200
|
}
|
201
201
|
|
202
|
-
&:disabled:checked +
|
202
|
+
&:disabled:checked + span:not(.lever):before {
|
203
203
|
background-color: transparent;
|
204
204
|
}
|
205
205
|
|
206
|
-
&:disabled:checked +
|
206
|
+
&:disabled:checked + span:not(.lever):after {
|
207
207
|
background-color: $input-disabled-solid-color;
|
208
208
|
border-color: $input-disabled-solid-color;
|
209
209
|
}
|
File without changes
|
File without changes
|
@@ -62,6 +62,14 @@ textarea.materialize-textarea {
|
|
62
62
|
color: $input-focus-color;
|
63
63
|
}
|
64
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
|
+
|
65
73
|
// Valid Input Style
|
66
74
|
&.valid,
|
67
75
|
&:focus.valid {
|
@@ -69,10 +77,13 @@ textarea.materialize-textarea {
|
|
69
77
|
}
|
70
78
|
|
71
79
|
// Custom Success Message
|
72
|
-
&.valid
|
73
|
-
&:focus.valid
|
80
|
+
&.valid ~ .helper-text:after,
|
81
|
+
&:focus.valid ~ .helper-text:after {
|
74
82
|
@extend %custom-success-message;
|
75
83
|
}
|
84
|
+
&:focus.valid ~ label {
|
85
|
+
color: $input-success-color;
|
86
|
+
}
|
76
87
|
|
77
88
|
// Invalid Input Style
|
78
89
|
&.invalid,
|
@@ -81,10 +92,13 @@ textarea.materialize-textarea {
|
|
81
92
|
}
|
82
93
|
|
83
94
|
// Custom Error message
|
84
|
-
&.invalid
|
85
|
-
&:focus.invalid
|
95
|
+
&.invalid ~ .helper-text:after,
|
96
|
+
&:focus.invalid ~ .helper-text:after {
|
86
97
|
@extend %custom-error-message;
|
87
98
|
}
|
99
|
+
&:focus.invalid ~ label {
|
100
|
+
color: $input-error-color;
|
101
|
+
}
|
88
102
|
|
89
103
|
// Full width label when using validate for error messages
|
90
104
|
&.validate + label {
|
@@ -95,17 +109,6 @@ textarea.materialize-textarea {
|
|
95
109
|
& + label:after {
|
96
110
|
@extend %input-after-style;
|
97
111
|
}
|
98
|
-
|
99
|
-
// TODO: Remove once input fields are reworked to support validation messages better
|
100
|
-
&.invalid + label:after,
|
101
|
-
&.valid + label:after{
|
102
|
-
display: none;
|
103
|
-
}
|
104
|
-
|
105
|
-
&.invalid + label.active:after,
|
106
|
-
&.valid + label.active:after{
|
107
|
-
display: block;
|
108
|
-
}
|
109
112
|
}
|
110
113
|
|
111
114
|
|
@@ -118,17 +121,18 @@ textarea.materialize-textarea {
|
|
118
121
|
border-bottom: $input-invalid-border;
|
119
122
|
box-shadow: 0 1px 0 0 $input-error-color;
|
120
123
|
}
|
124
|
+
%hidden-text {
|
125
|
+
color: transparent;
|
126
|
+
user-select: none;
|
127
|
+
pointer-events: none;
|
128
|
+
}
|
121
129
|
%custom-success-message {
|
122
130
|
content: attr(data-success);
|
123
131
|
color: $input-success-color;
|
124
|
-
opacity: 1;
|
125
|
-
transform: translateY(9px);
|
126
132
|
}
|
127
133
|
%custom-error-message {
|
128
134
|
content: attr(data-error);
|
129
135
|
color: $input-error-color;
|
130
|
-
opacity: 1;
|
131
|
-
transform: translateY(9px);
|
132
136
|
}
|
133
137
|
%input-after-style {
|
134
138
|
display: block;
|
@@ -169,20 +173,19 @@ textarea.materialize-textarea {
|
|
169
173
|
|
170
174
|
position: relative;
|
171
175
|
margin-top: 1rem;
|
176
|
+
margin-bottom: 1rem;
|
172
177
|
|
173
|
-
label {
|
178
|
+
& > label {
|
174
179
|
color: $input-border-color;
|
175
180
|
position: absolute;
|
176
181
|
top: 0;
|
177
182
|
left: 0;
|
178
|
-
height: 100%;
|
179
183
|
font-size: 1rem;
|
180
184
|
cursor: text;
|
181
|
-
transition: transform .2s ease-out;
|
185
|
+
transition: transform .2s ease-out, color .2s ease-out;
|
182
186
|
transform-origin: 0% 100%;
|
183
187
|
text-align: initial;
|
184
188
|
transform: translateY(12px);
|
185
|
-
pointer-events: none;
|
186
189
|
|
187
190
|
&:not(.label-icon).active {
|
188
191
|
transform: translateY(-14px) scale(.8);
|
@@ -190,6 +193,21 @@ textarea.materialize-textarea {
|
|
190
193
|
}
|
191
194
|
}
|
192
195
|
|
196
|
+
.helper-text {
|
197
|
+
&::after {
|
198
|
+
opacity: 1;
|
199
|
+
position: absolute;
|
200
|
+
top: 0;
|
201
|
+
left: 0;
|
202
|
+
}
|
203
|
+
|
204
|
+
position: relative;
|
205
|
+
min-height: 18px;
|
206
|
+
display: block;
|
207
|
+
font-size: 12px;
|
208
|
+
color: rgba(0,0,0,.54);
|
209
|
+
}
|
210
|
+
|
193
211
|
// Prefix Icons
|
194
212
|
.prefix {
|
195
213
|
position: absolute;
|
@@ -281,27 +299,17 @@ textarea {
|
|
281
299
|
background-color: transparent;
|
282
300
|
|
283
301
|
&.materialize-textarea {
|
284
|
-
// Fixes validation messages for dynamic textareas
|
285
|
-
&.validate + label {
|
286
|
-
&::after {
|
287
|
-
top: calc(100% - 12px);
|
288
|
-
}
|
289
|
-
&:not(.label-icon).active {
|
290
|
-
transform: translateY(-25px);
|
291
|
-
}
|
292
|
-
height: 100%;
|
293
|
-
}
|
294
|
-
|
295
302
|
overflow-y: hidden; /* prevents scroll bar flash */
|
296
303
|
padding: .8rem 0 1.6rem 0; /* prevents text jump on Enter keypress */
|
297
304
|
resize: none;
|
298
305
|
min-height: $input-height;
|
306
|
+
box-sizing: border-box;
|
299
307
|
}
|
300
308
|
}
|
301
309
|
|
302
310
|
// For textarea autoresize
|
303
311
|
.hiddendiv {
|
304
|
-
|
312
|
+
visibility: hidden;
|
305
313
|
white-space: pre-wrap;
|
306
314
|
word-wrap: break-word;
|
307
315
|
overflow-wrap: break-word; /* future version of deprecated 'word-wrap' */
|
@@ -310,6 +318,7 @@ textarea {
|
|
310
318
|
// Reduces repaints
|
311
319
|
position: absolute;
|
312
320
|
top: 0;
|
321
|
+
z-index: -1;
|
313
322
|
}
|
314
323
|
|
315
324
|
|
@@ -331,3 +340,8 @@ textarea {
|
|
331
340
|
}
|
332
341
|
}
|
333
342
|
}
|
343
|
+
|
344
|
+
/* Character Counter */
|
345
|
+
.character-counter {
|
346
|
+
min-height: 18px;
|
347
|
+
}
|
@@ -9,8 +9,8 @@
|
|
9
9
|
pointer-events: none;
|
10
10
|
}
|
11
11
|
|
12
|
-
[type="radio"]:not(:checked) +
|
13
|
-
[type="radio"]:checked +
|
12
|
+
[type="radio"]:not(:checked) + span,
|
13
|
+
[type="radio"]:checked + span {
|
14
14
|
position: relative;
|
15
15
|
padding-left: 35px;
|
16
16
|
cursor: pointer;
|
@@ -22,8 +22,8 @@
|
|
22
22
|
user-select: none;
|
23
23
|
}
|
24
24
|
|
25
|
-
[type="radio"] +
|
26
|
-
[type="radio"] +
|
25
|
+
[type="radio"] + span:before,
|
26
|
+
[type="radio"] + span:after {
|
27
27
|
content: '';
|
28
28
|
position: absolute;
|
29
29
|
left: 0;
|
@@ -36,80 +36,80 @@
|
|
36
36
|
}
|
37
37
|
|
38
38
|
/* Unchecked styles */
|
39
|
-
[type="radio"]:not(:checked) +
|
40
|
-
[type="radio"]:not(:checked) +
|
41
|
-
[type="radio"]:checked +
|
42
|
-
[type="radio"]:checked +
|
43
|
-
[type="radio"].with-gap:checked +
|
44
|
-
[type="radio"].with-gap:checked +
|
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
45
|
border-radius: 50%;
|
46
46
|
}
|
47
47
|
|
48
|
-
[type="radio"]:not(:checked) +
|
49
|
-
[type="radio"]:not(:checked) +
|
48
|
+
[type="radio"]:not(:checked) + span:before,
|
49
|
+
[type="radio"]:not(:checked) + span:after {
|
50
50
|
border: 2px solid $radio-empty-color;
|
51
51
|
}
|
52
52
|
|
53
|
-
[type="radio"]:not(:checked) +
|
53
|
+
[type="radio"]:not(:checked) + span:after {
|
54
54
|
transform: scale(0);
|
55
55
|
}
|
56
56
|
|
57
57
|
/* Checked styles */
|
58
|
-
[type="radio"]:checked +
|
58
|
+
[type="radio"]:checked + span:before {
|
59
59
|
border: 2px solid transparent;
|
60
60
|
}
|
61
61
|
|
62
|
-
[type="radio"]:checked +
|
63
|
-
[type="radio"].with-gap:checked +
|
64
|
-
[type="radio"].with-gap:checked +
|
62
|
+
[type="radio"]:checked + span:after,
|
63
|
+
[type="radio"].with-gap:checked + span:before,
|
64
|
+
[type="radio"].with-gap:checked + span:after {
|
65
65
|
border: $radio-border;
|
66
66
|
}
|
67
67
|
|
68
|
-
[type="radio"]:checked +
|
69
|
-
[type="radio"].with-gap:checked +
|
68
|
+
[type="radio"]:checked + span:after,
|
69
|
+
[type="radio"].with-gap:checked + span:after {
|
70
70
|
background-color: $radio-fill-color;
|
71
71
|
}
|
72
72
|
|
73
|
-
[type="radio"]:checked +
|
73
|
+
[type="radio"]:checked + span:after {
|
74
74
|
transform: scale(1.02);
|
75
75
|
}
|
76
76
|
|
77
77
|
/* Radio With gap */
|
78
|
-
[type="radio"].with-gap:checked +
|
78
|
+
[type="radio"].with-gap:checked + span:after {
|
79
79
|
transform: scale(.5);
|
80
80
|
}
|
81
81
|
|
82
82
|
/* Focused styles */
|
83
|
-
[type="radio"].tabbed:focus +
|
83
|
+
[type="radio"].tabbed:focus + span:before {
|
84
84
|
box-shadow: 0 0 0 10px rgba(0,0,0,.1);
|
85
85
|
}
|
86
86
|
|
87
87
|
/* Disabled Radio With gap */
|
88
|
-
[type="radio"].with-gap:disabled:checked +
|
88
|
+
[type="radio"].with-gap:disabled:checked + span:before {
|
89
89
|
border: 2px solid $input-disabled-color;
|
90
90
|
}
|
91
91
|
|
92
|
-
[type="radio"].with-gap:disabled:checked +
|
92
|
+
[type="radio"].with-gap:disabled:checked + span:after {
|
93
93
|
border: none;
|
94
94
|
background-color: $input-disabled-color;
|
95
95
|
}
|
96
96
|
|
97
97
|
/* Disabled style */
|
98
|
-
[type="radio"]:disabled:not(:checked) +
|
99
|
-
[type="radio"]:disabled:checked +
|
98
|
+
[type="radio"]:disabled:not(:checked) + span:before,
|
99
|
+
[type="radio"]:disabled:checked + span:before {
|
100
100
|
background-color: transparent;
|
101
101
|
border-color: $input-disabled-color;
|
102
102
|
}
|
103
103
|
|
104
|
-
[type="radio"]:disabled +
|
104
|
+
[type="radio"]:disabled + span {
|
105
105
|
color: $input-disabled-color;
|
106
106
|
}
|
107
107
|
|
108
|
-
[type="radio"]:disabled:not(:checked) +
|
108
|
+
[type="radio"]:disabled:not(:checked) + span:before {
|
109
109
|
border-color: $input-disabled-color;
|
110
110
|
}
|
111
111
|
|
112
|
-
[type="radio"]:disabled:checked +
|
112
|
+
[type="radio"]:disabled:checked + span:after {
|
113
113
|
background-color: $input-disabled-color;
|
114
114
|
border-color: $input-disabled-solid-color;
|
115
115
|
}
|