Skip to content
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

Allow removing CSS declarations from the WP_Style_Engine_CSS_Declarations object #42428

Merged
merged 2 commits into from
Jul 14, 2022

Conversation

aristath
Copy link
Member

What?

Allow removing CSS declarations from the WP_Style_Engine_CSS_Declarations object.

Why?

We should be able to not only add color: red to an element... We should also be able to remove it when needed.

How?

Added a remove_declaration and a remove_declarations method in the WP_Style_Engine_CSS_Declarations object.

@aristath aristath requested review from ramonjd and andrewserong July 14, 2022 12:24
Copy link
Member

@ramonjd ramonjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like! Thanks again for your work 🙇

I just added a test and will merge after 🟢

@ramonjd ramonjd added [Package] Style Engine /packages/style-engine [Type] Enhancement A suggestion for improvement. labels Jul 14, 2022
@ramonjd ramonjd force-pushed the add/style-engine/declarations_remove_methods branch from 84a9469 to 13e8072 Compare July 14, 2022 22:47
Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, thanks for adding in these methods @aristath and for the additional tests @ramonjd ! 🎉

@ramonjd ramonjd merged commit c8b7177 into trunk Jul 14, 2022
@ramonjd ramonjd deleted the add/style-engine/declarations_remove_methods branch July 14, 2022 23:41
@github-actions github-actions bot added this to the Gutenberg 13.8 milestone Jul 14, 2022
@aristath aristath self-assigned this Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Style Engine /packages/style-engine [Type] Enhancement A suggestion for improvement.
Projects
Status: 🏆 Done
Development

Successfully merging this pull request may close these issues.

3 participants