When to nest "fields" inside a "field"? #2026
-
I'm confused by the semantics of either the
and from the examples in https://fomantic-ui.com/collections/form.html#fields I understand that But then there is also the second example in https://fomantic-ui.com/collections/form.html#form (the one that contains Shipping & Billing Information) that nests I am stumbling across the checkbox margin styles added here https://github.com/fomantic/Fomantic-UI/pull/613/files and commented on by @lubber-de here #613 (review) suggesting to me that there must be a valid use case for this. .ui.ui.form .field .fields .field:not(:only-child) .ui.checkbox {
margin-top: @checkboxFieldTopMargin / 2;
} However, I still don't understand when/why I would want to even try a nesting like that, since I don't find it documented. Can you enlighten me? I also found this discussion that may be related: #651 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Additionally, I'm confused by the duplicated |
Beta Was this translation helpful? Give feedback.
-
By using |
Beta Was this translation helpful? Give feedback.
By using
fields
inside afield
you can specify only one single label for several fields. Usingfields
directly as the parent needs to have labels for each field separately.See difference here:
https://jsfiddle.net/lubber/42nqrgbj/4/