Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(select): Remove blue background in IE on focus #3497

Merged
merged 13 commits into from
Sep 5, 2018
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/mdc-select/mdc-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
display: none;
}

&::-ms-value {
background-color: transparent;
color: inherit;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would replacing this with @include mdc-select-ink-color($mdc-select-ink-color); obviate the need for #3513?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still need both PRs.

mdc-select-ink-color() specifically excludes --disabled, which is why the browser's default font color was getting used.

We either need to update mdc-select-ink-color() so that it includes --disabled, or set a disabled-specific color.

It seems like the simplest thing is to set the color once at a high level, and have all children just inherit it.

}

// counteracts the extra text padding that Firefox adds by default
@-moz-document url-prefix("") {
text-indent: -2px;
Expand Down
12 changes: 6 additions & 6 deletions test/screenshot/golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,13 @@
"desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/05/08_47_52_369/spec/mdc-select/classes/disabled.html.windows_ie_11.png"
}
},
"spec/mdc-select/issues/3230.html": {
"public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/08/28/00_57_26_335/spec/mdc-select/issues/3230.html",
"spec/mdc-select/issues/3230-3496.html": {
"public_url": "https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/05/07_46_19_171/spec/mdc-select/issues/3230-3496.html?utm_source=golden_json",
"screenshots": {
"desktop_windows_chrome@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/08/28/00_57_26_335/spec/mdc-select/issues/3230.html.windows_chrome_68.png",
"desktop_windows_edge@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/08/28/00_57_26_335/spec/mdc-select/issues/3230.html.windows_edge_17.png",
"desktop_windows_firefox@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/08/28/00_57_26_335/spec/mdc-select/issues/3230.html.windows_firefox_61.png",
"desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/travis/2018/08/28/00_57_26_335/spec/mdc-select/issues/3230.html.windows_ie_11.png"
"desktop_windows_chrome@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/05/07_46_19_171/spec/mdc-select/issues/3230-3496.html.windows_chrome_68.png",
"desktop_windows_edge@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/05/07_46_19_171/spec/mdc-select/issues/3230-3496.html.windows_edge_17.png",
"desktop_windows_firefox@latest": "https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/05/07_46_19_171/spec/mdc-select/issues/3230-3496.html.windows_firefox_61.png",
"desktop_windows_ie@11": "https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/05/07_46_19_171/spec/mdc-select/issues/3230-3496.html.windows_ie_11.png"
}
},
"spec/mdc-select/mixins/bottom-line-color.html": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,22 @@
<title>Issue 3230 - MDC Web Screenshot Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../out/mdc.select.css">
<link rel="stylesheet" href="../../../out/mdc.typography.css">
<link rel="stylesheet" href="../../../out/spec/fixture.css">
<link rel="stylesheet" href="../../../out/spec/mdc-select/fixture.css">

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-118996389-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-118996389-2');
</script>
</head>

<body class="test-container">
<body class="test-container mdc-typography">
<main class="test-viewport test-viewport--mobile">
<div class="test-layout">

<!-- This tests that the outlined select will still turn the primary color when it does not have a floating label -->
<!-- See https://github.com/material-components/material-components-web/issues/3230 -->
<!--
This page tests the following regressions:
1. Outlined select should still turn the primary color when it does not have a floating label.
https://github.com/material-components/material-components-web/issues/3230
2. IE's default blue background should be hidden on focus.
https://github.com/material-components/material-components-web/issues/3496
-->
<div class="test-cell test-cell--select">
<div class="mdc-select mdc-select--outlined">
<select class="mdc-select__native-control" id="my-select" autofocus>
Expand Down