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
Merged

Fix menu item colors #15531

merged 2 commits into from
May 30, 2019

Conversation

jasmussen
Copy link
Contributor

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

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.
@jasmussen jasmussen added the [Type] Code Quality Issues or PRs that relate to code quality label May 9, 2019
@jasmussen jasmussen self-assigned this May 9, 2019
@gziolo
Copy link
Member

gziolo commented May 9, 2019

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

@m-e-h
Copy link
Member

m-e-h 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
Copy link
Contributor Author

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.

@gziolo gziolo added the Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code label May 10, 2019
@jasmussen jasmussen added this to the 5.9 (Gutenberg) milestone May 28, 2019
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

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
@jasmussen jasmussen deleted the try/fix-shortcuts branch May 30, 2019 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keyboard shortcuts use different colors.
4 participants