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

MDC Select: Inconsistent styles across browsers for CSS-only multi-select #1751

Closed
acdvorak opened this issue Dec 13, 2017 · 2 comments
Closed
Assignees

Comments

@acdvorak
Copy link
Contributor

What MDC-Web Version are you using?

0.27.0

What browser(s) is this bug affecting?

Safari 11.0.1 (desktop)

What OS are you using?

macOS Sierra 10.12.6

What are the steps to reproduce the bug?

  1. View the mdc-select demo page in both Safari and Chrome
  2. Scroll down to "Select Multiple - CSS Only" section

What is the expected behavior?

The height of each <option class="mdc-list-item"> element should be 48px in all browsers.

What is the actual behavior?

Safari appears to ignore our height and padding values on <option class="mdc-list-item"> elements. As a result, they are rendered at a much shorter height than in other browsers, which deviates from spec.

Any other information you believe would be useful?

It looks like Safari isn't respecting -moz-appearance: none on .mdc-multi-select.

Screenshot of Chrome vs. Safari:
screenshot image

@acdvorak acdvorak changed the title MDC Select/MDC List: Multi-select options have incorrect height/padding in Safari MDC Select: Inconsistent styles across browsers for CSS-only multi-select Dec 13, 2017
@acdvorak
Copy link
Contributor Author

Firefox also appears to style the label on an <optgroup> with italics by default:

Screenshot of Chrome vs. Firefox

@kfranqueiro
Copy link
Contributor

While we may have control over the italics, we don't have control over padding/margin in Safari at all. Some of this is a result of inconsistent cross-browser behavior in what browsers do/don't allow us to customize over native selects.

Another example is how Chrome overrides the selection color when the multiselect is focused, using the system selection color instead (at least on OS X).

We discussed this with design yesterday, and we ultimately want to aim to remove the native multiselect example, given the following factors:

  • The aforementioned cross-browser inconsistencies beyond our control
  • The fact that this doesn't directly align with anything in the Material Guidelines, whereas a checkbox list is present in the guidelines and can also be accomplished CSS-only if desired

I've entered #1792 to pursue checkbox list and decommission multiselect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants