Skip to content

[css-display] Do replaced elements have an inner display type? #1642

Closed

Description

@Loirooriol

CSS Display says

The inner display of a replaced element is outside the scope of CSS.

I'm not sure if this means that:

  1. Replaced elements have an inner display type set to some value which is not defined by CSS Display because it's outside the scope of CSS.
  2. Replaced elements don't have an inner display type because how the contents of a replaced element are laid out is outside the scope of CSS.
  3. Whether replaced elements have an inner display type or not is outside the scope of CSS.

The difference matters because in the glossary there is this sentence:

Any inline-level box whose inner display type is not flow establishes a new formatting context of the specified inner display type.

With (1) it seems clear that the condition holds, so an inline-level replaced element would establish a new formatting context. But I think this should not be imposed because it's outside the scope of CSS. With (2) or (3) it's not much clear whether the condition holds or not.

Anyways, I don't understand what that sentence is doing in the "atomic inline" entry, I would remove it. Does not seem much related other than atomic inlines being inline-level. And is kinda pointless, given that all the non-replaced non-layout-internal inner display types other than flow seem to generate some box which establishes a new FC, independently on the outer display type.

Activity

  1. SebastianZ commented on Jul 23, 2017

    @SebastianZ
    Contributor

    Also, what does it mean when you set an inner display type for replaced elements and will the computed value still be "as specified"?

    Sebastian

  2. tabatkins commented on Mar 19, 2018

    @tabatkins
    Member

    The intended meaning is 3 (the interior of a replaced element is fully undefined within CSS), but it doesn't matter what goes on inside of a replaced element anyway - it has no children that CSS knows of, and has special layout rules that cover the cases where it might matter that it establishes an FC or not anyway.

    Anyways, I don't understand what that sentence is doing in the "atomic inline" entry,

    It's there to clarify what sorts of things are atomic inlines, so the term isn't just floating in the void. ^_^

  3. fantasai commented on Jun 21, 2018

    @fantasai
    Collaborator

    @SebastianZ It means whatever the replaced element wants it to mean, because what it means is out-of-scope for CSS. Typically the replaced element doesn't care what 'display' says, but it could in theory care. Yes, the computed value is still “as specified” -- style computation is always within CSS’s scope (unless some other higher-level spec overrides us for some reason), and there's nothing that says it computes differently on replaced elements.

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