material-sass 4.0.0.alpha6 → 4.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +36 -8
- data/Rakefile +16 -3
- data/app/assets/javascripts/material-sprockets.js +6 -1
- data/app/assets/javascripts/material.js +654 -417
- data/app/assets/javascripts/material.min.js +1 -0
- data/app/assets/javascripts/material/addons/picker.date.js +234 -0
- data/app/assets/javascripts/material/addons/picker.js +172 -0
- data/app/assets/javascripts/material/addons/textarea-autosize.js +20 -2
- data/app/assets/javascripts/material/addons/waves.js +127 -0
- data/app/assets/javascripts/material/components/floating-label.js +92 -0
- data/app/assets/javascripts/material/components/navdrawer.js +353 -0
- data/app/assets/javascripts/material/components/selection-control-focus.js +47 -0
- data/app/assets/javascripts/material/components/tab-switch.js +148 -0
- data/app/assets/javascripts/material/components/util.js +133 -0
- data/app/assets/javascripts/material/initializers/picker.js +171 -0
- data/app/assets/javascripts/material/initializers/textarea-autosize.js +10 -0
- data/app/assets/javascripts/material/initializers/waves.js +13 -0
- data/app/assets/stylesheets/material/_colours.scss +324 -0
- data/app/assets/stylesheets/material/_functions.scss +65 -0
- data/app/assets/stylesheets/material/_mixins.scss +23 -23
- data/app/assets/stylesheets/material/_print.scss +102 -0
- data/app/assets/stylesheets/material/_utilities.scss +21 -17
- data/app/assets/stylesheets/material/_variables.scss +13 -42
- data/app/assets/stylesheets/material/base/_base.scss +420 -5
- data/app/assets/stylesheets/material/base/_grid.scss +34 -33
- data/app/assets/stylesheets/material/base/_typography.scss +165 -174
- data/app/assets/stylesheets/material/bootstrap/_alert.scss +32 -39
- data/app/assets/stylesheets/material/bootstrap/_badge.scss +34 -0
- data/app/assets/stylesheets/material/bootstrap/_breadcrumb.scss +18 -18
- data/app/assets/stylesheets/material/bootstrap/_carousel.scss +127 -142
- data/app/assets/stylesheets/material/bootstrap/_close.scss +18 -19
- data/app/assets/stylesheets/material/bootstrap/_code.scss +10 -7
- data/app/assets/stylesheets/material/bootstrap/_custom-form.scss +50 -56
- data/app/assets/stylesheets/material/bootstrap/_form.scss +159 -129
- data/app/assets/stylesheets/material/bootstrap/_image.scss +19 -16
- data/app/assets/stylesheets/material/bootstrap/_jumbotron.scss +10 -7
- data/app/assets/stylesheets/material/bootstrap/_nav.scss +71 -69
- data/app/assets/stylesheets/material/bootstrap/_pagination.scss +34 -26
- data/app/assets/stylesheets/material/bootstrap/_popover.scss +26 -59
- data/app/assets/stylesheets/material/bootstrap/_responsive-embed.scss +4 -4
- data/app/assets/stylesheets/material/bootstrap/_transition.scss +10 -8
- data/app/assets/stylesheets/material/material.scss +75 -62
- data/app/assets/stylesheets/material/material/_button-flat.scss +26 -39
- data/app/assets/stylesheets/material/material/_button-float.scss +10 -14
- data/app/assets/stylesheets/material/material/_button-group.scss +268 -0
- data/app/assets/stylesheets/material/material/_button.scss +133 -189
- data/app/assets/stylesheets/material/material/_card.scss +300 -248
- data/app/assets/stylesheets/material/material/_chip.scss +65 -64
- data/app/assets/stylesheets/material/material/_data-table.scss +135 -45
- data/app/assets/stylesheets/material/material/_dialog.scss +141 -110
- data/app/assets/stylesheets/material/material/_expansion-panel.scss +86 -119
- data/app/assets/stylesheets/material/material/_menu.scss +308 -228
- data/app/assets/stylesheets/material/material/_navdrawer.scss +239 -234
- data/app/assets/stylesheets/material/material/_picker.scss +157 -155
- data/app/assets/stylesheets/material/material/_progress-circular.scss +80 -80
- data/app/assets/stylesheets/material/material/_progress.scss +180 -115
- data/app/assets/stylesheets/material/material/_selection-control.scss +132 -139
- data/app/assets/stylesheets/material/material/_stepper.scss +94 -93
- data/app/assets/stylesheets/material/material/_tab.scss +74 -93
- data/app/assets/stylesheets/material/material/_text-field-floating-label.scss +29 -20
- data/app/assets/stylesheets/material/material/_text-field-input-group.scss +94 -24
- data/app/assets/stylesheets/material/material/_text-field-textarea.scss +13 -26
- data/app/assets/stylesheets/material/material/_text-field.scss +127 -118
- data/app/assets/stylesheets/material/material/_toolbar.scss +308 -313
- data/app/assets/stylesheets/material/material/_tooltip.scss +23 -62
- data/app/assets/stylesheets/material/mixins/_background-variant.scss +6 -6
- data/app/assets/stylesheets/material/mixins/_border-radius.scss +17 -17
- data/app/assets/stylesheets/material/mixins/_breakpoint.scss +32 -2
- data/app/assets/stylesheets/material/mixins/_clearfix.scss +1 -1
- data/app/assets/stylesheets/material/mixins/_form.scss +62 -25
- data/app/assets/stylesheets/material/mixins/_grid-framework.scss +8 -16
- data/app/assets/stylesheets/material/mixins/_grid.scss +40 -64
- data/app/assets/stylesheets/material/mixins/_material-icons.scss +36 -0
- data/app/assets/stylesheets/material/mixins/_nav-divider.scss +1 -1
- data/app/assets/stylesheets/material/mixins/_reset-text.scss +2 -21
- data/app/assets/stylesheets/material/mixins/_screenreader.scss +14 -12
- data/app/assets/stylesheets/material/mixins/_text-alignment.scss +23 -0
- data/app/assets/stylesheets/material/mixins/_text-emphasis.scss +6 -6
- data/app/assets/stylesheets/material/mixins/_transition.scss +42 -10
- data/app/assets/stylesheets/material/utilities/_background.scss +18 -18
- data/app/assets/stylesheets/material/utilities/_border.scss +88 -41
- data/app/assets/stylesheets/material/utilities/_display.scss +63 -30
- data/app/assets/stylesheets/material/utilities/_flex.scss +139 -134
- data/app/assets/stylesheets/material/utilities/_material-icons.scss +3 -5
- data/app/assets/stylesheets/material/utilities/_position.scss +19 -22
- data/app/assets/stylesheets/material/utilities/_sizing.scss +11 -12
- data/app/assets/stylesheets/material/utilities/_spacing.scss +51 -56
- data/app/assets/stylesheets/material/utilities/_text.scss +80 -75
- data/app/assets/stylesheets/material/utilities/_visibility.scss +5 -46
- data/app/assets/stylesheets/material/utilities/_waves.scss +11 -18
- data/app/assets/stylesheets/material/variables/_elevation-shadow.scss +89 -82
- data/app/assets/stylesheets/material/variables/_grid.scss +29 -26
- data/app/assets/stylesheets/material/variables/_palette.scss +45 -0
- data/app/assets/stylesheets/material/variables/_spacer.scss +34 -88
- data/app/assets/stylesheets/material/variables/_transition.scss +29 -0
- data/app/assets/stylesheets/material/variables/_typography.scss +88 -74
- data/app/assets/stylesheets/material/variables/_variable-bootstrap.scss +196 -133
- data/app/assets/stylesheets/material/variables/_variable-material.scss +481 -429
- data/lib/material-sass/version.rb +1 -1
- data/material-sass.gemspec +3 -3
- metadata +26 -21
- data/app/assets/javascripts/material/addons-materialise/pickadate.js +0 -139
- data/app/assets/javascripts/material/addons-materialise/textarea-autosize.js +0 -11
- data/app/assets/javascripts/material/addons-materialise/wave.js +0 -15
- data/app/assets/javascripts/material/addons/pickadate.js +0 -7
- data/app/assets/javascripts/material/addons/wave.js +0 -5
- data/app/assets/javascripts/material/src/floating-label.js +0 -91
- data/app/assets/javascripts/material/src/navdrawer.js +0 -352
- data/app/assets/javascripts/material/src/tab-switch.js +0 -133
- data/app/assets/javascripts/material/src/util.js +0 -138
- data/app/assets/stylesheets/material/base/_normalize.scss +0 -253
- data/app/assets/stylesheets/material/base/_reboot.scss +0 -239
- data/app/assets/stylesheets/material/bootstrap/_button-group.scss +0 -134
- data/app/assets/stylesheets/material/mixins/_tab-focus.scss +0 -5
- data/app/assets/stylesheets/material/mixins/_transform.scss +0 -9
- data/app/assets/stylesheets/material/variables/_animation.scss +0 -22
- data/app/assets/stylesheets/material/variables/_colour.scss +0 -389
@@ -1,8 +1,6 @@
|
|
1
|
-
//
|
2
|
-
//
|
3
|
-
// maybe striped progress bars should be the "buffer" variation of linear indicator
|
1
|
+
// Material design does not have specs for striped progress bars
|
2
|
+
// so striped progress bars have been styled according to the "buffer" variation of linear indicator
|
4
3
|
// (https://material.google.com/components/progress-activity.html#progress-activity-types-of-indicators)
|
5
|
-
//
|
6
4
|
|
7
5
|
.progress {
|
8
6
|
display: flex;
|
@@ -11,140 +9,207 @@
|
|
11
9
|
}
|
12
10
|
|
13
11
|
.progress-bar {
|
14
|
-
|
15
|
-
height: $progress-height;
|
12
|
+
border-bottom: $progress-bar-height solid $progress-bar-bg;
|
16
13
|
|
17
|
-
&::
|
18
|
-
background-color:
|
19
|
-
|
20
|
-
content: "";
|
14
|
+
&::after {
|
15
|
+
background-color: $progress-bg;
|
16
|
+
content: '';
|
21
17
|
display: block;
|
18
|
+
height: $progress-bar-height;
|
22
19
|
position: absolute;
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
left: 0;
|
20
|
+
right: 0;
|
21
|
+
bottom: 0;
|
22
|
+
left: 0;
|
27
23
|
z-index: -1;
|
28
24
|
}
|
29
|
-
}
|
30
25
|
|
31
|
-
//
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
26
|
+
// Colour
|
27
|
+
@each $color, $values in $theme-colors {
|
28
|
+
&.bg-#{$color} {
|
29
|
+
background-color: transparent !important;
|
30
|
+
border-bottom-color: map-get(theme-color($color), color);
|
31
|
+
|
32
|
+
&::after {
|
33
|
+
background-color: map-get(theme-color($color), lighter);
|
34
|
+
}
|
35
|
+
|
36
|
+
&::before {
|
37
|
+
background-image: repeating-radial-gradient(#{$progress-bar-height / 2} #{$progress-bar-height / 2}, map-get(theme-color($color), lighter), map-get(theme-color($color), lighter) #{$progress-bar-height / 2}, transparent #{$progress-bar-height / 2}, transparent 100%);
|
38
|
+
// scss-lint:disable VendorPrefix
|
39
|
+
background-image: -webkit-repeating-radial-gradient(#{$progress-bar-height / 2} #{$progress-bar-height / 2}, map-get(theme-color($color), lighter), map-get(theme-color($color), lighter) #{$progress-bar-height / 2}, transparent #{$progress-bar-height / 2}, transparent 100%);
|
40
|
+
// scss-lint:enable VendorPrefix
|
41
|
+
}
|
41
42
|
}
|
42
43
|
}
|
44
|
+
}
|
43
45
|
|
44
|
-
.progress-bar-animated,
|
45
|
-
.progress-bar-striped {
|
46
|
-
border-right: ($progress-height * 3) solid $progress-bar-mask;
|
47
|
-
box-sizing: content-box;
|
48
46
|
|
49
|
-
|
50
|
-
|
51
|
-
|
47
|
+
|
48
|
+
// Animated & striped
|
49
|
+
|
50
|
+
.progress-bar-animated {
|
51
|
+
&::before {
|
52
|
+
animation-direction: reverse;
|
53
|
+
animation-duration: $transition-duration-mobile;
|
54
|
+
animation-iteration-count: infinite;
|
55
|
+
animation-name: progress-bar-animation;
|
56
|
+
animation-timing-function: linear;
|
57
|
+
|
58
|
+
@include media-breakpoint-up(sm) {
|
59
|
+
animation-duration: $transition-duration-tablet;
|
52
60
|
}
|
53
61
|
|
54
|
-
|
55
|
-
|
56
|
-
background-image: repeating-radial-gradient(#{$progress-height / 2} #{$progress-height / 2}, #{$black-divider}, #{$black-divider} #{$progress-height / 2}, transparent #{$progress-height / 2}, transparent 100%);
|
57
|
-
background-image: -webkit-repeating-radial-gradient(#{$progress-height / 2} #{$progress-height / 2}, #{$black-divider}, #{$black-divider} #{$progress-height / 2}, transparent #{$progress-height / 2}, transparent 100%);
|
58
|
-
background-position: 0 0;
|
59
|
-
background-repeat: repeat-x;
|
60
|
-
background-size: ($progress-height * 3) ($progress-height * 3);
|
62
|
+
@include media-breakpoint-up(lg) {
|
63
|
+
animation-duration: $transition-duration-desktop;
|
61
64
|
}
|
62
65
|
}
|
66
|
+
}
|
63
67
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
.progress-bar-animated,
|
69
|
+
.progress-bar-striped {
|
70
|
+
box-sizing: content-box;
|
71
|
+
position: relative;
|
72
|
+
|
73
|
+
&[style*="width:100%"],
|
74
|
+
&[style*="width: 100%"] {
|
75
|
+
border-right: 0;
|
71
76
|
}
|
72
77
|
|
73
|
-
|
74
|
-
|
75
|
-
//
|
76
|
-
.progress-bar-indeterminate {
|
77
|
-
background-image: linear-gradient(to right, $progress-bar-mask, $progress-bar-mask);
|
78
|
-
position: relative;
|
79
|
-
width: 100% !important;
|
80
|
-
|
81
|
-
&::after,
|
82
|
-
&::before {
|
83
|
-
animation-duration: 2s;
|
84
|
-
animation-iteration-count: infinite;
|
85
|
-
animation-timing-function: linear;
|
86
|
-
width: 0%;
|
87
|
-
@include border-radius($border-radius);
|
88
|
-
}
|
78
|
+
&::after {
|
79
|
+
@include border-right-radius($progress-bar-border-radius);
|
89
80
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
content: "";
|
94
|
-
display: block;
|
95
|
-
position: absolute;
|
96
|
-
top: 0;
|
97
|
-
bottom: 0;
|
98
|
-
left: 0;
|
99
|
-
}
|
81
|
+
right: ($progress-bar-height * -6);
|
82
|
+
bottom: ($progress-bar-height * -1);
|
83
|
+
}
|
100
84
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
85
|
+
&::before {
|
86
|
+
background-image: repeating-radial-gradient(#{$progress-bar-height / 2} #{$progress-bar-height / 2}, #{$progress-bg}, #{$progress-bg} #{$progress-bar-height / 2}, transparent #{$progress-bar-height / 2}, transparent 100%);
|
87
|
+
// scss-lint:disable VendorPrefix
|
88
|
+
background-image: -webkit-repeating-radial-gradient(#{$progress-bar-height / 2} #{$progress-bar-height / 2}, #{$progress-bg}, #{$progress-bg} #{$progress-bar-height / 2}, transparent #{$progress-bar-height / 2}, transparent 100%);
|
89
|
+
// scss-lint:enable VendorPrefix
|
90
|
+
background-position: 0 0;
|
91
|
+
background-repeat: repeat-x;
|
92
|
+
background-size: ($progress-bar-height * 3) ($progress-bar-height * 3);
|
93
|
+
content: '';
|
94
|
+
display: block;
|
95
|
+
height: $progress-bar-height;
|
96
|
+
position: absolute;
|
97
|
+
right: -100vw;
|
98
|
+
bottom: ($progress-bar-height * -1);
|
99
|
+
left: 0;
|
100
|
+
z-index: -1;
|
108
101
|
}
|
109
102
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
// position
|
118
|
-
left: 25%;
|
119
|
-
width: 75%;
|
120
|
-
}
|
121
|
-
75% {
|
122
|
-
// position
|
123
|
-
left: 100%;
|
124
|
-
width: 0%;
|
103
|
+
// Colour
|
104
|
+
@each $color, $values in $theme-colors {
|
105
|
+
&.bg-#{$color}::before {
|
106
|
+
background-image: repeating-radial-gradient(#{$progress-bar-height / 2} #{$progress-bar-height / 2}, map-get(theme-color($color), lighter), map-get(theme-color($color), lighter) #{$progress-bar-height / 2}, transparent #{$progress-bar-height / 2}, transparent 100%);
|
107
|
+
// scss-lint:disable VendorPrefix
|
108
|
+
background-image: -webkit-repeating-radial-gradient(#{$progress-bar-height / 2} #{$progress-bar-height / 2}, map-get(theme-color($color), lighter), map-get(theme-color($color), lighter) #{$progress-bar-height / 2}, transparent #{$progress-bar-height / 2}, transparent 100%);
|
109
|
+
// scss-lint:enable VendorPrefix
|
125
110
|
}
|
126
111
|
}
|
112
|
+
}
|
127
113
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
114
|
+
@keyframes progress-bar-animation {
|
115
|
+
from {
|
116
|
+
background-position: 0 0;
|
117
|
+
}
|
118
|
+
|
119
|
+
to {
|
120
|
+
background-position: ($progress-bar-height * 3) 0;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
// Indeterminate
|
127
|
+
|
128
|
+
.progress-bar-indeterminate {
|
129
|
+
border-bottom-color: $progress-bg;
|
130
|
+
position: relative;
|
131
|
+
width: 100%;
|
132
|
+
|
133
|
+
&::after,
|
134
|
+
&::before {
|
135
|
+
@include border-radius($border-radius);
|
136
|
+
|
137
|
+
animation-duration: 2s;
|
138
|
+
animation-iteration-count: infinite;
|
139
|
+
animation-timing-function: linear;
|
140
|
+
background-color: $progress-bar-bg;
|
141
|
+
width: 0%;
|
142
|
+
}
|
143
|
+
|
144
|
+
&::after {
|
145
|
+
animation-name: progress-bar-indeterminate-after;
|
146
|
+
bottom: ($progress-bar-height * -1);
|
147
|
+
z-index: 0;
|
148
|
+
}
|
149
|
+
|
150
|
+
&::before {
|
151
|
+
animation-name: progress-bar-indeterminate-before;
|
152
|
+
content: '';
|
153
|
+
display: block;
|
154
|
+
height: $progress-bar-height;
|
155
|
+
position: absolute;
|
156
|
+
bottom: ($progress-bar-height * -1);
|
157
|
+
z-index: 0;
|
158
|
+
}
|
159
|
+
|
160
|
+
// Colour
|
161
|
+
@each $color, $values in $theme-colors {
|
162
|
+
&.bg-#{$color} {
|
163
|
+
border-bottom-color: map-get(theme-color($color), lighter);
|
164
|
+
|
165
|
+
&::after,
|
166
|
+
&::before {
|
167
|
+
background-color: map-get(theme-color($color), color);
|
168
|
+
}
|
169
|
+
|
170
|
+
&::before {
|
171
|
+
background-image: none;
|
172
|
+
}
|
149
173
|
}
|
150
174
|
}
|
175
|
+
}
|
176
|
+
|
177
|
+
@keyframes progress-bar-indeterminate-after {
|
178
|
+
0% {
|
179
|
+
left: 0%;
|
180
|
+
width: 0%;
|
181
|
+
}
|
182
|
+
|
183
|
+
50% {
|
184
|
+
left: 25%;
|
185
|
+
width: 75%;
|
186
|
+
}
|
187
|
+
|
188
|
+
75% {
|
189
|
+
left: 100%;
|
190
|
+
width: 0%;
|
191
|
+
}
|
192
|
+
}
|
193
|
+
|
194
|
+
@keyframes progress-bar-indeterminate-before {
|
195
|
+
0%,
|
196
|
+
62.5% {
|
197
|
+
left: 0%;
|
198
|
+
width: 0%;
|
199
|
+
}
|
200
|
+
|
201
|
+
71.875% {
|
202
|
+
left: 0%;
|
203
|
+
width: 25%;
|
204
|
+
}
|
205
|
+
|
206
|
+
81.25% {
|
207
|
+
left: 25%;
|
208
|
+
width: 50%;
|
209
|
+
}
|
210
|
+
|
211
|
+
100% {
|
212
|
+
left: 100%;
|
213
|
+
width: 25%;
|
214
|
+
}
|
215
|
+
}
|
@@ -1,47 +1,42 @@
|
|
1
1
|
.custom-control {
|
2
|
-
|
2
|
+
color: inherit;
|
3
3
|
display: inline-flex;
|
4
4
|
font-size: $font-size-base;
|
5
5
|
margin-right: ($selection-control-spacer-x * 2);
|
6
6
|
min-height: ($font-size-base * $line-height-base);
|
7
|
-
padding-left: ($selection-control-indicator-size
|
7
|
+
padding-left: ($selection-control-indicator-size + $selection-control-spacer-x);
|
8
8
|
position: relative;
|
9
9
|
}
|
10
10
|
|
11
11
|
.custom-control-indicator {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
display: block;
|
12
|
+
align-items: center;
|
13
|
+
color: $selection-control-color;
|
14
|
+
display: flex;
|
16
15
|
height: $selection-control-indicator-size;
|
17
16
|
pointer-events: none;
|
18
17
|
position: absolute;
|
19
|
-
|
20
|
-
|
18
|
+
top: (($font-size-base * $line-height-base - $selection-control-indicator-size) / 2);
|
19
|
+
left: 0;
|
21
20
|
user-select: none;
|
22
|
-
width: $selection-control-indicator-size;
|
21
|
+
width: ($selection-control-indicator-size + $selection-control-spacer-x);
|
23
22
|
|
24
23
|
&::before {
|
24
|
+
@include transition-standard(background-color, opacity, transform);
|
25
|
+
|
25
26
|
background-color: $selection-control-radial-bg;
|
26
27
|
border-radius: 50%;
|
27
|
-
content:
|
28
|
+
content: '';
|
28
29
|
display: block;
|
29
30
|
height: ($selection-control-indicator-size * 2);
|
30
31
|
margin-top: ($selection-control-indicator-size / -2);
|
31
32
|
margin-left: ($selection-control-indicator-size / -2);
|
32
33
|
opacity: 0;
|
33
34
|
position: absolute;
|
34
|
-
|
35
|
-
|
35
|
+
top: 0;
|
36
|
+
left: 0;
|
37
|
+
transform: scale(.87, .87) translateZ(0);
|
36
38
|
width: ($selection-control-indicator-size * 2);
|
37
|
-
z-index: -1;
|
38
|
-
@include transition-standard(background-color, opacity, transform);
|
39
39
|
}
|
40
|
-
|
41
|
-
// active, focus, hover
|
42
|
-
&:active::before {
|
43
|
-
opacity: 1;
|
44
|
-
}
|
45
40
|
}
|
46
41
|
|
47
42
|
.custom-control-input {
|
@@ -49,156 +44,154 @@
|
|
49
44
|
position: absolute;
|
50
45
|
z-index: -1;
|
51
46
|
|
52
|
-
//
|
53
|
-
|
47
|
+
// Active, focus, hover
|
48
|
+
&:active,
|
49
|
+
&.focus {
|
50
|
+
~ .custom-control-indicator::before {
|
54
51
|
opacity: 1;
|
52
|
+
transform: scale(1, 1) translateZ(0);
|
55
53
|
}
|
54
|
+
}
|
56
55
|
|
57
|
-
//
|
58
|
-
|
59
|
-
|
60
|
-
|
56
|
+
// Checked
|
57
|
+
&:checked ~ {
|
58
|
+
.custom-control-indicator {
|
59
|
+
color: $selection-control-color-active;
|
61
60
|
|
62
|
-
|
63
|
-
|
64
|
-
.custom-control-indicator,
|
65
|
-
.custom-control-description {
|
66
|
-
color: $selection-control-color-disabled;
|
67
|
-
cursor: $cursor-disabled;
|
61
|
+
&::before {
|
62
|
+
background-color: hex-to-rgba($selection-control-color-active, .12);
|
68
63
|
}
|
64
|
+
}
|
65
|
+
}
|
69
66
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
67
|
+
// Disabled
|
68
|
+
&:disabled ~ {
|
69
|
+
.custom-control-indicator,
|
70
|
+
.custom-control-description {
|
71
|
+
color: $selection-control-color-disabled;
|
72
|
+
}
|
73
|
+
|
74
|
+
.custom-control-indicator::before {
|
75
|
+
display: none;
|
75
76
|
}
|
77
|
+
}
|
76
78
|
}
|
77
79
|
|
78
|
-
|
79
|
-
|
80
|
+
|
81
|
+
|
82
|
+
// Stacked layout
|
83
|
+
.custom-controls-stacked {
|
84
|
+
display: flex;
|
85
|
+
flex-direction: column;
|
86
|
+
|
87
|
+
.custom-control {
|
80
88
|
display: flex;
|
81
|
-
|
89
|
+
margin-right: 0;
|
90
|
+
margin-bottom: $selection-control-spacer-y;
|
91
|
+
}
|
92
|
+
}
|
82
93
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
94
|
+
|
95
|
+
|
96
|
+
// Checkbox
|
97
|
+
|
98
|
+
.custom-checkbox {
|
99
|
+
.custom-control-indicator::after {
|
100
|
+
@include set-material-icons;
|
101
|
+
|
102
|
+
content: $selection-control-checkbox-icon;
|
87
103
|
}
|
88
104
|
|
89
|
-
|
90
|
-
//
|
91
|
-
|
92
|
-
|
93
|
-
.custom-control-indicator {
|
94
|
-
background-image: $selection-control-checkbox-bg;
|
105
|
+
.custom-control-input {
|
106
|
+
// Checked
|
107
|
+
&:checked ~ .custom-control-indicator::after {
|
108
|
+
content: $selection-control-checkbox-icon-checked;
|
95
109
|
}
|
96
110
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
background-image: $selection-control-checkbox-bg-checked;
|
101
|
-
}
|
102
|
-
|
103
|
-
// disabled
|
104
|
-
&:disabled {
|
105
|
-
~ .custom-control-indicator {
|
106
|
-
background-image: $selection-control-checkbox-bg-disabled;
|
107
|
-
}
|
108
|
-
|
109
|
-
&:checked ~ .custom-control-indicator {
|
110
|
-
background-image: $selection-control-checkbox-bg-disabled-checked;
|
111
|
-
}
|
112
|
-
}
|
113
|
-
|
114
|
-
// indeterminate
|
115
|
-
&:indeterminate ~ .custom-control-indicator {
|
116
|
-
background-image: $selection-control-checkbox-bg-indeterminate;
|
117
|
-
}
|
111
|
+
// Indeterminate
|
112
|
+
&:indeterminate ~ .custom-control-indicator::after {
|
113
|
+
content: $selection-control-checkbox-icon-indeterminate;
|
118
114
|
}
|
119
115
|
}
|
116
|
+
}
|
120
117
|
|
121
|
-
//
|
122
|
-
// radio button
|
123
|
-
//
|
124
|
-
.custom-radio {
|
125
|
-
.custom-control-indicator {
|
126
|
-
background-image: $selection-control-radio-bg;
|
127
|
-
}
|
128
118
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
}
|
144
|
-
}
|
119
|
+
|
120
|
+
// Radio button
|
121
|
+
|
122
|
+
.custom-radio {
|
123
|
+
.custom-control-indicator::after {
|
124
|
+
@include set-material-icons;
|
125
|
+
|
126
|
+
content: $selection-control-radio-icon;
|
127
|
+
}
|
128
|
+
|
129
|
+
.custom-control-input {
|
130
|
+
// Checked
|
131
|
+
&:checked ~ .custom-control-indicator::after {
|
132
|
+
content: $selection-control-radio-icon-checked;
|
145
133
|
}
|
146
134
|
}
|
135
|
+
}
|
147
136
|
|
148
|
-
//
|
149
|
-
// switch
|
150
|
-
//
|
151
|
-
.custom-switch {
|
152
|
-
padding-left: ($selection-control-track-width / $font-size-root + $selection-control-spacer-x);
|
153
137
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
138
|
+
|
139
|
+
// Switch
|
140
|
+
|
141
|
+
.custom-switch {
|
142
|
+
padding-left: ($selection-control-track-width + $selection-control-spacer-x);
|
143
|
+
|
144
|
+
.custom-control-indicator {
|
145
|
+
@include transition-standard(background-color);
|
146
|
+
|
147
|
+
background-clip: content-box;
|
148
|
+
background-color: $selection-control-track-bg;
|
149
|
+
border: (($selection-control-indicator-size - $selection-control-track-height) / 2) solid transparent;
|
150
|
+
border-radius: $selection-control-track-height;
|
151
|
+
width: $selection-control-track-width;
|
152
|
+
|
153
|
+
&::after,
|
154
|
+
&::before {
|
155
|
+
top: (($selection-control-indicator-size - $selection-control-track-height) / -2);
|
156
|
+
left: (($selection-control-indicator-size - $selection-control-track-height) / -2);
|
157
|
+
}
|
158
|
+
|
159
|
+
&::after {
|
160
|
+
@include transition-standard(background-color, transform);
|
161
|
+
|
162
|
+
background-color: $selection-control-thumb-bg;
|
163
|
+
border-radius: 50%;
|
164
|
+
box-shadow: $selection-control-thumb-shadow;
|
165
|
+
content: '';
|
166
|
+
display: block;
|
167
|
+
height: $selection-control-indicator-size;
|
168
|
+
position: absolute;
|
169
|
+
width: $selection-control-indicator-size;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
.custom-control-input {
|
174
|
+
// Checked
|
175
|
+
&:checked ~ .custom-control-indicator {
|
176
|
+
background-color: hex-to-rgba($selection-control-color-active, .5);
|
161
177
|
|
162
178
|
&::after,
|
163
179
|
&::before {
|
164
|
-
|
165
|
-
top: (($selection-control-indicator-size - $selection-control-track-height) / -2);
|
166
|
-
left: (($selection-control-indicator-size - $selection-control-track-height) / -2);
|
180
|
+
transform: translateX($selection-control-track-width - $selection-control-indicator-size);
|
167
181
|
}
|
182
|
+
|
168
183
|
&::after {
|
169
|
-
background-color: $selection-control-
|
170
|
-
border-radius: 50%;
|
171
|
-
box-shadow: $selection-control-thumb-shadow;
|
172
|
-
content: "";
|
173
|
-
display: block;
|
174
|
-
height: $selection-control-indicator-size;
|
175
|
-
position: absolute;
|
176
|
-
width: $selection-control-indicator-size;
|
177
|
-
@include transition-standard(background-color, transform);
|
184
|
+
background-color: $selection-control-color-active;
|
178
185
|
}
|
179
186
|
}
|
180
187
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
transform: translateX($selection-control-track-width - $selection-control-indicator-size);
|
189
|
-
}
|
190
|
-
&::after {
|
191
|
-
background-color: $selection-control-color-active;
|
192
|
-
}
|
193
|
-
}
|
194
|
-
|
195
|
-
// disabled
|
196
|
-
&:disabled ~ .custom-control-indicator {
|
197
|
-
background-color: $selection-control-track-bg-disabled;
|
198
|
-
|
199
|
-
&::after {
|
200
|
-
background-color: $selection-control-thumb-bg-disabled;
|
201
|
-
}
|
202
|
-
}
|
188
|
+
// Disabled
|
189
|
+
&:disabled ~ .custom-control-indicator {
|
190
|
+
background-color: $selection-control-track-bg-disabled;
|
191
|
+
|
192
|
+
&::after {
|
193
|
+
background-color: $selection-control-thumb-bg-disabled;
|
194
|
+
}
|
203
195
|
}
|
204
196
|
}
|
197
|
+
}
|