-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 Color Palette editor default to theme/core pallete. #26783
Global Styles Color Palette editor default to theme/core pallete. #26783
Conversation
Size Change: +22 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
👋 This is a lovely improvement! I'm eager to get this in. Here are the things that I think we should fix first:
Essentially, the theme colors should always generate the CSS Custom Properties and classes that the theme expects, even if we allow the user to change the color value, the color name, or removed them from the UI. Other thoughts that I have are (non-blocking, can be addressed in subsequent PRs):
|
a4e5cef
to
6526a52
Compare
Hi @nosolow,
I updated the code to make sure when the user changes the theme color's name; the slug is not automatically changed.
I agree with this. In fact, I think even core color classes and variables should also be present all the time. |
I merged this PR so the follow-ups can continue and we avoid rebase and conflicts. If there is any additional feedback I'm happy to iterate on follow up PR's. |
Currently, we are not defaulting the global styles color palette editor to the theme colors, so if the user just wanted to make a small change to color it is hard. This PR makes us default to the theme colors.
How has this been tested?
I enabled the 2021 blocks theme.
I verified that the color palette editor appears with the theme colors by default.
I verified that If I changed the second color also used for text color, the text color of the theme changed.
I verified that If I changed the fourth color also used as the background color, the background color of the theme changed.
(Names of the colors are not appearing because of a theme issue I'm going to fix in the theme itself)