-
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
Try: Fix admin-theme colors in the canvas. #24408
Conversation
Size Change: -991 B (0%) Total Size: 1.16 MB
ℹ️ View Unchanged
|
// It is important to include these styles in all built stylesheets | ||
// This allows to CSS variables post CSS plugin to generate fallbacks. | ||
:root { | ||
@include admin-scheme(#007cba); |
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.
interesting!
If we remove this from here, we need to move it to all the edit-*
stylesheets + list-reusable-blocks
.
Alternatively, we can define the fallback variables in the config of the PostCSS CSS variables plugin.
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.
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.
the fallback can be tested on IE11 or you can just check that anytime the variable is used on the produced CSS, there's always a default value applied.
Thinking again, moving this to edit-*
won't solve the issue of fallbacks because the fallback won't be applied to stylesheets like "components"... So the only way is to actually define the fallback in the plugin's config.
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.
How do we best move forward with this one?
dc4e054
to
6c9969b
Compare
I pushed a fix that takes into account the fallbacks. It should be good to go now. |
You're the best, Riad. Thank you. |
The <Button> component styles from @wordpress/components were missing color styles. This is due to a change in @wordpress/base-styles where a different technique for providing the default button colors was implemented in WordPress/gutenberg#24408. As a temporary measure, this restores the previous code by copying it here directly.
The <Button> component styles from @wordpress/components were missing color styles. This is due to a change in @wordpress/base-styles where a different technique for providing the default button colors was implemented in WordPress/gutenberg#24408. As a temporary measure, this restores the previous code by copying it here directly.
The globally set CSS variables for the WP-admin color scheme were overridden, just inside the editing canvas.
Before:
After:
This is a draft PR because based on the code comment, it looks like the rule removed was necessary. I'd appreciate advice on where to move it.