From a2c9b58284eba5b867bd03b5327de6e4137c208e Mon Sep 17 00:00:00 2001 From: Allan Chen Date: Tue, 10 Dec 2019 22:08:30 -0800 Subject: [PATCH 1/2] fix(switch): Set track border to be transparent --- packages/mdc-switch/_mixins.scss | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/mdc-switch/_mixins.scss b/packages/mdc-switch/_mixins.scss index f1ee76dc37c..f74f373fd11 100644 --- a/packages/mdc-switch/_mixins.scss +++ b/packages/mdc-switch/_mixins.scss @@ -146,7 +146,6 @@ &.mdc-switch--checked .mdc-switch__track { @include mdc-feature-targets($feat-color) { @include mdc-theme-prop(background-color, $color); - @include mdc-theme-prop(border-color, $color); } } } @@ -174,7 +173,6 @@ &:not(.mdc-switch--checked) .mdc-switch__track { @include mdc-feature-targets($feat-color) { @include mdc-theme-prop(background-color, $color); - @include mdc-theme-prop(border-color, $color); } } } @@ -272,6 +270,7 @@ @mixin mdc-switch__track_($query: mdc-feature-all()) { $feat-animation: mdc-feature-create-target($query, animation); $feat-structure: mdc-feature-create-target($query, structure); + $feat-color: mdc-feature-create-target($query, color); @include mdc-feature-targets($feat-structure) { box-sizing: border-box; @@ -288,6 +287,10 @@ mdc-switch-transition(background-color), mdc-switch-transition(border-color); } + + @include mdc-feature-targets($feat-color) { + @include mdc-theme-prop(border-color, transparent); + } } @mixin mdc-switch__thumb-underlay_($query: mdc-feature-all()) { From bc443be6a89c5a7395b70c069db9cb0ae316d19f Mon Sep 17 00:00:00 2001 From: Allan Chen Date: Wed, 11 Dec 2019 16:09:51 -0800 Subject: [PATCH 2/2] update screenshots --- test/screenshot/golden.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/screenshot/golden.json b/test/screenshot/golden.json index 12ec32a29db..5966165f70d 100644 --- a/test/screenshot/golden.json +++ b/test/screenshot/golden.json @@ -1232,35 +1232,35 @@ } }, "spec/mdc-switch/classes/baseline.html": { - "public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/09/10/17_42_51_602/spec/mdc-switch/classes/baseline.html?utm_source=golden_json", + "public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/classes/baseline.html?utm_source=golden_json", "screenshots": { "desktop_windows_chrome@77": "https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/03/21_25_57_424/spec/mdc-switch/classes/baseline.html.windows_chrome_68.png", - "desktop_windows_firefox@69": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/09/10/17_42_51_602/spec/mdc-switch/classes/baseline.html.windows_firefox_62.png", - "desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/03/21_25_57_424/spec/mdc-switch/classes/baseline.html.windows_ie_11.png" + "desktop_windows_firefox@69": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/classes/baseline.html.windows_firefox_69.png", + "desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/classes/baseline.html.windows_ie_11.png" } }, "spec/mdc-switch/mixins/density.html": { - "public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2019/09/24/18_29_48_641/spec/mdc-switch/mixins/density.html?utm_source=golden_json", + "public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/mixins/density.html?utm_source=golden_json", "screenshots": { "desktop_windows_chrome@77": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2019/09/24/18_29_48_641/spec/mdc-switch/mixins/density.html.windows_chrome_76.png", - "desktop_windows_firefox@69": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2019/09/24/18_29_48_641/spec/mdc-switch/mixins/density.html.windows_firefox_69.png", - "desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2019/09/24/18_29_48_641/spec/mdc-switch/mixins/density.html.windows_ie_11.png" + "desktop_windows_firefox@69": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/mixins/density.html.windows_firefox_69.png", + "desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/mixins/density.html.windows_ie_11.png" } }, "spec/mdc-switch/mixins/thumb-color.html": { - "public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/09/10/17_42_51_602/spec/mdc-switch/mixins/thumb-color.html?utm_source=golden_json", + "public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/mixins/thumb-color.html?utm_source=golden_json", "screenshots": { "desktop_windows_chrome@77": "https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/03/21_25_57_424/spec/mdc-switch/mixins/thumb-color.html.windows_chrome_68.png", - "desktop_windows_firefox@69": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/09/10/17_42_51_602/spec/mdc-switch/mixins/thumb-color.html.windows_firefox_62.png", - "desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/03/21_25_57_424/spec/mdc-switch/mixins/thumb-color.html.windows_ie_11.png" + "desktop_windows_firefox@69": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/mixins/thumb-color.html.windows_firefox_69.png", + "desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/mixins/thumb-color.html.windows_ie_11.png" } }, "spec/mdc-switch/mixins/track-color.html": { - "public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2019/05/03/18_19_22_511/spec/mdc-switch/mixins/track-color.html?utm_source=golden_json", + "public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/mixins/track-color.html?utm_source=golden_json", "screenshots": { "desktop_windows_chrome@77": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2019/05/03/18_19_22_511/spec/mdc-switch/mixins/track-color.html.windows_chrome_74.png", - "desktop_windows_firefox@69": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/09/10/17_42_51_602/spec/mdc-switch/mixins/track-color.html.windows_firefox_62.png", - "desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/03/21_25_57_424/spec/mdc-switch/mixins/track-color.html.windows_ie_11.png" + "desktop_windows_firefox@69": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/mixins/track-color.html.windows_firefox_69.png", + "desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/allanchen/2019/12/11/23_59_41_879/spec/mdc-switch/mixins/track-color.html.windows_ie_11.png" } }, "spec/mdc-tab-bar/classes/baseline.html": {