Block Styles: Fix block style variation selector generation#6053
Block Styles: Fix block style variation selector generation#6053aaronrobertshaw wants to merge 2 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core SVNCore Committers: Use this line as a base for the props when committing in SVN: GitHub Merge commitsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
|
Thanks for the comprehensive tests. |
Syncs the changes from WordPress/gutenberg#58051.
These changes fix the generation of selectors for block style variations. Previously, an incorrect CSS selector could be generated if the block's base selector used an element tag etc.
To test:
Run:
npm run test:php -- --filter Tests_Theme_wpThemeJsonIf you want to go further and test manually:
is-style-darkis appended to theptag rather than prefixing itTrac ticket: https://core.trac.wordpress.org/ticket/60453
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.