material_components_web-sass 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79061058930e26f2c210e2375f51b119f089cdeb
4
- data.tar.gz: 0fa83684a9a3f04ebf42cc34e38a2ceec8a79a41
3
+ metadata.gz: d4511af5460a1142942fada8f0ad54237ad47809
4
+ data.tar.gz: f3a44599a76ab55c581d9cec61f384d8447ad3f0
5
5
  SHA512:
6
- metadata.gz: c10a922113ba438ebbed85d62cfb9d7792f2c4d5c82185724d89e9505314897a4769f56bc85c293ab6b299fe60d2a99bfbf2569e210c7fb76a7da81ec6947a4c
7
- data.tar.gz: 470bcadf8dcb3bcbc7e919c57e68a5a214098ebc5d172e0d971e4504c128a05bb6c2e2368891b0f9129c7f8f805c12f8acb8acabb7cb9d46f498355e3cb7146e
6
+ metadata.gz: a372357430cb922e09f3a9453a00b3b04d75cef53581e5b695db3161b35fbff37f8ceee6826c46eb957bdc54484aa14266d2193bf290fa964a7fc48e5c045db6
7
+ data.tar.gz: 922affc5910a85bcdb2e58d214eccd05a251426f7e5708c34ec31d0ec04beaf90ebc444b5e69475ac2e159881b004c1c5d31ecc8504bb1d3e2dd8ec541e5a032
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.6.0 (2017-03-06)
2
+
3
+ - Update assets to match upstream version
4
+
5
+ Library version:
6
+
7
+ - Material Components for the web v0.6.0
8
+ - Material Icons v3.0.0
9
+
1
10
  ## 0.5.0 (2017-02-21)
2
11
 
3
12
  - Update assets to match upstream version
@@ -1,5 +1,5 @@
1
1
  module MaterialComponentsWeb
2
2
  module Sass
3
- VERSION = '0.5.0'.freeze
3
+ VERSION = '0.6.0'.freeze
4
4
  end
5
5
  end
@@ -1611,6 +1611,9 @@ var MDCSelect = function (_MDCComponent) {
1611
1611
  getTextForOptionAtIndex: function getTextForOptionAtIndex(index) {
1612
1612
  return _this2.options[index].textContent;
1613
1613
  },
1614
+ getValueForOptionAtIndex: function getValueForOptionAtIndex(index) {
1615
+ return _this2.options[index].id || _this2.options[index].textContent;
1616
+ },
1614
1617
  setAttrForOptionAtIndex: function setAttrForOptionAtIndex(index, attr, value) {
1615
1618
  return _this2.options[index].setAttribute(attr, value);
1616
1619
  },
@@ -1647,6 +1650,11 @@ var MDCSelect = function (_MDCComponent) {
1647
1650
  this.disabled = true;
1648
1651
  }
1649
1652
  }
1653
+ }, {
1654
+ key: 'value',
1655
+ get: function get() {
1656
+ return this.foundation_.getValue();
1657
+ }
1650
1658
  }, {
1651
1659
  key: 'options',
1652
1660
  get: function get() {
@@ -3643,7 +3651,11 @@ var MDCSimpleMenuFoundation = function (_MDCFoundation) {
3643
3651
  );
3644
3652
  },
3645
3653
  setTransformOrigin: function setTransformOrigin() /* origin: string */{},
3646
- setPosition: function setPosition() /* position: { top: string, right: string, bottom: string, left: string } */{}
3654
+ setPosition: function setPosition() /* position: { top: string, right: string, bottom: string, left: string } */{},
3655
+ getAccurateTime: function getAccurateTime() {
3656
+ return (/* number */0
3657
+ );
3658
+ }
3647
3659
  };
3648
3660
  }
3649
3661
  }]);
@@ -3763,7 +3775,7 @@ var MDCSimpleMenuFoundation = function (_MDCFoundation) {
3763
3775
  value: function animationLoop_() {
3764
3776
  var _this2 = this;
3765
3777
 
3766
- var time = window.performance.now();
3778
+ var time = this.adapter_.getAccurateTime();
3767
3779
  var _MDCSimpleMenuFoundat3 = MDCSimpleMenuFoundation.numbers,
3768
3780
  TRANSITION_DURATION_MS = _MDCSimpleMenuFoundat3.TRANSITION_DURATION_MS,
3769
3781
  TRANSITION_X1 = _MDCSimpleMenuFoundat3.TRANSITION_X1,
@@ -3825,7 +3837,7 @@ var MDCSimpleMenuFoundation = function (_MDCFoundation) {
3825
3837
  value: function animateMenu_() {
3826
3838
  var _this3 = this;
3827
3839
 
3828
- this.startTime_ = window.performance.now();
3840
+ this.startTime_ = this.adapter_.getAccurateTime();
3829
3841
  this.startScaleX_ = this.scaleX_;
3830
3842
  this.startScaleY_ = this.scaleY_;
3831
3843
 
@@ -4229,6 +4241,9 @@ var MDCSimpleMenu = function (_MDCComponent) {
4229
4241
  _this2.root_.style.right = 'right' in position ? position.right : null;
4230
4242
  _this2.root_.style.top = 'top' in position ? position.top : null;
4231
4243
  _this2.root_.style.bottom = 'bottom' in position ? position.bottom : null;
4244
+ },
4245
+ getAccurateTime: function getAccurateTime() {
4246
+ return window.performance.now();
4232
4247
  }
4233
4248
  });
4234
4249
  }
@@ -4790,6 +4805,7 @@ var MDCRippleFoundation = function (_MDCFoundation) {
4790
4805
  VAR_FG_UNBOUNDED_TRANSFORM_DURATION = _MDCRippleFoundation$4.VAR_FG_UNBOUNDED_TRANSFORM_DURATION,
4791
4806
  VAR_FG_APPROX_XF = _MDCRippleFoundation$4.VAR_FG_APPROX_XF;
4792
4807
 
4808
+
4793
4809
  this.adapter_.updateCssVariable(VAR_FG_APPROX_XF, 'scale(' + approxCurScale + ')');
4794
4810
  this.adapter_.updateCssVariable(VAR_FG_UNBOUNDED_OPACITY_DURATION, opacityDuration + 'ms');
4795
4811
  this.adapter_.updateCssVariable(VAR_FG_UNBOUNDED_TRANSFORM_DURATION, transformDuration + 'ms');
@@ -5071,6 +5087,10 @@ var MDCSelectFoundation = function (_MDCFoundation) {
5071
5087
  return (/* index: number */ /* string */''
5072
5088
  );
5073
5089
  },
5090
+ getValueForOptionAtIndex: function getValueForOptionAtIndex() {
5091
+ return (/* index: number */ /* string */''
5092
+ );
5093
+ },
5074
5094
  setAttrForOptionAtIndex: function setAttrForOptionAtIndex() /* index: number, attr: string, value: string */{},
5075
5095
  rmAttrForOptionAtIndex: function rmAttrForOptionAtIndex() /* index: number, attr: string */{},
5076
5096
  getOffsetTopForOptionAtIndex: function getOffsetTopForOptionAtIndex() {
@@ -5143,6 +5163,11 @@ var MDCSelectFoundation = function (_MDCFoundation) {
5143
5163
  this.adapter_.deregisterMenuInteractionHandler('MDCSimpleMenu:selected', this.selectionHandler_);
5144
5164
  this.adapter_.deregisterMenuInteractionHandler('MDCSimpleMenu:cancel', this.cancelHandler_);
5145
5165
  }
5166
+ }, {
5167
+ key: 'getValue',
5168
+ value: function getValue() {
5169
+ return this.selectedIndex_ >= 0 ? this.adapter_.getValueForOptionAtIndex(this.selectedIndex_) : '';
5170
+ }
5146
5171
  }, {
5147
5172
  key: 'getSelectedIndex',
5148
5173
  value: function getSelectedIndex() {
@@ -5339,17 +5364,9 @@ var cssClasses = {
5339
5364
  };
5340
5365
 
5341
5366
  var strings = {
5342
- get TEXT_SELECTOR() {
5343
- return '.' + cssClasses.TEXT;
5344
- },
5345
-
5346
- get ACTION_WRAPPER_SELECTOR() {
5347
- return '.' + cssClasses.ACTION_WRAPPER;
5348
- },
5349
-
5350
- get ACTION_BUTTON_SELECTOR() {
5351
- return '.' + cssClasses.ACTION_BUTTON;
5352
- }
5367
+ TEXT_SELECTOR: '.' + cssClasses.TEXT,
5368
+ ACTION_WRAPPER_SELECTOR: '.' + cssClasses.ACTION_WRAPPER,
5369
+ ACTION_BUTTON_SELECTOR: '.' + cssClasses.ACTION_BUTTON
5353
5370
  };
5354
5371
 
5355
5372
  var numbers = {
@@ -5598,8 +5615,6 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
5598
5615
 
5599
5616
 
5600
5617
 
5601
- var ROOT = 'mdc-textfield';
5602
-
5603
5618
  var MDCTextfieldFoundation = function (_MDCFoundation) {
5604
5619
  _inherits(MDCTextfieldFoundation, _MDCFoundation);
5605
5620
 
@@ -5607,14 +5622,14 @@ var MDCTextfieldFoundation = function (_MDCFoundation) {
5607
5622
  key: 'cssClasses',
5608
5623
  get: function get() {
5609
5624
  return {
5610
- ROOT: ROOT,
5611
- UPGRADED: ROOT + '--upgraded',
5612
- DISABLED: ROOT + '--disabled',
5613
- FOCUSED: ROOT + '--focused',
5614
- INVALID: ROOT + '--invalid',
5615
- HELPTEXT_PERSISTENT: ROOT + '-helptext--persistent',
5616
- HELPTEXT_VALIDATION_MSG: ROOT + '-helptext--validation-msg',
5617
- LABEL_FLOAT_ABOVE: ROOT + '__label--float-above'
5625
+ ROOT: 'mdc-textfield',
5626
+ UPGRADED: 'mdc-textfield--upgraded',
5627
+ DISABLED: 'mdc-textfield--disabled',
5628
+ FOCUSED: 'mdc-textfield--focused',
5629
+ INVALID: 'mdc-textfield--invalid',
5630
+ HELPTEXT_PERSISTENT: 'mdc-textfield-helptext--persistent',
5631
+ HELPTEXT_VALIDATION_MSG: 'mdc-textfield-helptext--validation-msg',
5632
+ LABEL_FLOAT_ABOVE: 'mdc-textfield__label--float-above'
5618
5633
  };
5619
5634
  }
5620
5635
  }, {
@@ -5688,6 +5703,11 @@ var MDCTextfieldFoundation = function (_MDCFoundation) {
5688
5703
  this.adapter_.registerInputBlurHandler(this.inputBlurHandler_);
5689
5704
  this.adapter_.registerInputInputHandler(this.inputInputHandler_);
5690
5705
  this.adapter_.registerInputKeydownHandler(this.inputKeydownHandler_);
5706
+
5707
+ // Ensure label does not collide with any pre-filled value.
5708
+ if (this.getNativeInput_().value) {
5709
+ this.adapter_.addClassToLabel(MDCTextfieldFoundation.cssClasses.LABEL_FLOAT_ABOVE);
5710
+ }
5691
5711
  }
5692
5712
  }, {
5693
5713
  key: 'destroy',
@@ -22,7 +22,11 @@
22
22
  @import "@material/typography/mixins";
23
23
 
24
24
  // postcss-bem-linter: define button
25
+
25
26
  .mdc-button {
27
+ @include mdc-ripple-base;
28
+ @include mdc-ripple-bg((pseudo: "::before"));
29
+ @include mdc-ripple-fg((pseudo: "::after"));
26
30
  @include mdc-typography(body2);
27
31
  @include mdc-theme-prop(color, text-primary-on-light);
28
32
 
@@ -41,6 +45,7 @@
41
45
  text-align: center;
42
46
  text-decoration: none;
43
47
  text-transform: uppercase;
48
+ overflow: hidden;
44
49
  vertical-align: middle;
45
50
  user-select: none;
46
51
  box-sizing: border-box;
@@ -48,43 +53,23 @@
48
53
  -webkit-tap-highlight-color: rgba(black, .18);
49
54
 
50
55
  @include mdc-theme-dark {
56
+ @include mdc-ripple-base;
57
+ @include mdc-ripple-bg((pseudo: "::before", base-color: white, opacity: .14));
58
+ @include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .14));
51
59
  @include mdc-theme-prop(color, text-primary-on-dark);
52
60
 
53
61
  -webkit-tap-highlight-color: rgba(white, .18);
54
62
  }
55
63
 
56
- // postcss-bem-linter: ignore
57
- &::before {
58
- position: absolute;
59
- top: 0;
60
- left: 0;
61
- width: 100%;
62
- height: 100%;
63
- transition: mdc-animation-exit(opacity, 120ms);
64
- border-radius: inherit;
65
- background: currentColor;
66
- content: "";
67
- opacity: 0;
68
- }
69
-
70
- &:focus::before {
71
- transition: mdc-animation-enter(opacity, 120ms);
72
- opacity: .12;
73
- }
74
-
75
- &:active::before {
76
- transition: mdc-animation-enter(opacity, 120ms);
77
-
78
- // Slightly darker value for visual distinction.
79
- // This allows a full base that has distinct modes.
80
- // Progressive enhancement with ripples will provide complete button spec alignment.
81
- opacity: .18;
82
- }
83
-
84
- &:focus:active::before {
85
- transition-timing-function: $mdc-animation-fast-out-slow-in-timing-function;
64
+ @each $theme-style in (primary, accent) {
65
+ &.mdc-button--#{$theme-style} {
66
+ @include mdc-ripple-base;
67
+ @include mdc-ripple-bg((pseudo: "::before", theme-style: $theme-style, opacity: .12));
68
+ @include mdc-ripple-fg((pseudo: "::after", theme-style: $theme-style, opacity: .12));
69
+ }
86
70
  }
87
71
 
72
+ // postcss-bem-linter: ignore
88
73
  &:active {
89
74
  outline: none;
90
75
  }
@@ -104,6 +89,7 @@
104
89
  line-height: 32px;
105
90
  }
106
91
 
92
+ // TODO(cristobalchao): Disable ink wash on hover and alter elevation instead for raised surfaces.
107
93
  &--raised {
108
94
  @include mdc-elevation(2);
109
95
  @include mdc-elevation-transition;
@@ -114,6 +100,14 @@
114
100
  @include mdc-elevation(8);
115
101
  }
116
102
 
103
+ @each $theme-style in (primary, accent) {
104
+ &.mdc-button--#{$theme-style} {
105
+ @include mdc-ripple-base;
106
+ @include mdc-ripple-bg((pseudo: "::before", base-color: white, opacity: .14));
107
+ @include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .14));
108
+ }
109
+ }
110
+
117
111
  @include mdc-theme-dark(".mdc-button") {
118
112
  @include mdc-theme-prop(background-color, primary);
119
113
 
@@ -196,31 +190,3 @@
196
190
 
197
191
  // postcss-bem-linter: end
198
192
 
199
- .mdc-button.mdc-ripple-upgraded {
200
- @include mdc-ripple-base;
201
- @include mdc-ripple-bg((pseudo: "::before"));
202
- @include mdc-ripple-fg((pseudo: "::after"));
203
-
204
- overflow: hidden;
205
-
206
- @include mdc-theme-dark(".mdc-button", true) {
207
- @include mdc-ripple-bg((pseudo: "::before", base-color: white, opacity: .14));
208
- @include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .14));
209
- }
210
-
211
- @each $theme-style in (primary, accent) {
212
- &.mdc-button--#{$theme-style} {
213
- @include mdc-ripple-bg((pseudo: "::before", theme-style: $theme-style, opacity: .12));
214
- @include mdc-ripple-fg((pseudo: "::after", theme-style: $theme-style, opacity: .12));
215
- }
216
- }
217
- }
218
-
219
- .mdc-button--raised.mdc-ripple-upgraded {
220
- @each $theme-style in (primary, accent) {
221
- &.mdc-button--#{$theme-style} {
222
- @include mdc-ripple-bg((pseudo: "::before", base-color: white, opacity: .14));
223
- @include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .14));
224
- }
225
- }
226
- }
@@ -15,8 +15,9 @@
15
15
  //
