Skip to content

Conversation

@7azemaamer
Copy link

Summary

Fixes an issue where FieldGroup content disappears on viewport resize when used
inside FieldSet alongside a sibling that switches display at a breakpoint.

Details

Applying container queries directly on <fieldset> can trigger a browser reflow
issue when a sibling element changes layout (e.g. grid → flex), causing the
container query context to break while content remains in the DOM.

This change keeps <legend> as a direct child of <fieldset> (HTML spec
compliant) and wraps remaining children in an inner <div> to isolate layout
and container queries.

Notes

This is a non-breaking change. The only behavioral difference is that selectors
like fieldset > [data-slot="field-group"] no longer match, which is unlikely to
affect real-world usage.

@vercel
Copy link
Contributor

vercel bot commented Dec 19, 2025

@7azemaamer is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant