Overall Goal
Let users style the active item in interactive blocks—for example, the current page in Navigation or the selected tab in Tabs—without writing custom CSS or editing theme.json by hand.
This builds on the existing style-state work:
- Pseudo states, such as
:hover and :focus.
- Responsive states, such as tablet and mobile.
- Custom states, such as the current menu item.
Prior art: #57719.
Tasks
Nice to Have
Overall Goal
Let users style the active item in interactive blocks—for example, the current page in Navigation or the selected tab in Tabs—without writing custom CSS or editing theme.json by hand.
This builds on the existing style-state work:
:hoverand:focus.Prior art: #57719.
Tasks
Navigation Link: Add color, border, and spacing supports
Make state styling useful beyond typography.
Global Styles: Add pseudo-state controls for Navigation Link
Expose hover, focus, focus-visible, and active.
Block Style States: Add a custom-state axis to editor controls
Support custom states alongside the existing viewport and pseudo-state axes.
#78769 — Navigation Link: Add
-currentstate to editor controlsSupport
-currentin Global Styles and individual Navigation Link blocks.Tabs: Add
-currentstate to editor controlsStyle the active tab using
[aria-selected="true"].Nice to Have
Make custom states available to third-party blocks
Define a public registration API across PHP and JavaScript, including labels, selectors, editor controls, and theme.json handling. Document and validate
selectors.statesin the block.json schema as part of this work.#76367 — Navigation Submenu: Support independent current-item styling
Allow links inside submenu dropdowns to be styled separately.