Skip to content

[css-display] More precise box transformations #1643

@Loirooriol

Description

@Loirooriol

CSS Display has some handwaving about display types belonging to elements or boxes. Mostly it's clear what it means, but I think that Box Type Transformations should be more precise, and differentiate between elements, element-generated boxes, anonymous boxes, and text runs.

I think it should say something like this:

  • Definition: blockifying a principal box blockifies the generating element.
  • Definition: inlinifying a principal box inlinifies the generating element.
  • Definition: blockifying or inlinifying a text run does nothing.
  • Definition: blockifying an element sets its outer display type to block and, if its inner display type is layout-internal, it is set to flow.
  • Definition: inlinifying an element sets its outer display type to inline unless it was layout-internal. If the inner display type is flow, the box recursively inlinifies its in-flow children.
  • Note: blockifiying or inlinifying an element without display types has no effect.
  • Note: blockifiying or inlinifying an element affects the computed value of display.
  • Note: blockifications and inlinifications happen before the creation of anonymous boxes to fix the box tree.
  • Assert: CSS specifications MUST prevent text runs from remaining as direct children of a parent box which blockifies its contents, e.g. by wrapping the text runs inside appropriate anonymous boxes.
  • Assert: CSS specifications MUST prevent anonymous inline-level boxes from being generated as direct direct children of a parent box which has blockified its contents, e.g. by generating anonymous block-level boxes instead.
  • Assert: CSS specifications MUST prevent anonymous block-level boxes from being generated as direct direct children of a parent box which has inlinified its contents, e.g. by generating anonymous inline-level boxes instead.
  • Assert: CSS specifications MUST prevent text runs, boxes and elements from being simultaneously blockified and inlinified.
  • Assert: CSS specifications MUST prevent non-principal element-generated boxes from being blockified or inlinified.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions