-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Global Styles: Fix black inconsistencies in sidebar #40055
Conversation
packages/edit-site/src/components/global-styles/icon-with-current-color.js
Show resolved
Hide resolved
Size Change: +86 B (0%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one! Important detail.
On a separate note, I really wish we could have some sort of variable system so we wouldn't have to remember that the border radius is 2px, and the default color is #1e1e1e, but that those were just defined in one place and leveraged from that source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @mirka for working on this!
I had a look at the Global Styles sidebar, and found a few places where the text color is still not #1e1e1e
:
- The "screen title" (but not the "back" chevron icon) rendered by
<ScreenHeader />
(caused by theHeading
component and this setting in particular, which I'm not sure is still relevant?)
- The text in the
<FontFamilyControl />
component (can be seen when navigating to the "Typography" -> "Text" screen)
- The text in the
<LineHeightControl />
component (can be seen when navigating to the "Typography" -> "Text" screen) — I guess we should look into changing the text color inInputControl
to affect all of its descendant components?
On a separate note, I really wish we could have some sort of variable system so we wouldn't have to remember that the border radius is
2px
, and the default color is#1e1e1e
, but that those were just defined in one place and leveraged from that source.
Hey @jasmussen , when you mention these default values, do you mean that they should be the default for the Gutenberg "app", or the default for @wordpress/components
?
Regarding the @wordpress/components
package:
- we do have a shared configuration (overall config, colors, and more in that
utils
folder), but I don't believe that we use#1e1e1e
as the default text color - we'd also like to tidy up this internal package configuration (and reconcile it with the sass variables as we slowly migrate to CSS-in-JS styles), although we're currently focused on other projects.
- finally, we are also definitely interested in exposing some of these "variables" for consumers of the package to tweak, and we're looking at the work on the new navigation with interest as it may help us to define these requirements better
packages/edit-site/src/components/global-styles/icon-with-current-color.js
Show resolved
Hide resolved
# Conflicts: # packages/components/CHANGELOG.md # packages/edit-site/src/components/global-styles/navigation-button.js # packages/edit-site/src/components/global-styles/screen-root.js # packages/edit-site/src/components/global-styles/style.scss
Part of #38934
What?
Fixes inconsistencies in the main black color used in the Global Styles sidebar. The correct black is
#1e1e1e
.Why?
For visual consistency.
How?
IconWithCurrentColor
that adds afill: currentColor
style to the icon.color: inherit
to theItemGroup
Item, ensure that the button color isn't overridden by a UA color.color
of theSurface
component from#000000
to#1e1e1e
. (This wrong color was being inherited throughout the first sidebar view.)Testing Instructions
Check the colors in the Global Styles sidebar.
Screenshots or screencast
👇 For these block icons, I don't want to mess with the colors here because I think block icons can technically be colored SVGs.