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 box regression. #6350

Merged
merged 1 commit into from
Apr 30, 2018
Merged

Fix select box regression. #6350

merged 1 commit into from
Apr 30, 2018

Conversation

jasmussen
Copy link
Contributor

Fixes #6326.

This "undoes" a change to the select box styling, and polishes the focus style as well.

The regression was to introduce a padding change that conflicted with upstream select box styles. This essentially reverts that. This also polishes the focus styles a bit.

Screenshots. Chrome mac:

screen shot 2018-04-23 at 11 15 57

Chrome Windows:

screen shot 2018-04-23 at 11 16 10

Windows high contrast:

screen shot 2018-04-23 at 11 38 50

All those are focused.

Steps to test:

  • Verify that select boxes look and behave right in all the browsers and platforms. Verify that text is never cropped inside.

Fixes #6326.

This "undoes" a change to the select box styling, and polishes the focus style as well.

The regression was to introduce a padding change that conflicted with upstream select box styles. This essentially reverts that. This also polishes the focus styles a bit.
@gziolo gziolo added this to the 2.8 milestone Apr 23, 2018
@aduth
Copy link
Member

aduth commented Apr 25, 2018

What's the context for the original change which is being undone here?

@jasmussen jasmussen self-assigned this Apr 26, 2018
@jasmussen jasmussen requested review from aduth and a team April 26, 2018 06:46
@jasmussen
Copy link
Contributor Author

Looks like I forgot to ask for reviews on this :D

What's the context for the original change which is being undone here?

The context is largely this PR: #5605 and subsequently this ticket: #4963

That is — input styles are heavily (and I might say heavy-handedly) styled in WordPress up-stream.

Because of how Gutenberg uses input fields and text areas for many things that aren't traditional form elements (the block-list is one wonderful example), we kind of have to make our own styles. Until 5605 was merged, we had a big mix of styles, which was especially jarring when you compared the input style of the upstream-styled Excerpt field in the sidebar, to the Shortcode input box which was sort of unstyled then re-styled. Kind of a mess.

5605 was an attempt to rectify that, and clean things up, despite having to override upstream styles. I've created mix-ins to make the focus styles more reusable in https://github.com/WordPress/gutenberg/blob/master/edit-post/assets/stylesheets/_mixins.scss#L180, and hope that one day we can migrate those upstream so we don't have to override anything.

@notnownikki
Copy link
Member

Looks good to me in all the browsers I have (firefox, chrome)

@jasmussen
Copy link
Contributor Author

Thanks. Merging as it fixes an issue. If we are to revisit overriding styles in the first place, probably best done separately.

@jasmussen jasmussen merged commit eabcb9b into master Apr 30, 2018
@jasmussen jasmussen deleted the fix/select-box-height branch April 30, 2018 12:14
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

Successfully merging this pull request may close these issues.

4 participants