[wp-trac] [WordPress Trac] #62471: Fix malformed variation selector in theme.json when block uses non-trival CSS selector
WordPress Trac
noreply at wordpress.org
Tue Nov 19 01:02:56 UTC 2024
#62471: Fix malformed variation selector in theme.json when block uses non-trival
CSS selector
-----------------------------+-----------------------------
Reporter: aaronrobertshaw | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: trunk
Severity: normal | Keywords: gutenberg-merge
Focuses: |
-----------------------------+-----------------------------
This ticket tracks the backport of PHP files for the following Gutenberg
updates:
https://github.com/WordPress/gutenberg/pull/67061
The old approach to converting a block's CSS selectors for block style
variations was fairly simplistic. It worked when a block used a simple
class based selector however as blocks evolve and the Selectors API is
used more, it needs to handle more complex selectors such as the List
block's `.wp-block-list:not(.wp-block-list .wp-block-list)`.
The changes in the linked Gutenberg PR prevent generation of malformed
block style variation selectors when a block's selector leverages a CSS
function such as `:not()` or chains multiple classes e.g. `.wp-block-list
.my-custom-class`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62471>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list