Skip to content
This repository was archived by the owner on Jul 30, 2019. It is now read-only.
This repository was archived by the owner on Jul 30, 2019. It is now read-only.

Proposal: allow display: contents to do away with legacy fieldset/legend rendering #957

Closed
@emilbjorklund

Description

@emilbjorklund

If a style declaration of display: contents is applied to a fieldset element, it should ditch all the legacy behavior in terms of rendering, and (I'm assuming) just show the legend as an inline element per default, allowing authors to control the layout and rendering fully by using CSS (by using another wrapper, rather than styling the fieldset element directly).

The old/odd behavior of fieldset and legend has, in my experience, prevented loads of people from using them over the years, potentially making the web less accessible in the process. I think the addition of display: contents in CSS is an excellent opportunity to ditch the old behavior for newer sites, without breaking backwards compatibility.

I've opened the same issue against the WHATWG spec here: whatwg/html#2805

Blog post here: https://thatemil.com/blog/2017/07/01/fixing-fieldsets/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions