Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
fix(switch): set track border to be transparent (#5323)
Browse files Browse the repository at this point in the history
  • Loading branch information
allan-chen authored Dec 12, 2019
1 parent 878a08b commit 397905b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
7 changes: 5 additions & 2 deletions packages/mdc-switch/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -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;
Expand All @@ -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()) {
Expand Down
24 changes: 12 additions & 12 deletions test/screenshot/golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 397905b

Please sign in to comment.