Skip to content

[css-display] Terminology: is replaced content a type of independent formatting context? #4539

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
SimonSapin opened this issue Nov 25, 2019 · 2 comments
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-display-3 Current Work

Comments

@SimonSapin
Copy link
Contributor

I really like that this spec introduces the concept of independent formatting context. CSS 2 went through some convoluted paraphrases when it meant this.

I have a terminology question that likely doesn’t have any direct normative consequence. Is it useful to think of replaced content as one among other types of independent formatting context?

Declaring it is seems to simplify a model such that the behavior of a box that establishes an independent formatting context is entirely determined by its context (and, for flow layout, its outer display type) and its type of independent FC.

On the other hand, flow layout and grid items both specify different sizing rules for replaced v.s. non-replaced content. So perhaps it’s best to keep the concept of independent FC for non-replaced content? (Tables in CSS2 however specifically call out replaced table cells as no different from other table cells. Flexbox doesn’t specify anything specific to replaced flex items.)

(The context of this question is that we’re reconsidering the structure and names of some Rust type inside Servo’s layout code.)

@Loirooriol
Copy link
Contributor

See the somewhat similar #1642, the answer seems to be that it's undefined within CSS.

@fantasai fantasai added the css-display-3 Current Work label Mar 11, 2020
fantasai added a commit that referenced this issue Aug 5, 2021
…endent formatting context. (Fundamentally editorial.) #4539
@tabatkins
Copy link
Member

We've gone ahead and added a sentence saying that replaced elements are always independent formatting contexts. This is a practical requirement anyway to ensure we dont' have to care about what's inside of them, so it does make sense to make it clear.

@tabatkins tabatkins added Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. labels Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-display-3 Current Work
Projects
None yet
Development

No branches or pull requests

4 participants