16
16
 
17
17
  @import "@material/animation/functions";
18
- @import "@material/ripple/mixins";
19
18
  @import "@material/animation/mixins";
19
+ @import "@material/ripple/mixins";
20
+ @import "@material/rtl/mixins";
20
21
  @import "./variables";
21
22
  @import "./keyframes";
22
23
 
@@ -40,18 +41,12 @@
40
41
  left: 0;
41
42
  }
42
43
 
43
- @mixin mdc-checkbox-outer-box {
44
- @include mdc-checkbox-cover-element;
45
-
46
- top: ($mdc-checkbox-touch-area - $mdc-checkbox-size) / 2;
47
- left: ($mdc-checkbox-touch-area - $mdc-checkbox-size) / 2;
48
- border-radius: 2px;
49
- box-sizing: border-box;
50
- pointer-events: none;
51
- }
52
-
53
44
  // postcss-bem-linter: define checkbox
54
45
  .mdc-checkbox {
46
+ @include mdc-ripple-base;
47
+ @include mdc-ripple-bg((pseudo: "::before", theme-style: primary, opacity: .14));
48
+ @include mdc-ripple-fg((pseudo: "::after", theme-style: primary, opacity: .14));
49
+
55
50
  display: inline-block;
56
51
  position: relative;
57
52
  box-sizing: content-box;
@@ -63,19 +58,40 @@
63
58
  cursor: pointer;
64
59
  vertical-align: bottom;
65
60
 
61
+ &::before,
62
+ &::after {
63
+ top: 0;
64
+ left: 0;
65
+ width: 100%;
66
+ height: 100%;
67
+ }
68
+
69
+ // stylelint-disable plugin/selector-bem-pattern
70
+ &.mdc-ripple-upgraded--unbounded {
71
+ .mdc-checkbox__background::before {
72
+ content: none;
73
+ }
74
+ }
75
+ // stylelint-enable plugin/selector-bem-pattern
76
+
66
77
  &__background {
67
- @include mdc-checkbox-outer-box;
78
+ @include mdc-checkbox-cover-element;
79
+ @include mdc-rtl-reflexive-position(
80
+ left, ($mdc-checkbox-touch-area - $mdc-checkbox-size) / 2, ".mdc-checkbox");
68
81
 
69
82
  display: inline-flex;
83
+ top: ($mdc-checkbox-touch-area - $mdc-checkbox-size) / 2;
70
84
  align-items: center;
71
85
  justify-content: center;
86
+ box-sizing: border-box;
87
+ pointer-events: none;
72
88
  width: $mdc-checkbox-ui-pct;
73
89
  height: $mdc-checkbox-ui-pct;
74
- box-sizing: border-box;
75
90
  transition:
76
91
  mdc-checkbox-transition-exit(background-color),
77
92
  mdc-checkbox-transition-exit(border-color);
78
93
  border: $mdc-checkbox-border-width solid $mdc-checkbox-border-color;
94
+ border-radius: 2px;
79
95
  background-color: transparent;
80
96
  will-change: background-color, border-color;
81
97
 
@@ -329,13 +345,3 @@ fieldset:disabled .mdc-checkbox__native-control,
329
345
  }
330
346
  }
331
347
  // postcss-bem-linter: end
332
-
333
- .mdc-checkbox.mdc-ripple-upgraded {
334
- @include mdc-ripple-base;
335
- @include mdc-ripple-bg((pseudo: "::before", theme-style: primary, opacity: .14));
336
- @include mdc-ripple-fg((pseudo: "::after", theme-style: primary, opacity: .14));
337
-
338
- .mdc-checkbox__background::before {
339
- content: none;
340
- }
341
- }
@@ -20,6 +20,10 @@
20
20
 
21
21
  // postcss-bem-linter: define fab
22
22
  .mdc-fab {
23
+ @include mdc-ripple-base;
24
+ @include mdc-ripple-bg((pseudo: "::before", base-color: white, opacity: .16));
25
+ @include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .16));
26
+
23
27
  display: inline-flex;
24
28
  position: relative;
25
29
  justify-content: center;
@@ -36,6 +40,7 @@
36
40
  -moz-appearance: none;
37
41
  -webkit-appearance: none;
38
42
  -webkit-tap-highlight-color: rgba(0, 0, 0, .18);
43
+ overflow: hidden;
39
44
 
40
45
  @include mdc-theme-prop(background-color, accent);
41
46
  @include mdc-theme-prop(color, text-primary-on-accent);
@@ -50,6 +55,8 @@
50
55
  background-color: white;
51
56
 
52
57
  @include mdc-theme-prop(color, text-primary-on-light);
58
+ @include mdc-ripple-bg((pseudo: "::before"));
59
+ @include mdc-ripple-fg((pseudo: "::after"));
53
60
  }
54
61
 
55
62
  &::before {
@@ -60,7 +67,7 @@
60
67
  height: 100%;
61
68
  transition: mdc-animation-exit(opacity, 120ms);
62
69
  border-radius: inherit;
63
- background: black;
70
+ background: rgba(0, 0, 0, .2);
64
71
  content: "";
65
72
  opacity: 0;
66
73
  }
@@ -124,16 +131,3 @@
124
131
  }
125
132
 
126
133
  // postcss-bem-linter: end
127
-
128
- .mdc-fab.mdc-ripple-upgraded {
129
- @include mdc-ripple-base;
130
- @include mdc-ripple-bg((pseudo: "::before", base-color: white, opacity: .16));
131
- @include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .16));
132
-
133
- overflow: hidden;
134
- }
135
-
136
- .mdc-fab--plain.mdc-ripple-upgraded {
137
- @include mdc-ripple-bg((pseudo: "::before"));
138
- @include mdc-ripple-fg((pseudo: "::after"));
139
- }
@@ -36,13 +36,13 @@ $mdc-form-field-item-spacing: 4px;
36
36
  > label {
37
37
  order: 0;
38
38
  margin-right: auto;
39
- margin-left: $mdc-form-field-item-spacing;
39
+ padding-left: $mdc-form-field-item-spacing;
40
40
  }
41
41
 
42
42
  @include mdc-rtl {
43
43
  > label {
44
- margin-right: $mdc-form-field-item-spacing;
45
44
  margin-left: auto;
45
+ padding-right: $mdc-form-field-item-spacing;
46
46
  }
47
47
  }
48
48
  }
@@ -50,14 +50,14 @@ $mdc-form-field-item-spacing: 4px;
50
50
  .mdc-form-field--align-end {
51
51
  > label {
52
52
  order: -1;
53
- margin-right: $mdc-form-field-item-spacing;
54
53
  margin-left: auto;
54
+ padding-right: $mdc-form-field-item-spacing;
55
55
  }
56
56
 
57
57
  @include mdc-rtl {
58
58
  > label {
59
59
  margin-right: auto;
60
- margin-left: $mdc-form-field-item-spacing;
60
+ padding-left: $mdc-form-field-item-spacing;
61
61
  }
62
62
  }
63
63
  }
@@ -22,7 +22,32 @@
22
22
 
23
23
  .mdc-icon-toggle {
24
24
  @include mdc-theme-prop(color, text-secondary-on-light);
25
+ @include mdc-ripple-base;
26
+ // NOTE: The spec denotes specific opacity values to use for different styles of icon buttons,
27
+ // either "light", "dark", or "color". Because ripples are made up of two distinct elements,
28
+ // we need to use an opacity value such that when two elements of the same color and opacity are
29
+ // layered on top of one another, they create the opacity specified in the spec.
30
+ // This is done by using the painter's compositing algorithm:
31
+ //
32
+ // alpha[desired] = alpha[a] + alpha[b](1 - alpha[a]).
33
+ //
34
+ // Because both alpha values are the same this reduces to:
35
+ //
36
+ // alpha[desired] = alpha[a] + alpha[a](1 - alpha[a]).
37
+ //
38
+ // We simply solve this quadratic equation for the nonnegative root between [0, 1].
39
+ // E.g. for black 12% opacity:
40
+ // https://www.wolframalpha.com/input/?i=x+%2B+x(1+-+x)+%3D+.12,+x+%3C%3D+1,+x+%3E%3D+0
41
+ @include mdc-ripple-bg((pseudo: "::before", opacity: .062));
42
+ @include mdc-ripple-fg((pseudo: "::after", opacity: .062));
25
43
 
44
+ @include mdc-theme-dark(".mdc-icon-toggle", true) {
45
+ @include mdc-ripple-bg((pseudo: "::before", base-color: white, opacity: .16));
46
+ @include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .16));
47
+ }
48
+
49
+ // For some reason, GPU layer promotion makes ripples look terrible on Chrome
50
+ will-change: initial;
26
51
  display: flex;
27
52
  position: relative;
28
53
  box-sizing: border-box;
@@ -38,47 +63,27 @@
38
63
 
39
64
  &::after {
40
65
  position: absolute;
41
- top: 0;
42
- right: 0;
43
- bottom: 0;
44
- left: 0;
45
- transform: scale(0, 0);
46
- transition: mdc-animation-exit(opacity, 80ms), mdc-animation-exit(transform, 80ms);
47
66
  border-radius: 50%;
48
- background-color: currentColor;
49
67
  content: "";
50
68
  opacity: 0;
51
69
  pointer-events: none;
52
70
  }
53
71
 
54
- &:focus::after {
55
- transform: scale(1.3, 1.3);
56
- transition: mdc-animation-enter(opacity, 80ms), mdc-animation-enter(transform, 80ms);
57
- opacity: .12;
58
- }
59
-
60
72
  @include mdc-theme-dark {
61
73
  @include mdc-theme-prop(color, text-primary-on-dark);
62
-
63
- &:focus::after {
64
- opacity: .3;
65
- }
66
74
  }
67
75
  }
68
76
 
69
77
  .mdc-icon-toggle--primary {
70
78
  @include mdc-theme-prop(color, primary);
79
+ @include mdc-ripple-bg((pseudo: "::before", theme-style: primary, opacity: .14));
80
+ @include mdc-ripple-fg((pseudo: "::after", theme-style: primary, opacity: .14));
71
81
  }
72
82
 
73
83
  .mdc-icon-toggle--accent {
74
84
  @include mdc-theme-prop(color, accent);
75
- }
76
-
77
- .mdc-icon-toggle--primary,
78
- .mdc-icon-toggle--accent {
79
- &:focus::after {
80
- opacity: .26;
81
- }
85
+ @include mdc-ripple-bg((pseudo: "::before", theme-style: accent, opacity: .14));
86
+ @include mdc-ripple-fg((pseudo: "::after", theme-style: accent, opacity: .14));
82
87
  }
83
88
 
84
89
  .mdc-icon-toggle--disabled {
@@ -92,42 +97,3 @@
92
97
  }
93
98
 
94
99
  /** postcss-bem-linter: end */
95
-
96
- .mdc-icon-toggle.mdc-ripple-upgraded {
97
- @include mdc-ripple-base;
98
- // NOTE: The spec denotes specific opacity values to use for different styles of icon buttons,
99
- // either "light", "dark", or "color". Because ripples are made up of two distinct elements,
100
- // we need to use an opacity value such that when two elements of the same color and opacity are
101
- // layered on top of one another, they create the opacity specified in the spec.
102
- // This is done by using the painter's compositing algorithm:
103
- //
104
- // alpha[desired] = alpha[a] + alpha[b](1 - alpha[a]).
105
- //
106
- // Because both alpha values are the same this reduces to:
107
- //
108
- // alpha[desired] = alpha[a] + alpha[a](1 - alpha[a]).
109
- //
110
- // We simply solve this quadratic equation for the nonnegative root between [0, 1].
111
- // E.g. for black 12% opacity:
112
- // https://www.wolframalpha.com/input/?i=x+%2B+x(1+-+x)+%3D+.12,+x+%3C%3D+1,+x+%3E%3D+0
113
- @include mdc-ripple-bg((pseudo: "::before", opacity: .062));
114
- @include mdc-ripple-fg((pseudo: "::after", opacity: .062));
115
-
116
- @include mdc-theme-dark(".mdc-icon-toggle", true) {
117
- @include mdc-ripple-bg((pseudo: "::before", base-color: white, opacity: .16));
118
- @include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .16));
119
- }
120
-
121
- // For some reason, GPU layer promotion makes ripples look terrible on Chrome
122
- will-change: initial;
123
- }
124
-
125
- .mdc-icon-toggle--primary.mdc-ripple-upgraded {
126
- @include mdc-ripple-bg((pseudo: "::before", theme-style: primary, opacity: .14));
127
- @include mdc-ripple-fg((pseudo: "::after", theme-style: primary, opacity: .14));
128
- }
129
-
130
- .mdc-icon-toggle--accent.mdc-ripple-upgraded {
131
- @include mdc-ripple-bg((pseudo: "::before", theme-style: accent, opacity: .14));
132
- @include mdc-ripple-fg((pseudo: "::after", theme-style: accent, opacity: .14));
133
- }
@@ -1,18 +1,18 @@
1
- //
1
+ //
2
2
  // Copyright 2016 Google Inc. All Rights Reserved.
3
- //
3
+ //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
6
6
  // You may obtain a copy of the License at
7
- //
7
+ //
8
8
  // http://www.apache.org/licenses/LICENSE-2.0
9
- //
9
+ //
10
10
  // Unless required by applicable law or agreed to in writing, software
11
11
  // distributed under the License is distributed on an "AS IS" BASIS,
12
12
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
  // See the License for the specific language governing permissions and
14
14
  // limitations under the License.
15
- //
15
+ //
16
16
 
17
17
  @import "@material/animation/functions";
18
18
  @import "@material/ripple/mixins";
@@ -33,6 +33,10 @@ $mdc-radio-transition-duration: 120ms;
33
33
 
34
34
  // postcss-bem-linter: define radio
