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 menu item colors #15531

Merged
merged 2 commits into from May 30, 2019

Conversation

@jasmussen
Copy link
Contributor

commented May 9, 2019

Fixes #15387

This PR fixes an inconsistency in menu item colors. There were some redundant CSS that had not been cleaned up properly with the move to the color mixins.

Additionally it replaces the use of opacity for the lighter text in the menus, and uses the color variables instead, as those colors do not need to work on differently colored backgrounds, just white.

Screenshots:

Screenshot 2019-05-09 at 12 44 01

Screenshot 2019-05-09 at 12 44 08

Fix menu item colors
Fixes #15387

This PR fixes an inconsistency in menu item colors. There were some redundant CSS that had not been cleaned up properly with the move to the color mixins.

Additionally it replaces the use of opacity for the lighter text in the menus, and uses the color variables instead, as those colors do not need to work on differently colored backgrounds, just white.
@gziolo

This comment has been minimized.

Copy link
Member

commented May 9, 2019

There is a related issue with menu hover state missing which could be tackled next: #12262 :)

@m-e-h

This comment has been minimized.

Copy link
Member

commented May 9, 2019

It can be a crapshoot sometimes when, in a mixin, you define a color without also defining the background-color.

@mixin menu-style__neutral() {
	border: none;
	box-shadow: none;
	color: $dark-gray-600;
}

A more predictable and cleaner approach might be to define the color where we're defining the background for both of these components, on .components-popover__content. https://github.com/WordPress/gutenberg/blob/master/packages/components/src/popover/style.scss#L139

Maybe color: inherit in the neutral mixin if we need something there.

@jasmussen

This comment has been minimized.

Copy link
Contributor Author

commented May 10, 2019

Good call, thank you. The inherit didn't work out as intended, but it definitely was a good point about not including the color, I actually noticed a few regressions it caused 😱 — so I've restored, but fixed, the colors.

@jasmussen jasmussen added this to the 5.9 (Gutenberg) milestone May 28, 2019

@jorgefilipecosta
Copy link
Member

left a comment

I verified with this changes the shortcuts don't appear with different colors anymore, and they don't use opacity 👍

@jasmussen jasmussen merged commit 36ac702 into master May 30, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@jasmussen jasmussen deleted the try/fix-shortcuts branch May 30, 2019

nicolad added a commit to nicolad/gutenberg that referenced this pull request Jun 15, 2019

Fix menu item colors (WordPress#15531)
* Fix menu item colors

Fixes WordPress#15387

This PR fixes an inconsistency in menu item colors. There were some redundant CSS that had not been cleaned up properly with the move to the color mixins.

Additionally it replaces the use of opacity for the lighter text in the menus, and uses the color variables instead, as those colors do not need to work on differently colored backgrounds, just white.

* Address feedback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.