Skip to content

Conversation

@lindsaym-fa
Copy link
Contributor

In #1486, we updated our internal form control styles so that the value of --wa-form-control-required-content-offset had expected results across all form control components. This involved changing our selector to applied required content from parts to slots.

However, slots in the shadow DOM aren't inherently style-able from the light DOM. This means that there was no way to target the ::after pseudo-selector generating the required indicator. (see @talbs for the resulting pain and suffering)

This change does two things:

  1. Returns to using part selectors for the required indicator so that it's targetable in light DOM styles via ::part(form-control-label)::after or ::part(label)::after, depending on the component
  2. Uses display: inline-flex; for labels to avoid the heinous, enigmatic extra whitespace inherent to inline-block, which was bloating the space between the label text and required indicator for some components

I accept all warranted shunning for suggesting the last fix that in turn caused this issue.

@vercel
Copy link

vercel bot commented Oct 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
webawesome Ready Ready Preview Oct 16, 2025 11:12pm

@lindsaym-fa lindsaym-fa requested a review from talbs October 16, 2025 23:12
Copy link
Contributor

@talbs talbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tgs-so-good

Works as intended! Thanks for the quick fix. 🙏

@lindsaym-fa lindsaym-fa merged commit 9673392 into next Oct 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants