Re: [csswg-drafts] [css-forms-1] Include fieldset and legend (#11983)

The CSS Working Group just discussed `[css-forms-1] Include fieldset and legend`.

<details><summary>The full IRC log of that discussion</summary>
&lt;jarhar> lwarlow: this was discussed at csswg f2f, and these elements are going to get base appearance<br>
&lt;jarhar> lwarlow: while prototyping this in chrome i realized that resolution leads to a fairly bad looking fieldset legend because you have no padding and stuff like that<br>
&lt;jarhar> lwarlow: the question is what styles do we actualy want to apply besides the border change<br>
&lt;jarhar> lwarlow: html defines some, and i dont know if they make sense<br>
&lt;jarhar> lwarlow: fieldset has a weird padding block<br>
&lt;jarhar> zcorpan: is the idea to get rid of the special fieldset behavior?<br>
&lt;jarhar> annevk: can you show a picture or something?<br>
&lt;jarhar> zcorpan: still having some padding makes sense<br>
&lt;jarhar> lwarlow: as it is resolved, you dont have any padding at all<br>
&lt;jarhar> lwarlow: depending on your interpretation<br>
&lt;jarhar> lwarlow: the fieldset basically just becomes a border, and right now legend is just a plain child<br>
&lt;jarhar> lwarlow: part of me thinks that the legend might want to be rendered with a bolder font weight like we do for optgroups to signify that this is the legend<br>
&lt;jarhar> lwarlow: and then the padding value is the main thing that we have to think about<br>
&lt;jarhar> annevk: the optgroup legend also has some kind of padding? can we do the same?<br>
&lt;emilio> Sorry, not on the meeting, but legend already doesn't have any magic behavior right?<br>
&lt;jarhar> lwarlow: with optgroup, the options within an optgroup are shifted over<br>
&lt;emilio> I think we should just get rid of the magic fieldset layout<br>
&lt;jarhar> lwarlow: you dont get internal spacing<br>
&lt;jarhar> lwarlow: if you have radio buttons inside your fieldset, there is no default spacing between them<br>
&lt;jarhar> annevk: we dont have to inherit all of that. we just have to create some sort of plain appearnace people can style. if we have a border thing because fieldset which has a border, and the legend is at the top, and the content has the padding then its clear that its below the heading, then thats a clear minimal set of styles<br>
&lt;jarhar> zcorpan: would it be reasonable to get rid of the border and padding as well?<br>
&lt;jarhar> lwarlow: i think border makes sense<br>
&lt;jarhar> masonf: people usually style it to have no border right? if thats the most common thing then maybe that is the right way<br>
&lt;jarhar> lwarlow: ive never really seen this in the wild<br>
&lt;jarhar> zcorpan: appearnace base is an opt in, and we expect pages to have their own styling.<br>
&lt;jarhar> ntim: it should be usable by default.<br>
&lt;jarhar> annevk: i think it might still be ok even as a default<br>
&lt;jarhar> annevk: i think you do want to add the bold on legend to make it heading like<br>
&lt;jarhar> masonf: if you made fieldset legend bold and got rid of the border it would be good<br>
&lt;dbaron> Do we want "font-weight: bold" or "font-weight: bolder".   I suspect we want "bolder" but I'm not 100% sure.<br>
&lt;jarhar> astearns: looking at the discussion we had 2 weeks ago, there is an assertion that making a fieldset look like a div makes it useless<br>
&lt;jarhar> astearns: and that adding a border makes it look like other controls<br>
&lt;jarhar> lwarlow: i think that making it a div doesnt make it useless, that was a misunderstanding<br>
&lt;jarhar> lwarlow: some people think that is what fieldset is useful for<br>
&lt;jarhar> lwarlow: it makes all of its contents disabled<br>
&lt;jarhar> lwarlow: theres a11y stuff to it besides just the layout. it laying out like a div is fine<br>
&lt;jarhar> annevk: we could make it more like a paragraph, so consecutive fieldsets arent bunched up. default top bottom margin of 1em<br>
&lt;jarhar> annevk: if youre not going to do a border then we could do that to indicate separation<br>
&lt;jarhar> annevk: i think fairly minimal styling is fine<br>
&lt;dbaron> s/contents disabled/contents disabled (excluding descendants of the legend)/<br>
&lt;jarhar> zcorpan: we dont have margins for form or article or section<br>
&lt;jarhar> annevk: most of those are standalone, or they would have their own block level descendants, which in fieldset is not the case<br>
&lt;jarhar> masonf: you could put it on legend<br>
&lt;jarhar> astearns: i dont think were coming to consensus on what to do here. i think it would be good to get images of different options so that we have concrete things to choose between here. luke can you do that?<br>
&lt;jarhar> lwarlow: yes<br>
&lt;jarhar> annevk: we could do a social media poll<br>
&lt;jarhar> astearns: the csswg allows polls in their github discussions<br>
&lt;jarhar> annevk: then we can invite people, sure<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11983#issuecomment-4261536678 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 16 April 2026 16:03:33 UTC