Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #64263


Ignore:
Timestamp:
11/17/2025 11:00:05 PM (10 months ago)
Author:
joedolson
Comment:

@scruffian So this ticket is more clear, I'm correcting the text in this issue from pseudo elements to pseudo classes, since that's what this is actually about.

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.jsonBackport: Add support for pseudo classes for the block and its variations on theme.json
  • Ticket #64263 – Description

    initial v2  
    22Backport for https://github.com/WordPress/gutenberg/pull/71418
    33
    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.
     4Adds 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.
    55
    66== 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)
     7This 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)
    88
    99== How?
    10 By allowing the pseudo elements for the specific blocks in VALID_BLOCK_PSEUDO_SELECTORS, in a similar way we do for elements.
     10By allowing the pseudo classes for the specific blocks in VALID_BLOCK_PSEUDO_SELECTORS, in a similar way we do for elements.
    1111
    1212== Testing Instructions