Skip to content
Discussion options

You must be logged in to vote

Agree the order isn't enforced: none of these components read context from each other. FieldSet is a plain <fieldset> and FieldGroup is a <div> with classes. But some of those classes depend on DOM structure, and that's where a <form> in between changes things. From field.tsx:

// FieldGroup
"group/field-group @container/field-group flex w-full flex-col gap-7 ... [&>[data-slot=field-group]]:gap-4"
  1. Spacing of nested groups. A FieldGroup that is a direct child of another one gets gap-4 instead of gap-7. With a <form> (or a FieldSet) in between, the selector no longer matches, so the inner group goes back to gap-7. display: contents on the form doesn't fix this: it changes layout, but child…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hadikman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants