Skip to content

Form elements in Global Styles - iteration for WP 7.3 #86039

Open
0 of 4 issues completed
Open

Description

@MaggieCabrera

Overall goal

Let users style common form elements consistently from Global Styles, without writing custom CSS or editing theme.json by hand.

In 7.2, labels became a theme.json element, form elements were listed in Global Styles, and text inputs and selects got state styles in theme.json. This iteration picks up what's left, mostly blocks where form element styles don't apply yet.

Previous iteration: #34198.

Scope for this release

Nice to have

Activity

  1. added
    [Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).
    [Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.
    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json
    [Type] IterationScoped iteration of an effort from a tracking issue or overview issue ideally for a major release.
    on Oct 30, 2026
  2. himanshupathak95 commented on Nov 6, 2026

    @himanshupathak95
    Contributor

    Hi @MaggieCabrera, I checked the current trunk and found that Next Page and Previous Page still lack hover and focus state support (also couldnt find any related discussion specifically around this issue). Styles set directly under these blocks’ :hover and :focus settings in theme.json are ignored by both the editor and front-end CSS generators. Next Page’s States menu also only shows the viewport options. I think there is scope for a focused fix for these two blocks, using the existing state controls and CSS handling.

    Do you think it would be a reasonable next step for this to land?

  3. MaggieCabrera commented on Nov 9, 2026

    @MaggieCabrera
    ContributorAuthor

    Hi @MaggieCabrera, I checked the current trunk and found that Next Page and Previous Page still lack hover and focus state support (also couldnt find any related discussion specifically around this issue). Styles set directly under these blocks’ :hover and :focus settings in theme.json are ignored by both the editor and front-end CSS generators. Next Page’s States menu also only shows the viewport options. I think there is scope for a focused fix for these two blocks, using the existing state controls and CSS handling.

    Do you think it would be a reasonable next step for this to land?

    Do they inherit the styles from the general link element? there's also the possibility to style them using the link element from within the block itself, I believe. I'm not against including it, but I suppose we will find a bunch of other blocks with links that will require the same treatment. Definitely agree with having the ability to style them via theme.json in some form, about the UI, I would open that for discussion too.

  4. himanshupathak95 commented on Nov 11, 2026

    @himanshupathak95
    Contributor

    there's also the possibility to style them using the link element from within the block itself, I believe.

    Thanks, Maggie! I checked this and found out that the general Link styles work for both links, and elements.link on the parent Pagination block works for both together.

    The issue is with elements.link on Next Page or Previous Page itself. For example, it generates a selector like .wp-block-query-pagination-next a:hover, but the class is on the itself, so the rule doesn’t match. I saw this on the front end and in the editor.

    I'd start by fixing that selector for these two blocks as a good first step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] EnhancementA suggestion for improvement.[Type] IterationScoped iteration of an effort from a tracking issue or overview issue ideally for a major release.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions