Skip to content

[css-display] <legend> with no box #1584

Closed

Description

@Loirooriol

In Box Generation, the spec says that none and contents cannot affect

whether a <legend> is the name of a <fieldset>.

But in Appendix B,

Per HTML, a <legend> with display: contents is not a rendered legend, so it does not have magical display behavior. (Thus, it reacts to display: contents normally.)

Not sure what exactly the first quote means with "name of a fieldset", my guess is that it refers to the rendered legend, but that contradicts the 2nd quote. If it means something else, please clarify.

Activity

  1. tabatkins commented on Jul 6, 2017

    @tabatkins
    Member

    The "name of a fieldset" is a semantic concept in HTML. It has nothing to do with how the legend displays. It's like how th elements still label a table row/column even if they're styled the same as tds.

  2. tabatkins commented on Jul 6, 2017

    @tabatkins
    Member

    The quoted phrase is also at the end of a longer paragraph listing other similar examples, which starts with an explicit explanation of what the examples are about:

    Markup-based relationships, however, are not affected by these values, as they are solely rendering-time effects. For example, although they may affect which table cell appears in a column, they do not affect which table cell is associated with a particular column element. Similarly, they cannot affect which HTML summary element is associated with a particular table or whether a legend is the name of a fieldset.

  3. Loirooriol commented on Jul 6, 2017

    @Loirooriol
    ContributorAuthor

    Then a link to that "name of a fieldset" concept would be useful. I have no idea about what that is, fieldsets have a name attribute but that has no relation with legends.

  4. fantasai commented on May 23, 2018

    @fantasai
    Collaborator

    Alright, checked in some changes to be a little more explanatory rather than hooking into a somewhat indeterminate term in the HTML spec. Also filed whatwg/html#3702 to get a bit more clarity on the HTML side.

  5. fantasai commented on May 23, 2018

    @fantasai
    Collaborator

    @Loirooriol Let me know if that adequately addresses your concerns?

  6. Loirooriol commented on May 23, 2018

    @Loirooriol
    ContributorAuthor

    I think it's still easy to confuse "<{legend}> labeling <{fieldset}> contents" with "rendered legend". But I guess this is a HTML problem more than a CSS one, so it's OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions