Changes between Initial Version and Version 2 of Ticket #64263
- Timestamp:
- 11/17/2025 11:00:05 PM (10 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #64263
- Property Keywords has-unit-tests added
- Property Summary Backport: Add support for pseudo elements for the block and its variations on theme.json → Backport: Add support for pseudo classes for the block and its variations on theme.json
-
Ticket #64263 – Description
initial v2 2 2 Backport for https://github.com/WordPress/gutenberg/pull/71418 3 3 4 Adds support for pseudo elements on the `core/button` block for ( ':hover', ':focus', ':focus-visible', ':active' ) at the theme.json level. This is also allowing the block's variations to control the same pseudo elements, so now we can style hover for the outline variation too.4 Adds support for pseudo classes on the `core/button` block for ( ':hover', ':focus', ':focus-visible', ':active' ) at the theme.json level. This is also allowing the block's variations to control the same pseudo classes, so now we can style hover for the outline variation too. 5 5 6 6 == Why? 7 This is needed ahead of https://github.com/WordPress/gutenberg/issues/38277 since right now we are only supporting pseudo elements on links and button elements, we also want to support them at the block level. This PR brings them in alignment and opens the door to support things like :hover for other blocks that don't have an element (like group for example)7 This is needed ahead of https://github.com/WordPress/gutenberg/issues/38277 since right now we are only supporting pseudo classes on links and button elements, we also want to support them at the block level. This PR brings them in alignment and opens the door to support things like :hover for other blocks that don't have an element (like group for example) 8 8 9 9 == How? 10 By allowing the pseudo elements for the specific blocks in VALID_BLOCK_PSEUDO_SELECTORS, in a similar way we do for elements.10 By allowing the pseudo classes for the specific blocks in VALID_BLOCK_PSEUDO_SELECTORS, in a similar way we do for elements. 11 11 12 12 == Testing Instructions
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)