Skip to content

Global Styles: Expose Labels under Form controls - #81786

Draft
amitraj2203 wants to merge 3 commits into
codex/global-styles-forms-sectionfrom
add/81650-expose-labels-global-styles
Draft

amitraj2203 wants to merge 3 commits into
codex/global-styles-forms-sectionfrom
add/81650-expose-labels-global-styles

Conversation

@amitraj2203

Copy link
Copy Markdown
Contributor

What?

Adds the label element to the Form controls screen in Global Styles.

Part of #34198. Fixes #81650.

Stacked on #81645 — this PR targets that branch and should merge after it.

Why?

Labels can be styled in theme.json since #81160, but there was no UI for it. This exposes them alongside Inputs and Selects.

How?

Adds Labels to the typography and color element lists on the Form controls screen, a description entry, and the /elements/form-controls/typography/label route.

Testing Instructions

Note: #81645's base predates #81160, so on this branch as-is the control renders but does not apply. To test, merge trunk in first — that is the state verified below, and the state that will exist once #81645 is rebased.

  1. Activate a block theme and open Appearance > Editor > Styles.
  2. Open Elements > Form controls.
  3. Confirm Typography and Colors both list Labels, Inputs, Selects.
  4. Open Labels under Typography and change the font.
  5. Under Colors, set a Labels text colour, save, and confirm it applies to a <label> on the front end.

Verified locally: selecting a colour writes styles.elements.label.color.text and emits label { color: var(--wp--preset--color--accent-1); }.

Use of AI Tools

An AI coding assistant was used.

MaggieCabrera and others added 3 commits August 14, 2026 19:00
Adds the label element to the Form controls screen so labels can be
styled from Global Styles without editing theme.json.

Fixes #81650.
@amitraj2203 amitraj2203 added the [Type] Enhancement A suggestion for improvement. label Aug 18, 2026
@amitraj2203 amitraj2203 self-assigned this Aug 18, 2026
@github-actions

Copy link
Copy Markdown

Size Change: +88 B (0%)

Total Size: 7.73 MB

📦 View Changed
Filename Size Change
build/scripts/edit-site/index.min.js 336 kB +17 B (+0.01%)
build/scripts/editor/index.min.js 532 kB +71 B (+0.01%)

compressed-size-action

@MaggieCabrera
MaggieCabrera force-pushed the codex/global-styles-forms-section branch 2 times, most recently from 705c9d0 to 6639633 Compare September 15, 2026 15:20
@MaggieCabrera
MaggieCabrera force-pushed the codex/global-styles-forms-section branch from f20da95 to f3c0c96 Compare September 29, 2026 10:30
@MaggieCabrera
MaggieCabrera force-pushed the codex/global-styles-forms-section branch from c931c87 to 1680f55 Compare October 14, 2026 18:58

This branch has not been deployed

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

Labels

[Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants