-
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: Fix duplication of synced block colors in CSS output #46297
Conversation
Size Change: -9.42 kB (-1%) Total Size: 1.32 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.
Thanks for cleaning this up 👍
✅ Could replicate original issue
✅ Template part outlines and icons still have purple color in the list view and block card
✅ Reusable block has colored icon in list view and block card
✅ Only one instance of the --wp-block-synced-color
custom CSS properties are included on the frontend after applying this PR
LGTM! 🚢
What?
Moves the setting of the custom CSS properties for the color of the synced blocks from
_colors.scss
to_default-custom-properties.scss
Why?
Because the rest of
_colors.scss
file is just variables having custom properties there caused them to be output in multiple block style definitions.How?
Moved the definitions from one file to another
Testing Instructions
root: { --wp-synced-block
isn't repeated multiple times in block style outputsN.B You may need to restart the watch/build process after switching to this branch to get the duplicate styles to disappear
Screenshots or screencast
Before:
![Screenshot 2022-12-05 at 1 53 11 PM](https://user-images.githubusercontent.com/3629020/205526942-5d5523ed-0240-4c5f-9320-45287330bd02.png)
After: