material_design_lite-sass 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.travis.yml +11 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +108 -0
- data/Rakefile +4 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/material_design_lite-sass.rb +46 -0
- data/lib/material_design_lite/sass/engine.rb +13 -0
- data/lib/material_design_lite/sass/version.rb +5 -0
- data/material_design_lite-sass.gemspec +28 -0
- data/vendor/assets/javascripts/material.js +3919 -0
- data/vendor/assets/javascripts/material/button.js +132 -0
- data/vendor/assets/javascripts/material/checkbox.js +265 -0
- data/vendor/assets/javascripts/material/data-table.js +149 -0
- data/vendor/assets/javascripts/material/icon-toggle.js +248 -0
- data/vendor/assets/javascripts/material/layout.js +434 -0
- data/vendor/assets/javascripts/material/mdlComponentHandler.js +346 -0
- data/vendor/assets/javascripts/material/menu.js +468 -0
- data/vendor/assets/javascripts/material/progress.js +116 -0
- data/vendor/assets/javascripts/material/rAF.js +38 -0
- data/vendor/assets/javascripts/material/radio.js +257 -0
- data/vendor/assets/javascripts/material/ripple.js +244 -0
- data/vendor/assets/javascripts/material/slider.js +252 -0
- data/vendor/assets/javascripts/material/spinner.js +140 -0
- data/vendor/assets/javascripts/material/switch.js +269 -0
- data/vendor/assets/javascripts/material/tabs.js +152 -0
- data/vendor/assets/javascripts/material/textfield.js +247 -0
- data/vendor/assets/javascripts/material/tooltip.js +146 -0
- data/vendor/assets/stylesheets/_material.scss +50 -0
- data/vendor/assets/stylesheets/material/_animation.scss +34 -0
- data/vendor/assets/stylesheets/material/_badge.scss +66 -0
- data/vendor/assets/stylesheets/material/_button.scss +298 -0
- data/vendor/assets/stylesheets/material/_card.scss +111 -0
- data/vendor/assets/stylesheets/material/_checkbox.scss +175 -0
- data/vendor/assets/stylesheets/material/_color-definitions.scss +599 -0
- data/vendor/assets/stylesheets/material/_data-table.scss +105 -0
- data/vendor/assets/stylesheets/material/_functions.scss +3 -0
- data/vendor/assets/stylesheets/material/_grid.scss +180 -0
- data/vendor/assets/stylesheets/material/_icon-toggle.scss +121 -0
- data/vendor/assets/stylesheets/material/_layout.scss +580 -0
- data/vendor/assets/stylesheets/material/_mega_footer.scss +309 -0
- data/vendor/assets/stylesheets/material/_menu.scss +193 -0
- data/vendor/assets/stylesheets/material/_mini_footer.scss +88 -0
- data/vendor/assets/stylesheets/material/_mixins.scss +268 -0
- data/vendor/assets/stylesheets/material/_palette.scss +2303 -0
- data/vendor/assets/stylesheets/material/_progress.scss +115 -0
- data/vendor/assets/stylesheets/material/_radio.scss +155 -0
- data/vendor/assets/stylesheets/material/_resets.scss +55 -0
- data/vendor/assets/stylesheets/material/_ripple.scss +42 -0
- data/vendor/assets/stylesheets/material/_shadow.scss +42 -0
- data/vendor/assets/stylesheets/material/_slider.scss +396 -0
- data/vendor/assets/stylesheets/material/_spinner.scss +248 -0
- data/vendor/assets/stylesheets/material/_switch.scss +199 -0
- data/vendor/assets/stylesheets/material/_tabs.scss +115 -0
- data/vendor/assets/stylesheets/material/_textfield.scss +190 -0
- data/vendor/assets/stylesheets/material/_tooltip.scss +66 -0
- data/vendor/assets/stylesheets/material/_typography.scss +297 -0
- data/vendor/assets/stylesheets/material/_variables.scss +572 -0
- data/vendor/assets/stylesheets/material/resets/_h5bp.scss +284 -0
- data/vendor/assets/stylesheets/material/resets/_mobile.scss +25 -0
- metadata +151 -0
@@ -0,0 +1,115 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2015 Google Inc. All Rights Reserved.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
@import "variables";
|
18
|
+
|
19
|
+
.mdl-progress {
|
20
|
+
display: block;
|
21
|
+
position: relative;
|
22
|
+
height: $bar-height;
|
23
|
+
width: 500px;
|
24
|
+
}
|
25
|
+
|
26
|
+
.mdl-progress > .bar {
|
27
|
+
display: block;
|
28
|
+
position: absolute;
|
29
|
+
top: 0;
|
30
|
+
bottom: 0;
|
31
|
+
width: 0%;
|
32
|
+
transition: width 0.2s $animation-curve-default;
|
33
|
+
}
|
34
|
+
|
35
|
+
.mdl-progress > .progressbar {
|
36
|
+
background-color: $progress-main-color;
|
37
|
+
z-index: 1;
|
38
|
+
left: 0;
|
39
|
+
}
|
40
|
+
|
41
|
+
.mdl-progress > .bufferbar {
|
42
|
+
background-image: linear-gradient(to right, $progress-secondary-color, $progress-secondary-color),
|
43
|
+
linear-gradient(to right, $progress-main-color, $progress-main-color);
|
44
|
+
z-index: 0;
|
45
|
+
left: 0;
|
46
|
+
}
|
47
|
+
|
48
|
+
.mdl-progress > .auxbar {
|
49
|
+
right: 0;
|
50
|
+
}
|
51
|
+
|
52
|
+
// Webkit only
|
53
|
+
@supports (-webkit-appearance:none) {
|
54
|
+
.mdl-progress:not(.mdl-progress__indeterminate):not(.mdl-progress__indeterminate) > .auxbar {
|
55
|
+
background-image: linear-gradient(to right, $progress-secondary-color, $progress-secondary-color),
|
56
|
+
linear-gradient(to right, $progress-main-color, $progress-main-color);
|
57
|
+
mask: url('/images/buffer.svg?embed');
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
.mdl-progress:not(.mdl-progress__indeterminate) > .auxbar {
|
62
|
+
background-image: linear-gradient(to right, $progress-fallback-buffer-color, $progress-fallback-buffer-color),
|
63
|
+
linear-gradient(to right, $progress-main-color, $progress-main-color);
|
64
|
+
}
|
65
|
+
|
66
|
+
.mdl-progress.mdl-progress__indeterminate > .bar1 {
|
67
|
+
background-color: $progress-main-color;
|
68
|
+
animation-name: indeterminate1;
|
69
|
+
animation-duration: 2s;
|
70
|
+
animation-iteration-count: infinite;
|
71
|
+
animation-timing-function: linear;
|
72
|
+
}
|
73
|
+
|
74
|
+
.mdl-progress.mdl-progress__indeterminate > .bar3 {
|
75
|
+
background-image: none;
|
76
|
+
background-color: $progress-main-color;
|
77
|
+
animation-name: indeterminate2;
|
78
|
+
animation-duration: 2s;
|
79
|
+
animation-iteration-count: infinite;
|
80
|
+
animation-timing-function: linear;
|
81
|
+
}
|
82
|
+
|
83
|
+
@keyframes indeterminate1 {
|
84
|
+
0% {
|
85
|
+
left: 0%;
|
86
|
+
width: 0%;
|
87
|
+
}
|
88
|
+
50% {
|
89
|
+
left: 25%;
|
90
|
+
width: 75%;
|
91
|
+
}
|
92
|
+
75% {
|
93
|
+
left: 100%;
|
94
|
+
width: 0%;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
@keyframes indeterminate2 {
|
99
|
+
0% {
|
100
|
+
left: 0%;
|
101
|
+
width: 0%;
|
102
|
+
}
|
103
|
+
50% {
|
104
|
+
left: 0%;
|
105
|
+
width: 0%;
|
106
|
+
}
|
107
|
+
75% {
|
108
|
+
left: 0%;
|
109
|
+
width: 25%;
|
110
|
+
}
|
111
|
+
100% {
|
112
|
+
left: 100%;
|
113
|
+
width: 0%;
|
114
|
+
}
|
115
|
+
}
|
@@ -0,0 +1,155 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2015 Google Inc. All Rights Reserved.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
@import "variables";
|
18
|
+
@import "mixins";
|
19
|
+
|
20
|
+
.mdl-radio {
|
21
|
+
position: relative;
|
22
|
+
|
23
|
+
font-size: 16px;
|
24
|
+
line-height: $radio-label-height;
|
25
|
+
|
26
|
+
display: inline-block;
|
27
|
+
|
28
|
+
box-sizing: border-box;
|
29
|
+
margin: 0;
|
30
|
+
padding-left: 0;
|
31
|
+
|
32
|
+
&.is-upgraded {
|
33
|
+
padding-left: $radio-button-size + $radio-padding;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.mdl-radio__button {
|
38
|
+
line-height: $radio-label-height;
|
39
|
+
|
40
|
+
.mdl-radio.is-upgraded & {
|
41
|
+
// Hide input element, while still making it respond to focus.
|
42
|
+
position: absolute;
|
43
|
+
width: 0;
|
44
|
+
height: 0;
|
45
|
+
margin: 0;
|
46
|
+
padding: 0;
|
47
|
+
opacity: 0;
|
48
|
+
-ms-appearance: none;
|
49
|
+
-moz-appearance: none;
|
50
|
+
-webkit-appearance: none;
|
51
|
+
appearance: none;
|
52
|
+
border: none;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
.mdl-radio__outer-circle {
|
57
|
+
position: absolute;
|
58
|
+
top: $radio-top-offset;
|
59
|
+
left: 0;
|
60
|
+
|
61
|
+
display: inline-block;
|
62
|
+
|
63
|
+
box-sizing: border-box;
|
64
|
+
width: $radio-button-size;
|
65
|
+
height: $radio-button-size;
|
66
|
+
margin: 0;
|
67
|
+
|
68
|
+
cursor: pointer;
|
69
|
+
|
70
|
+
border: 2px solid $radio-off-color;
|
71
|
+
border-radius: 50%;
|
72
|
+
|
73
|
+
z-index: 2;
|
74
|
+
|
75
|
+
.mdl-radio.is-checked & {
|
76
|
+
border: 2px solid $radio-color;
|
77
|
+
}
|
78
|
+
|
79
|
+
.mdl-radio.is-disabled & {
|
80
|
+
border: 2px solid $radio-disabled-color;
|
81
|
+
cursor: auto;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
.mdl-radio__inner-circle {
|
86
|
+
position: absolute;
|
87
|
+
z-index: 1;
|
88
|
+
margin: 0;
|
89
|
+
top: $radio-top-offset + $radio-inner-margin;
|
90
|
+
left: $radio-inner-margin;
|
91
|
+
|
92
|
+
box-sizing: border-box;
|
93
|
+
width: $radio-button-size - ($radio-inner-margin * 2);
|
94
|
+
height: $radio-button-size - ($radio-inner-margin * 2);
|
95
|
+
|
96
|
+
cursor: pointer;
|
97
|
+
|
98
|
+
@include material-animation-default(0.28s);
|
99
|
+
transition-property: transform;
|
100
|
+
transform: scale3d(0, 0, 0);
|
101
|
+
|
102
|
+
border-radius: 50%;
|
103
|
+
background: $radio-color;
|
104
|
+
|
105
|
+
.mdl-radio.is-checked & {
|
106
|
+
transform: scale3d(1, 1, 1);
|
107
|
+
}
|
108
|
+
|
109
|
+
.mdl-radio.is-disabled & {
|
110
|
+
background: $radio-disabled-color;
|
111
|
+
cursor: auto;
|
112
|
+
}
|
113
|
+
|
114
|
+
.mdl-radio.is-focused & {
|
115
|
+
box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0.1);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
.mdl-radio__label {
|
120
|
+
cursor: pointer;
|
121
|
+
|
122
|
+
.mdl-radio.is-disabled & {
|
123
|
+
color: $radio-disabled-color;
|
124
|
+
cursor: auto;
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
.mdl-radio__ripple-container {
|
129
|
+
position: absolute;
|
130
|
+
z-index: 2;
|
131
|
+
top: -(($radio-ripple-size - $radio-label-height) / 2);
|
132
|
+
left: -(($radio-ripple-size - $radio-button-size) / 2);
|
133
|
+
|
134
|
+
box-sizing: border-box;
|
135
|
+
width: $radio-ripple-size;
|
136
|
+
height: $radio-ripple-size;
|
137
|
+
border-radius: 50%;
|
138
|
+
|
139
|
+
cursor: pointer;
|
140
|
+
|
141
|
+
overflow: hidden;
|
142
|
+
-webkit-mask-image: -webkit-radial-gradient(circle, white, black);
|
143
|
+
|
144
|
+
& .mdl-ripple {
|
145
|
+
background: $radio-color;
|
146
|
+
}
|
147
|
+
|
148
|
+
.mdl-radio.is-disabled & {
|
149
|
+
cursor: auto;
|
150
|
+
}
|
151
|
+
|
152
|
+
.mdl-radio.is-disabled & .mdl-ripple {
|
153
|
+
background: transparent;
|
154
|
+
}
|
155
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2015 Google Inc. All Rights Reserved.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
@import "resets/h5bp";
|
18
|
+
@import "resets/mobile";
|
19
|
+
|
20
|
+
/*
|
21
|
+
* Make html take up the entire screen
|
22
|
+
* Then set touch-action to avoid touch delay on mobile IE
|
23
|
+
*/
|
24
|
+
html {
|
25
|
+
width: 100%;
|
26
|
+
height: 100%;
|
27
|
+
-ms-touch-action: manipulation;
|
28
|
+
touch-action: manipulation;
|
29
|
+
}
|
30
|
+
|
31
|
+
/*
|
32
|
+
* Make body take up the entire screen
|
33
|
+
* Remove body margin so layout containers don't cause extra overflow.
|
34
|
+
*/
|
35
|
+
body {
|
36
|
+
width: 100%;
|
37
|
+
min-height: 100%;
|
38
|
+
margin: 0;
|
39
|
+
}
|
40
|
+
|
41
|
+
/*
|
42
|
+
* Main display reset for IE support.
|
43
|
+
* Source: http://weblog.west-wind.com/posts/2015/Jan/12/main-HTML5-Tag-not-working-in-Internet-Explorer-91011
|
44
|
+
*/
|
45
|
+
main {
|
46
|
+
display: block;
|
47
|
+
}
|
48
|
+
|
49
|
+
/*
|
50
|
+
* Apply no display to elements with the hidden attribute.
|
51
|
+
* IE 9 and 10 support.
|
52
|
+
*/
|
53
|
+
*[hidden] {
|
54
|
+
display: none !important;
|
55
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2015 Google Inc. All Rights Reserved.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
@import "variables";
|
18
|
+
|
19
|
+
.mdl-ripple {
|
20
|
+
background : $ripple-bg-color;
|
21
|
+
border-radius : 50%;
|
22
|
+
height : 50px;
|
23
|
+
left : 0;
|
24
|
+
opacity : 0;
|
25
|
+
pointer-events : none;
|
26
|
+
position : absolute;
|
27
|
+
top : 0;
|
28
|
+
transform : translate(-50%, -50%);
|
29
|
+
width : 50px;
|
30
|
+
overflow : hidden;
|
31
|
+
|
32
|
+
&.is-animating {
|
33
|
+
transition: transform 0.3s $animation-curve-linear-out-slow-in,
|
34
|
+
width 0.3s $animation-curve-linear-out-slow-in,
|
35
|
+
height 0.3s $animation-curve-linear-out-slow-in,
|
36
|
+
opacity 0.6s $animation-curve-linear-out-slow-in;
|
37
|
+
}
|
38
|
+
|
39
|
+
&.is-visible {
|
40
|
+
opacity: 0.3;
|
41
|
+
}
|
42
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2015 Google Inc. All Rights Reserved.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
@import "variables";
|
18
|
+
@import "mixins";
|
19
|
+
|
20
|
+
.mdl-shadow--2dp {
|
21
|
+
@include shadow-2dp();
|
22
|
+
}
|
23
|
+
|
24
|
+
.mdl-shadow--3dp {
|
25
|
+
@include shadow-3dp();
|
26
|
+
}
|
27
|
+
|
28
|
+
.mdl-shadow--4dp {
|
29
|
+
@include shadow-4dp();
|
30
|
+
}
|
31
|
+
|
32
|
+
.mdl-shadow--6dp {
|
33
|
+
@include shadow-6dp();
|
34
|
+
}
|
35
|
+
|
36
|
+
.mdl-shadow--8dp {
|
37
|
+
@include shadow-8dp();
|
38
|
+
}
|
39
|
+
|
40
|
+
.mdl-shadow--16dp {
|
41
|
+
@include shadow-16dp();
|
42
|
+
}
|
@@ -0,0 +1,396 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2015 Google Inc. All Rights Reserved.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
@import "variables";
|
18
|
+
|
19
|
+
// Some CSS magic to target only IE.
|
20
|
+
_:-ms-input-placeholder, :root .mdl-slider.mdl-slider.is-upgraded {
|
21
|
+
-ms-appearance: none;
|
22
|
+
// The thumb can't overflow the track or the rest of the control in IE, so we
|
23
|
+
// need to make it tall enough to contain the largest version of the thumb.
|
24
|
+
height: 32px;
|
25
|
+
margin: 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
// Slider component (styled input[type=range]).
|
29
|
+
.mdl-slider {
|
30
|
+
width: calc(100% - 40px);
|
31
|
+
margin: 0 20px;
|
32
|
+
|
33
|
+
&.is-upgraded {
|
34
|
+
-webkit-appearance: none;
|
35
|
+
-moz-appearance: none;
|
36
|
+
appearance: none;
|
37
|
+
height: 2px;
|
38
|
+
background: transparent;
|
39
|
+
-webkit-user-select: none;
|
40
|
+
-moz-user-select: none;
|
41
|
+
user-select: none;
|
42
|
+
outline: 0;
|
43
|
+
padding: 0;
|
44
|
+
color: $range-color;
|
45
|
+
align-self: center;
|
46
|
+
z-index: 1;
|
47
|
+
|
48
|
+
|
49
|
+
// Disable default focus on Firefox.
|
50
|
+
&::-moz-focus-outer {
|
51
|
+
border: 0;
|
52
|
+
}
|
53
|
+
|
54
|
+
// Disable tooltip on IE.
|
55
|
+
&::-ms-tooltip {
|
56
|
+
display: none;
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
/**************************** Tracks ****************************/
|
61
|
+
&::-webkit-slider-runnable-track {
|
62
|
+
background: transparent;
|
63
|
+
}
|
64
|
+
|
65
|
+
&::-moz-range-track {
|
66
|
+
background: transparent;
|
67
|
+
border: none;
|
68
|
+
}
|
69
|
+
|
70
|
+
&::-ms-track {
|
71
|
+
background: none;
|
72
|
+
color: transparent;
|
73
|
+
height: 2px;
|
74
|
+
width: 100%;
|
75
|
+
border: none;
|
76
|
+
}
|
77
|
+
|
78
|
+
&::-ms-fill-lower {
|
79
|
+
padding: 0;
|
80
|
+
// Margin on -ms-track doesn't work right, so we use gradients on the
|
81
|
+
// fills.
|
82
|
+
background: linear-gradient(to right,
|
83
|
+
transparent,
|
84
|
+
transparent 16px,
|
85
|
+
$range-color 16px,
|
86
|
+
$range-color 0);
|
87
|
+
}
|
88
|
+
|
89
|
+
&::-ms-fill-upper {
|
90
|
+
padding: 0;
|
91
|
+
// Margin on -ms-track doesn't work right, so we use gradients on the
|
92
|
+
// fills.
|
93
|
+
background: linear-gradient(to left,
|
94
|
+
transparent,
|
95
|
+
transparent 16px,
|
96
|
+
$range-bg-color 16px,
|
97
|
+
$range-bg-color 0);
|
98
|
+
}
|
99
|
+
|
100
|
+
|
101
|
+
/**************************** Thumbs ****************************/
|
102
|
+
&::-webkit-slider-thumb {
|
103
|
+
-webkit-appearance: none;
|
104
|
+
width: 12px;
|
105
|
+
height: 12px;
|
106
|
+
box-sizing: border-box;
|
107
|
+
border-radius: 50%;
|
108
|
+
background: $range-color;
|
109
|
+
border: none;
|
110
|
+
transition: transform 0.18s $animation-curve-default,
|
111
|
+
border 0.18s $animation-curve-default,
|
112
|
+
box-shadow 0.18s $animation-curve-default,
|
113
|
+
background 0.28s $animation-curve-default;
|
114
|
+
}
|
115
|
+
|
116
|
+
&::-moz-range-thumb {
|
117
|
+
-moz-appearance: none;
|
118
|
+
width: 12px;
|
119
|
+
height: 12px;
|
120
|
+
box-sizing: border-box;
|
121
|
+
border-radius: 50%;
|
122
|
+
background-image: none;
|
123
|
+
background: $range-color;
|
124
|
+
border: none;
|
125
|
+
// -moz-range-thumb doesn't currently support transitions.
|
126
|
+
}
|
127
|
+
|
128
|
+
&:focus:not(:active)::-webkit-slider-thumb {
|
129
|
+
box-shadow: 0 0 0 10px $range-faded-color;
|
130
|
+
}
|
131
|
+
|
132
|
+
&:focus:not(:active)::-moz-range-thumb {
|
133
|
+
box-shadow: 0 0 0 10px $range-faded-color;
|
134
|
+
}
|
135
|
+
|
136
|
+
&:active::-webkit-slider-thumb {
|
137
|
+
background-image: none;
|
138
|
+
background: $range-color;
|
139
|
+
transform: scale(1.5);
|
140
|
+
}
|
141
|
+
|
142
|
+
&:active::-moz-range-thumb {
|
143
|
+
background-image: none;
|
144
|
+
background: $range-color;
|
145
|
+
transform: scale(1.5);
|
146
|
+
}
|
147
|
+
|
148
|
+
&::-ms-thumb {
|
149
|
+
width: 32px;
|
150
|
+
height: 32px;
|
151
|
+
border: none;
|
152
|
+
border-radius: 50%;
|
153
|
+
background: $range-color;
|
154
|
+
transform: scale(0.375);
|
155
|
+
// -ms-thumb doesn't currently support transitions, but leaving this here
|
156
|
+
// in case support ever gets added.
|
157
|
+
transition: transform 0.18s $animation-curve-default,
|
158
|
+
background 0.28s $animation-curve-default;
|
159
|
+
}
|
160
|
+
|
161
|
+
&:focus:not(:active)::-ms-thumb {
|
162
|
+
background: radial-gradient(circle closest-side,
|
163
|
+
$range-color 0%,
|
164
|
+
$range-color 37.5%,
|
165
|
+
$range-faded-color 37.5%,
|
166
|
+
$range-faded-color 100%);
|
167
|
+
transform: scale(1);
|
168
|
+
}
|
169
|
+
|
170
|
+
&:active::-ms-thumb {
|
171
|
+
background: $range-color;
|
172
|
+
transform: scale(0.5625);
|
173
|
+
}
|
174
|
+
|
175
|
+
|
176
|
+
/**************************** 0-value ****************************/
|
177
|
+
&.is-lowest-value::-webkit-slider-thumb {
|
178
|
+
border: 2px solid $range-bg-color;
|
179
|
+
background: transparent;
|
180
|
+
}
|
181
|
+
|
182
|
+
&.is-lowest-value::-moz-range-thumb {
|
183
|
+
border: 2px solid $range-bg-color;
|
184
|
+
background: transparent;
|
185
|
+
}
|
186
|
+
|
187
|
+
&.is-lowest-value ~
|
188
|
+
.mdl-slider__background-flex > .mdl-slider__background-upper {
|
189
|
+
left: 6px;
|
190
|
+
}
|
191
|
+
|
192
|
+
&.is-lowest-value:focus:not(:active)::-webkit-slider-thumb {
|
193
|
+
box-shadow: 0 0 0 10px $range-bg-focus-color;
|
194
|
+
background: $range-bg-focus-color;
|
195
|
+
}
|
196
|
+
|
197
|
+
&.is-lowest-value:focus:not(:active)::-moz-range-thumb {
|
198
|
+
box-shadow: 0 0 0 10px $range-bg-focus-color;
|
199
|
+
background: $range-bg-focus-color;
|
200
|
+
}
|
201
|
+
|
202
|
+
&.is-lowest-value:active::-webkit-slider-thumb {
|
203
|
+
border: 1.6px solid $range-bg-color;
|
204
|
+
transform: scale(1.5);
|
205
|
+
}
|
206
|
+
|
207
|
+
&.is-lowest-value:active ~
|
208
|
+
.mdl-slider__background-flex > .mdl-slider__background-upper {
|
209
|
+
left: 9px;
|
210
|
+
}
|
211
|
+
|
212
|
+
&.is-lowest-value:active::-moz-range-thumb {
|
213
|
+
border: 1.5px solid $range-bg-color;
|
214
|
+
transform: scale(1.5);
|
215
|
+
}
|
216
|
+
|
217
|
+
&.is-lowest-value::-ms-thumb {
|
218
|
+
background: radial-gradient(circle closest-side,
|
219
|
+
transparent 0%,
|
220
|
+
transparent 66.67%,
|
221
|
+
$range-bg-color 66.67%,
|
222
|
+
$range-bg-color 100%);
|
223
|
+
}
|
224
|
+
|
225
|
+
&.is-lowest-value:focus:not(:active)::-ms-thumb {
|
226
|
+
background: radial-gradient(circle closest-side,
|
227
|
+
$range-bg-focus-color 0%,
|
228
|
+
$range-bg-focus-color 25%,
|
229
|
+
$range-bg-color 25%,
|
230
|
+
$range-bg-color 37.5%,
|
231
|
+
$range-bg-focus-color 37.5%,
|
232
|
+
$range-bg-focus-color 100%);
|
233
|
+
transform: scale(1);
|
234
|
+
}
|
235
|
+
|
236
|
+
&.is-lowest-value:active::-ms-thumb {
|
237
|
+
transform: scale(0.5625);
|
238
|
+
background: radial-gradient(circle closest-side,
|
239
|
+
transparent 0%,
|
240
|
+
transparent 77.78%,
|
241
|
+
$range-bg-color 77.78%,
|
242
|
+
$range-bg-color 100%);
|
243
|
+
}
|
244
|
+
|
245
|
+
&.is-lowest-value::-ms-fill-lower {
|
246
|
+
background: transparent;
|
247
|
+
}
|
248
|
+
|
249
|
+
&.is-lowest-value::-ms-fill-upper {
|
250
|
+
margin-left: 6px;
|
251
|
+
}
|
252
|
+
|
253
|
+
&.is-lowest-value:active::-ms-fill-upper {
|
254
|
+
margin-left: 9px;
|
255
|
+
}
|
256
|
+
|
257
|
+
/**************************** Disabled ****************************/
|
258
|
+
|
259
|
+
&:disabled:focus::-webkit-slider-thumb,
|
260
|
+
&:disabled:active::-webkit-slider-thumb,
|
261
|
+
&:disabled::-webkit-slider-thumb {
|
262
|
+
transform: scale(0.667);
|
263
|
+
background: $range-bg-color;
|
264
|
+
}
|
265
|
+
|
266
|
+
&:disabled:focus::-moz-range-thumb,
|
267
|
+
&:disabled:active::-moz-range-thumb,
|
268
|
+
&:disabled::-moz-range-thumb {
|
269
|
+
transform: scale(0.667);
|
270
|
+
background: $range-bg-color;
|
271
|
+
}
|
272
|
+
|
273
|
+
&:disabled ~
|
274
|
+
.mdl-slider__background-flex > .mdl-slider__background-lower {
|
275
|
+
background-color: $range-bg-color;
|
276
|
+
left: -6px;
|
277
|
+
}
|
278
|
+
|
279
|
+
&:disabled ~
|
280
|
+
.mdl-slider__background-flex > .mdl-slider__background-upper {
|
281
|
+
left: 6px;
|
282
|
+
}
|
283
|
+
|
284
|
+
&.is-lowest-value:disabled:focus::-webkit-slider-thumb,
|
285
|
+
&.is-lowest-value:disabled:active::-webkit-slider-thumb,
|
286
|
+
&.is-lowest-value:disabled::-webkit-slider-thumb {
|
287
|
+
border: 3px solid $range-bg-color;
|
288
|
+
background: transparent;
|
289
|
+
transform: scale(0.667);
|
290
|
+
}
|
291
|
+
|
292
|
+
&.is-lowest-value:disabled:focus::-moz-range-thumb,
|
293
|
+
&.is-lowest-value:disabled:active::-moz-range-thumb,
|
294
|
+
&.is-lowest-value:disabled::-moz-range-thumb {
|
295
|
+
border: 3px solid $range-bg-color;
|
296
|
+
background: transparent;
|
297
|
+
transform: scale(0.667);
|
298
|
+
}
|
299
|
+
|
300
|
+
&.is-lowest-value:disabled:active ~
|
301
|
+
.mdl-slider__background-flex > .mdl-slider__background-upper {
|
302
|
+
left: 6px;
|
303
|
+
}
|
304
|
+
|
305
|
+
&:disabled:focus::-ms-thumb,
|
306
|
+
&:disabled:active::-ms-thumb,
|
307
|
+
&:disabled::-ms-thumb {
|
308
|
+
transform: scale(0.25);
|
309
|
+
background: $range-bg-color;
|
310
|
+
}
|
311
|
+
|
312
|
+
&.is-lowest-value:disabled:focus::-ms-thumb,
|
313
|
+
&.is-lowest-value:disabled:active::-ms-thumb,
|
314
|
+
&.is-lowest-value:disabled::-ms-thumb {
|
315
|
+
transform: scale(0.25);
|
316
|
+
background: radial-gradient(circle closest-side,
|
317
|
+
transparent 0%,
|
318
|
+
transparent 50%,
|
319
|
+
$range-bg-color 50%,
|
320
|
+
$range-bg-color 100%);
|
321
|
+
}
|
322
|
+
|
323
|
+
&:disabled::-ms-fill-lower {
|
324
|
+
margin-right: 6px;
|
325
|
+
background: linear-gradient(to right,
|
326
|
+
transparent,
|
327
|
+
transparent 25px,
|
328
|
+
$range-bg-color 25px,
|
329
|
+
$range-bg-color 0);
|
330
|
+
}
|
331
|
+
|
332
|
+
&:disabled::-ms-fill-upper {
|
333
|
+
margin-left: 6px;
|
334
|
+
}
|
335
|
+
|
336
|
+
&.is-lowest-value:disabled:active::-ms-fill-upper {
|
337
|
+
margin-left: 6px;
|
338
|
+
}
|
339
|
+
}
|
340
|
+
}
|
341
|
+
|
342
|
+
// Since we need to specify a height of 32px in IE, we add a class here for a
|
343
|
+
// container that brings it back to a reasonable height.
|
344
|
+
.mdl-slider__ie-container {
|
345
|
+
height: 18px;
|
346
|
+
overflow: visible;
|
347
|
+
border: none;
|
348
|
+
margin: none;
|
349
|
+
padding: none;
|
350
|
+
}
|
351
|
+
|
352
|
+
// We use a set of divs behind the track to style it in all non-IE browsers.
|
353
|
+
// This one contains both the background and the slider.
|
354
|
+
.mdl-slider__container {
|
355
|
+
height: 18px;
|
356
|
+
position: relative;
|
357
|
+
background: none;
|
358
|
+
display: flex;
|
359
|
+
flex-direction: row;
|
360
|
+
}
|
361
|
+
|
362
|
+
// This one sets up a flex box for the styled upper and lower portions of the
|
363
|
+
// the slider track.
|
364
|
+
.mdl-slider__background-flex {
|
365
|
+
background: transparent;
|
366
|
+
position: absolute;
|
367
|
+
height: 2px;
|
368
|
+
width: calc(100% - 52px);
|
369
|
+
top: 50%;
|
370
|
+
left: 0;
|
371
|
+
margin: 0 26px;
|
372
|
+
display: flex;
|
373
|
+
overflow: hidden;
|
374
|
+
border: 0;
|
375
|
+
padding: 0;
|
376
|
+
transform: translate(0, -1px);
|
377
|
+
}
|
378
|
+
|
379
|
+
// This one styles the lower part of the slider track.
|
380
|
+
.mdl-slider__background-lower {
|
381
|
+
background: $range-color;
|
382
|
+
flex: 0;
|
383
|
+
position: relative;
|
384
|
+
border: 0;
|
385
|
+
padding: 0;
|
386
|
+
}
|
387
|
+
|
388
|
+
// This one styles the upper part of the slider track.
|
389
|
+
.mdl-slider__background-upper {
|
390
|
+
background: $range-bg-color;
|
391
|
+
flex: 0;
|
392
|
+
position: relative;
|
393
|
+
border: 0;
|
394
|
+
padding: 0;
|
395
|
+
transition: left 0.18s $animation-curve-default
|
396
|
+
}
|