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): Disable ripple/state pseudos for native multiselect #1781

Merged
merged 3 commits into from
Dec 15, 2017
Merged
Changes from 1 commit
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
10 changes: 10 additions & 0 deletions packages/mdc-select/mdc-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,16 @@ $mdc-select-menu-transition: transform 180ms $mdc-animation-standard-curve-timin
&:last-child {
margin-bottom: 8px;
}

// Browsers are inconsistent in what they allow us to override, and some (e.g. Chrome) don't allow overriding the
// OS-determined selection color, which states styles are not going to play well with.
// Additionally, Firefox seems to ignore position: relative on option elements, which causes the pseudo elements
// that we use for ripple/states to position and size themselves relative to the entire body instead.
// Disabling states-specific styles on multi-select options altogether is the most straightforward recourse.
&::before,
&::after {
content: none;
}
}
// stylelint-enable plugin/selector-bem-pattern

Expand Down