-
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
Fix: Add ability to opt out of Core color palette #36447
Conversation
@oandregal Hey 👋 Would love to get some feedback on this initial approach. In my testing, it does what we talked about in #36407 but I am not sure where the best place to execute this is. Would love to get some feedback on it :) Thanks in advance! |
Nice! Thanks for the quick turnaround. Can we do it in a way that the changes are scoped to |
@oandregal I looked into it for a while and currently don't know how exactly we can get there. The issue I am running into is that there is no hook or anything that executes after the different I'll continue to look into it though :) If anyone has any suggestions or ideas I'm all open for input :) |
Would you be able to add some tests for this new behavior? It'd help us to identify/clarify that this works. My thinking is as follows: we can inline the current |
@oandregal I moved the function call into the I also added some test cases for it :) |
One edge case that is currently not being accounted for is you opting out on the global level but then opting-in on the block level.
Since the original |
@fabiankaegy that's a good point, thanks for bringing it up. We want to retain the cascade behavior. The other thing this approach makes harder to do is that we still want the classes and CSS custom properties for the core palette to be enqueued everywhere: even if the user does not use them, patterns still can. So, I was thinking we need to approach it from a different direction. It sounds like we can still have the Would you think you'd have the time to explore that approach instead? |
@oandregal Yeah I think that approach makes more sense. I have created a follow up PR here: #36492 |
Closing in favor of #36492 |
Description
Add the ability for themes using
theme.json
to opt out of showing the "Core" color Palette and Core Gradients.Closing #36407
How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).