35
35
  .mdc-radio {
36
+ @include mdc-ripple-base;
37
+ @include mdc-ripple-bg((pseudo: "::before", theme-style: primary, opacity: .14));
38
+ @include mdc-ripple-fg((pseudo: "::after", theme-style: primary, opacity: .14));
39
+
36
40
  display: inline-block;
37
41
  position: relative;
38
42
  box-sizing: border-box;
@@ -42,6 +46,22 @@ $mdc-radio-transition-duration: 120ms;
42
46
  cursor: pointer;
43
47
  will-change: opacity, transform, border-color, background-color, color;
44
48
 
49
+ &::before,
50
+ &::after {
51
+ top: 0;
52
+ left: 0;
53
+ width: 100%;
54
+ height: 100%;
55
+ }
56
+
57
+ // stylelint-disable plugin/selector-bem-pattern
58
+ &.mdc-ripple-upgraded {
59
+ .mdc-radio__background::before {
60
+ content: none;
61
+ }
62
+ }
63
+ // stylelint-enable plugin/selector-bem-pattern
64
+
45
65
  // Container for radio circles and ripple.
46
66
  &__background {
47
67
  display: inline-block;
@@ -179,20 +199,10 @@ fieldset:disabled .mdc-radio__native-control,
179
199
 
180
200
  .mdc-radio__native-control:focus {
181
201
  + .mdc-radio__background::before {
182
- transform: scale(2.8, 2.8);
202
+ transform: scale(2, 2);
183
203
  transition: mdc-radio-enter(opacity), mdc-radio-enter(transform);
184
204
  opacity: .26;
185
205
  }
186
206
  }
187
207
 
188
208
  // postcss-bem-linter: end
189
-
190
- .mdc-radio.mdc-ripple-upgraded {
191
- @include mdc-ripple-base;
192
- @include mdc-ripple-bg((pseudo: "::before", theme-style: primary, opacity: .14));
193
- @include mdc-ripple-fg((pseudo: "::after", theme-style: primary, opacity: .14));
194
-
195
- .mdc-radio__background::before {
196
- content: none;
197
- }
198
- }
@@ -20,12 +20,14 @@
20
20
 
21
21
  @keyframes mdc-ripple-fg-radius-in {
22
22
  from {
23
- transform: translate(var(--mdc-ripple-fg-translate-start)) scale(1);
23
+ transform: translate(0) scale(1);
24
+ transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);
24
25
  animation-timing-function: $mdc-animation-fast-out-slow-in-timing-function;
25
26
  }
26
27
 
27
28
  to {
28
- transform: translate(var(--mdc-ripple-fg-translate-end)) scale(var(--mdc-ripple-fg-scale));
29
+ transform: translate(0) scale(0);
30
+ transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 0));
29
31
  }
30
32
  }
31
33
 
@@ -52,10 +54,12 @@
52
54
 
53
55
  @keyframes mdc-ripple-fg-unbounded-transform-deactivate {
54
56
  from {
55
- transform: var(--mdc-ripple-fg-approx-xf);
57
+ transform: 0;
58
+ transform: var(--mdc-ripple-fg-approx-xf, 0);
56
59
  }
57
60
 
58
61
  to {
59
- transform: scale(var(--mdc-ripple-fg-scale));
62
+ transform: scale(0);
63
+ transform: scale(var(--mdc-ripple-fg-scale, 0));
60
64
  }
61
65
  }
@@ -40,8 +40,17 @@
40
40
  --mdc-ripple-fg-unbounded-transform-duration: 0ms;
41
41
  --mdc-ripple-fg-approx-xf: 0;
42
42
 
43
- will-change: transition, opacity;
43
+ will-change: transform, opacity;
44
44
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
45
+
46
+ &:not(.mdc-ripple-upgraded) {
47
+ &:hover::before,
48
+ &:focus::before,
49
+ &:active::after {
50
+ transition-duration: 85ms;
51
+ opacity: .6;
52
+ }
53
+ }
45
54
  }
46
55
 
47
56
  @mixin mdc-ripple-color_($config) {
@@ -52,6 +61,7 @@
52
61
  // stylelint-disable at-rule-empty-line-before, block-closing-brace-newline-after
53
62
  @if ($theme-style) {
54
63
  $theme-value: map-get($mdc-theme-property-values, $theme-style);
64
+ $css-var: $theme-value;
55
65
  $css-var: var(--mdc-theme-#{$theme-style}, $theme-value);
56
66
 
57
67
  background-color: rgba($theme-value, $opacity);
@@ -65,6 +75,7 @@
65
75
  } @else {
66
76
  background-color: rgba($base-color, $opacity);
67
77
  }
78
+
68
79
  // stylelint-enable at-rule-empty-line-before, block-closing-brace-newline-after
69
80
  }
70
81
 
@@ -78,8 +89,7 @@
78
89
  left: calc(50% - #{$radius});
79
90
  width: $radius * 2;
80
91
  height: $radius * 2;
81
- transform: scale(var(--mdc-ripple-fg-scale));
82
- transition: opacity 200ms linear;
92
+ transition: opacity 250ms linear;
83
93
  border-radius: 50%;
84
94
  opacity: 0;
85
95
  pointer-events: none;
@@ -88,6 +98,7 @@
88
98
  @mixin mdc-ripple-bg($config: ()) {
89
99
  $config: map-merge(mdc-ripple-default-config_(), $config);
90
100
  $pseudo: map-get($config, pseudo);
101
+ $radius: map-get($config, radius);
91
102
 
92
103
  // stylelint-disable at-rule-empty-line-before, block-closing-brace-newline-after
93
104
  @if ($pseudo) {
@@ -101,6 +112,15 @@
101
112
  }
102
113
  // stylelint-enable at-rule-empty-line-before, block-closing-brace-newline-after
103
114
 
115
+ &.mdc-ripple-upgraded#{$pseudo} {
116
+ top: calc(50% - #{$radius});
117
+ left: calc(50% - #{$radius});
118
+ width: $radius * 2;
119
+ height: $radius * 2;
120
+ transform: scale(0);
121
+ transform: scale(var(--mdc-ripple-fg-scale, 0));
122
+ }
123
+
104
124
  &.mdc-ripple-upgraded--background-active#{$pseudo} {
105
125
  opacity: .99999;
106
126
  }
@@ -118,23 +138,30 @@
118
138
  }
119
139
 
120
140
  &.mdc-ripple-upgraded--unbounded#{$pseudo} {
121
- top: var(--mdc-ripple-top);
122
- left: var(--mdc-ripple-left);
123
- width: var(--mdc-ripple-fg-size);
124
- height: var(--mdc-ripple-fg-size);
141
+ top: calc(50% - #{$radius / 2});
142
+ top: var(--mdc-ripple-top, calc(50% - #{$radius / 2}));
143
+ left: calc(50% - #{$radius / 2});
144
+ left: var(--mdc-ripple-left, calc(50% - #{$radius / 2}));
145
+ width: $radius;
146
+ width: var(--mdc-ripple-fg-size, $radius);
147
+ height: $radius;
148
+ height: var(--mdc-ripple-fg-size, $radius);
149
+ transform: scale(0);
150
+ transform: scale(var(--mdc-ripple-fg-scale, 0));
125
151
  }
126
152
  }
127
153
 
128
154
  @mixin mdc-ripple-fg-base_($config) {
155
+ $radius: map-get($config, radius);
156
+
129
157
  @include mdc-ripple-color_($config);
130
158
 
131
159
  position: absolute;
132
- top: 0;
133
- left: 0;
134
- width: var(--mdc-ripple-fg-size);
135
- height: var(--mdc-ripple-fg-size);
136
- transform: scale(0);
137
- transform-origin: center center;
160
+ top: calc(50% - #{$radius});
161
+ left: calc(50% - #{$radius});
162
+ width: $radius * 2;
163
+ height: $radius * 2;
164
+ transition: opacity 250ms linear;
138
165
  border-radius: 50%;
139
166
  opacity: 0;
140
167
  pointer-events: none;
@@ -143,6 +170,7 @@
143
170
  @mixin mdc-ripple-fg($config: ()) {
144
171
  $config: map-merge(mdc-ripple-default-config_(), $config);
145
172
  $pseudo: map-get($config, pseudo);
173
+ $radius: map-get($config, radius);
146
174
 
147
175
  // stylelint-disable at-rule-empty-line-before, block-closing-brace-newline-after
148
176
  @if ($pseudo) {
@@ -156,13 +184,34 @@
156
184
  }
157
185
  // stylelint-enable at-rule-empty-line-before, block-closing-brace-newline-after
158
186
 
187
+ &.mdc-ripple-upgraded {
188
+ &#{$pseudo} {
189
+ top: 0;
190
+ left: 0;
191
+ width: $radius;
192
+ width: var(--mdc-ripple-fg-size, $radius);
193
+ height: $radius;
194
+ height: var(--mdc-ripple-fg-size, $radius);
195
+ transform: scale(0);
196
+ transform-origin: center center;
197
+ opacity: 0;
198
+ }
199
+ }
200
+
159
201
  &:not(.mdc-ripple-upgraded--unbounded)#{$pseudo} {
160
202
  transform-origin: center center;
161
203
  }
162
204
 
163
205
  &.mdc-ripple-upgraded--unbounded#{$pseudo} {
164
- top: var(--mdc-ripple-top);
165
- left: var(--mdc-ripple-left);
206
+ top: 0;
207
+ top: var(--mdc-ripple-top, 0);
208
+ left: 0;
209
+ left: var(--mdc-ripple-left, 0);
210
+ width: $radius;
211
+ width: var(--mdc-ripple-fg-size, $radius);
212
+ height: $radius;
213
+ height: var(--mdc-ripple-fg-size, $radius);
214
+ transform: scale(0);
166
215
  transform-origin: center center;
167
216
  }
168
217
 
@@ -172,16 +221,23 @@
172
221
  }
173
222
 
174
223
  &.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded--foreground-unbounded-activation#{$pseudo} {
175
- transform: scale(var(--mdc-ripple-fg-scale));
224
+ transform: scale(0);
225
+ transform: scale(var(--mdc-ripple-fg-scale, 0));
176
226
  transition:
177
227
  opacity 110ms linear,
178
- transform var(--mdc-ripple-fg-unbounded-transform-duration) linear 80ms;
228
+ transform 0 linear 80ms;
229
+ transition:
230
+ opacity 110ms linear,
231
+ transform var(--mdc-ripple-fg-unbounded-transform-duration, 0) linear 80ms;
179
232
  opacity: 1;
180
233
  }
181
234
 
182
235
  &.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded--foreground-unbounded-deactivation#{$pseudo} {
183
236
  animation:
184
- mdc-ripple-fg-unbounded-opacity-deactivate var(--mdc-ripple-fg-unbounded-opacity-duration) linear,
185
- mdc-ripple-fg-unbounded-transform-deactivate var(--mdc-ripple-fg-unbounded-transform-duration) $mdc-animation-fast-out-slow-in-timing-function;
237
+ mdc-ripple-fg-unbounded-opacity-deactivate 0 linear,
238
+ mdc-ripple-fg-unbounded-transform-deactivate 0 $mdc-animation-fast-out-slow-in-timing-function;
239
+ animation:
240
+ mdc-ripple-fg-unbounded-opacity-deactivate var(--mdc-ripple-fg-unbounded-opacity-duration, 0) linear,
241
+ mdc-ripple-fg-unbounded-transform-deactivate var(--mdc-ripple-fg-unbounded-transform-duration, 0) $mdc-animation-fast-out-slow-in-timing-function;
186
242
  }
187
243
  }
@@ -21,6 +21,10 @@
21
21
  // postcss-bem-linter: define ripple-surface
22
22
 
23
23
  .mdc-ripple-surface {
24
+ @include mdc-ripple-base;
25
+ @include mdc-ripple-bg((pseudo: "::before"));
26
+ @include mdc-ripple-fg((pseudo: "::after"));
27
+
24
28
  position: relative;
25
29
  outline: none;
26
30
  overflow: hidden;
@@ -29,51 +33,24 @@
29
33
  overflow: visible;
30
34
  }
31
35
 
32
- &::before {
33
- position: absolute;
34
- top: 0;
35
- right: 0;
36
- bottom: 0;
37
- left: 0;
38
- transition: mdc-animation-exit(opacity, 120ms);
39
- border-radius: inherit;
40
- background: currentColor;
41
- content: "";
42
- opacity: 0;
43
- }
44
-
45
- &:focus::before {
46
- opacity: .12;
47
- }
48
-
49
- &:active::before {
50
- opacity: .18;
51
- }
52
-
53
- &.mdc-ripple-upgraded {
54
- @include mdc-ripple-base;
55
- @include mdc-ripple-bg((pseudo: "::before"));
56
- @include mdc-ripple-fg((pseudo: "::after"));
57
- }
58
-
59
- &--primary.mdc-ripple-upgraded {
36
+ &--primary {
60
37
  &::before,
61
38
  &::after {
62
39
  @include mdc-theme-prop(background-color, primary);
63
40
  }
64
41
 
65
- @include mdc-ripple-bg((pseudo: "::before", theme-style: primary, opacity: .14));
66
- @include mdc-ripple-fg((pseudo: "::after", theme-style: primary, opacity: .14));
42
+ @include mdc-ripple-bg((pseudo: "::before", theme-style: primary, opacity: .16));
43
+ @include mdc-ripple-fg((pseudo: "::after", theme-style: primary, opacity: .16));
67
44
  }
68
45
 
69
- &--accent.mdc-ripple-upgraded {
46
+ &--accent {
70
47
  &::before,
71
48
  &::after {
72
49
  @include mdc-theme-prop(background-color, primary);
73
50
  }
74
51
 
75
- @include mdc-ripple-bg((pseudo: "::before", theme-style: accent, opacity: .14));
76
- @include mdc-ripple-fg((pseudo: "::after", theme-style: accent, opacity: .14));
52
+ @include mdc-ripple-bg((pseudo: "::before", theme-style: accent, opacity: .16));
53
+ @include mdc-ripple-fg((pseudo: "::after", theme-style: accent, opacity: .16));
77
54
  }
78
55
  }
79
56
 
@@ -19,6 +19,10 @@
19
19
  @import "./mixins";
20
20
  @import "./variables";
21
21
 
22
+ @function mdc-switch-transition($property) {
23
+ @return $property 90ms $mdc-switch-transition-curve;
24
+ }
25
+
22
26
  // postcss-bem-linter: define switch
23
27
  .mdc-switch {
24
28
  display: inline-block;
@@ -47,7 +51,7 @@
47
51
  cursor: pointer;
48
52
  user-select: none;
49
53
 
50
- @include mdc-theme-dark(".mdc-checkbox") {
54
+ @include mdc-theme-dark(".mdc-switch") {
51
55
  background-color: transparent;
52
56
  }
53
57
 
@@ -59,14 +63,14 @@
59
63
  bottom: 0;
60
64
  left: 0;
61
65
  transition:
62
- mdc-checkbox-transition(opacity, $mdc-switch-transition-curve),
63
- mdc-checkbox-transition(background-color, $mdc-switch-transition-curve);
66
+ mdc-switch-transition(opacity),
67
+ mdc-switch-transition(background-color);
64
68
  border-radius: 7px;
65
69
  background-color: $mdc-switch-unchecked-track-color;
66
70
  content: "";
67
71
  opacity: .38;
68
72
 
69
- @include mdc-theme-dark(".mdc-checkbox") {
73
+ @include mdc-theme-dark(".mdc-switch") {
70
74
  background-color: $mdc-switch-unchecked-track-color-dark;
71
75
  opacity: .3;
72
76
  }
@@ -82,12 +86,12 @@
82
86
  height: $mdc-switch-knob-diameter;
83
87
  transform: translateX(0);
84
88
  transition:
85
- mdc-checkbox-transition(transform, $mdc-switch-transition-curve),
86
- mdc-checkbox-transition(background-color, $mdc-switch-transition-curve);
89
+ mdc-switch-transition(transform),
90
+ mdc-switch-transition(background-color);
87
91
  border-radius: $mdc-switch-knob-diameter / 2;
88
92
  background-color: $mdc-switch-unchecked-knob-color;
89
93
 
90
- @include mdc-theme-dark(".mdc-checkbox") {
94
+ @include mdc-theme-dark(".mdc-switch") {
91
95
  background-color: $mdc-switch-unchecked-knob-color-dark;
92
96
  }
93
97
 
@@ -104,8 +108,8 @@
104
108
  height: $mdc-switch-focus-ring-diameter;
105
109
  transform: scale(0);
106
110
  transition:
107
- mdc-checkbox-transition(transform, $mdc-switch-transition-curve),
108
- mdc-checkbox-transition(background-color, $mdc-switch-transition-curve);
111
+ mdc-switch-transition(transform),
112
+ mdc-switch-transition(background-color);
109
113
  border-radius: $mdc-switch-focus-ring-diameter / 2;
110
114
  background-color: transparent;
111
115
  content: "";
@@ -123,12 +127,12 @@
123
127
  height: $mdc-switch-focus-ring-diameter;
124
128
  transform: scale(1);
125
129
  transition:
126
- mdc-checkbox-transition(transform, $mdc-switch-transition-curve),
127
- mdc-checkbox-transition(background-color, $mdc-switch-transition-curve);
130
+ mdc-switch-transition(transform),
131
+ mdc-switch-transition(background-color);
128
132
  border-radius: $mdc-switch-focus-ring-diameter / 2;
129
133
  background-color: $mdc-switch-unchecked-focus-ring-color;
130
134
 
131
- @include mdc-theme-dark(".mdc-checkbox") {
135
+ @include mdc-theme-dark(".mdc-switch") {
132
136
  background-color: $mdc-switch-unchecked-focus-ring-color-dark;
133
137
  opacity: .14;
134
138
  }
@@ -146,15 +150,15 @@
146
150
  .mdc-switch__knob {
147
151
  transform: translateX($mdc-switch-track-width - $mdc-switch-knob-diameter);
148
152
  transition:
149
- mdc-checkbox-transition(transform, $mdc-switch-transition-curve),
150
- mdc-checkbox-transition(background-color, $mdc-switch-transition-curve);
153
+ mdc-switch-transition(transform),
154
+ mdc-switch-transition(background-color);
151
155
 
152
156
  @include mdc-theme-prop(background-color, primary);
153
157
 
154
158
  &::before {
155
159
  @include mdc-theme-prop(background-color, primary);
156
160
 
157
- @include mdc-theme-dark(".mdc-checkbox") {
161
+ @include mdc-theme-dark(".mdc-switch") {
158
162
  @include mdc-theme-prop(background-color, primary);
159
163
  }
160
164
 
@@ -174,7 +178,7 @@
174
178
  background-color: $mdc-switch-unchecked-track-color;
175
179
  opacity: .12;
176
180
 
177
- @include mdc-theme-dark(".mdc-checkbox") {
181
+ @include mdc-theme-dark(".mdc-switch") {
178
182
  background-color: $mdc-switch-unchecked-track-color-dark;
179
183
  opacity: .1;
180
184
  }
@@ -183,7 +187,7 @@
183
187
  .mdc-switch__knob {
184
188
  background-color: $mdc-switch-disabled-knob-color;
185
189
 
186
- @include mdc-theme-dark(".mdc-checkbox") {
190
+ @include mdc-theme-dark(".mdc-switch") {
187
191
  background-color: $mdc-switch-disabled-knob-color-dark;
188
192
  }
189
193
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material_components_web-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Tarasov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-21 00:00:00.000000000 Z
11
+ date: 2017-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autoprefixer-rails