Skip to content

[css-forms-1] Add fieldset and legend - #11981

Merged
lukewarlow merged 1 commit into
w3c:mainfrom
lukewarlow:fieldset-legend
Apr 10, 2026
Merged

[css-forms-1] Add fieldset and legend#11981
lukewarlow merged 1 commit into
w3c:mainfrom
lukewarlow:fieldset-legend

Conversation

@lukewarlow

@lukewarlow lukewarlow commented Mar 22, 2025

Copy link
Copy Markdown
Member

See #11983

@nt1m

nt1m commented Mar 22, 2025

Copy link
Copy Markdown
Member

I think we should spend some time thinking about what kind of improvements we want to give to fieldset/legend, and whether it makes sense for them to follow the appearance: base pattern.

e.g. for fieldset, if the main thing we want to change is the border to also be currentColor to match the rest, it might just be possible to change the existing border: 2px groove threedface to border: 1px solid currentColor directly everywhere with negligible/no web compat breakage. We've changed the border-color before for things like table or hr successfully, so I don't think this is infeasible.

For legend, I've heard valid complaints about the layout being hardcoded and not overridable, and there was some attempt from @zcorpan to previously address it using appearance: none. I would consider filing an issue against the css-forms-1 to explore this further. Maybe appearance: base would also make sense here, but I wouldn't rush into it without having the discussion first.

@lukewarlow

Copy link
Copy Markdown
Member Author

#11983

@zcorpan

zcorpan commented Mar 26, 2025

Copy link
Copy Markdown
Contributor

See whatwg/html#3912

The conclusion in whatwg/html#4035 (comment) was that appearance is not the right mechanism to control the magic of fieldset rendering.

@zcorpan

zcorpan commented Mar 26, 2025

Copy link
Copy Markdown
Contributor

The rendering rules are defined here https://html.spec.whatwg.org/#the-fieldset-and-legend-elements (this could probably be moved to a CSS spec though).

@lukewarlow
lukewarlow marked this pull request as draft May 22, 2025 14:05
@lukewarlow
lukewarlow marked this pull request as ready for review April 2, 2026 09:31
@lukewarlow
lukewarlow force-pushed the fieldset-legend branch 2 times, most recently from d3503c4 to adbe81a Compare April 10, 2026 11:13
@lukewarlow
lukewarlow merged commit ce9a132 into w3c:main Apr 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants