Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Loirooriol opened this issue Jul 21, 2017 · 3 comments
Closed

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

Loirooriol opened this issue Jul 21, 2017 · 3 comments

Comments

@Loirooriol
Copy link
Contributor

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.

@SebastianZ
Copy link
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

@tabatkins tabatkins added the css-display-3 Current Work label Jul 28, 2017
@tabatkins
Copy link
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. ^_^

@fantasai
Copy link
Collaborator

fantasai commented Jun 21, 2018

@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
Projects
None yet
Development

No branches or pull requests

4 participants