Conversation
ramonjd
commented
Aug 2, 2022
andrewserong
approved these changes
Aug 2, 2022
Contributor
andrewserong
left a comment
There was a problem hiding this comment.
Nice one, thanks for the quick follow-up. I like the merging of wp_style_engine_get_stylesheet_from_css_rules() and wp_style_engine_add_to_store() 👍, just left a comment on your naming comment, but I don't feel too strongly about which way we go there. I'll be curious to see what @aristath thinks 🙂
Re-tested that Layout and Elements supports are still working correctly, and the optimize flag looks good to me.
LGTM!
packages/style-engine/phpunit/class-wp-style-engine-processor-test.php
Outdated
Show resolved
Hide resolved
Adding tests Updating comments
…e_engine_add_to_store()` into `wp_style_engine_get_stylesheet()`
fbe9d11 to
680ac22
Compare
…et_from_css_rules Formatting tests for readability
680ac22 to
5b288e9
Compare
25 tasks
Member
|
Tagged for the changelog. |
37 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
A follow up to:
This PR:
WP_Style_Engine_Processor->get_css()which allows for bypassing the selector combination optimizeationwp_style_engine_get_stylesheet_from_css_rules()andwp_style_engine_add_to_store()intowp_style_engine_get_stylesheet()Why and how?
Testing Instructions
For the optimize flag:
For the merged function:
Example
The frontend should appear as expected:
The styles should be output correctly:
gutenberg_get_layout_style() should return the compiled CSS for the single block only (and not the cumulated stylesheet)