-
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
Remove colors classes from the packages that are already provided by global styles #34510
Conversation
these are enqueued already via the global stylesheet.
these are enqueued already via the global stylesheet.
these are enqueued already via the global stylesheet.
Size Change: -2.08 kB (0%) Total Size: 1.04 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.
Let's hope this time it works better :)
@mixin gradient-colors() { | ||
// Our classes uses the same values we set for gradient value attributes, and we can not use spacing because of WP multi site kses rule. | ||
// Deprecated from UI, kept for back-compat. | ||
@mixin gradient-colors-deprecated() { |
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.
Upon reviewing the list with fresh eyes today, I've found that there were some gradient colors that are deprecated (no longer in the list of gradients we offer but need to keep in case they had been used). Added them.
Fixes #34138
This is the second try. We first tried it at #33924 that had to be reverted at #34108 The reason for the revert was that not all themes had the color classes. For example, classic themes that don't provide a palette. This is now solved because we landed #34334 that enqueues the presets for all themes.
How to test
The following instructions work for both the front-end and the editor and any kind of theme:
wp-block-library-css
stylesheet.trunk
, if you inspected the same stylesheet you should also find the CSS for the black color which you should not with this PR:Theme with
theme.json
and no colors providedsettings.color.palette
andsettings.color.gradients
section.Theme without
theme.json
and no colors providedfunctions.php
file and comment this line: