-
Notifications
You must be signed in to change notification settings - Fork 672
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
[css-inline][css-pseudo] Interaction of root inline box and ::first-line #1384
Comments
I think the root inline box should interact with ::first-line the same way any other inline boxes interact with ::first-line. I'm not sure we actually agree on what that is, though... |
So the root inline box should be broken, and the fragment in the first line be wrapped inside I read your Inline Box Model proposal, which says that each line has its own root inline box. And Hixie's proposal further specifies that it's that root inline box in the first line what is matched by I think this made sense, but it seems currently there is a single root inline box in the block container instead of one per line. Maybe |
@Loirooriol What question are you trying to answer, other than the obvious theoretical one? |
A practical implication would be #2282 |
So I think that based on #2282, we've eliminated the possibility of As for the remaining possibilities, I cannot think of a case where that would make a difference, but from a mental model point of view, I think I quite like defining ::first-line to be the fragment of the root inline box , rather than wrapping it. It's easier to keep track of fewer boxes, and avoids the need to worry about "Which one is inside of which one?". |
I don't think we can do that, because there can be multiple https://drafts.csswg.org/css-pseudo-4/#first-text-line
|
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: [css-inline][css-pseudo] Interaction of root inline box and ::first-line<dael> github: https://github.com//issues/1384 <dael> oriol: I can explain unless florian prefers <dael> oriol: The idea is that in css 2 we had concept of the strat that forced the line height to be at least the value of the line height in block container <dael> oriol: Replaced with root inline box, but not clear how that interacts with first line. root inline is anon inline box that contains inline level contents in first line. <dael> oriol: The first line is behaving as an inline lievel is it inside the root inline box? Inside the first line pseudo? <dael> oriol: This was more theoretical but had practical implication we resolved in issue 2282 <dael> oriol: There resolved in first line pseudo element you can set line height to a value smaller than in block. this should reduce it. <dael> oriol: Implication of this is that first-line pseudo element cannot be inside root inline box. Has to be the opposite <dael> oriol: Then florian proposed that what we could do is unify the boxes and say first-line pseudo is exactly the frag of the root inline box in the first line. Don't think this works b/c can have multiple first line pseudo elements <dael> oriol: At most what we could do is innermost is the frag of the root inline box. Otherwise we do need nesting <dael> oriol: Only possibility we have is that the fragment of the root inline box is inside the innermost or it's equal to innermost <Rossen_> q? <dael> florian: Makes sense. Prop because seemed simplier but you have a case where makes a difference. Given that we're left with one possibility and go with that <dael> fantasai: Prop: root inline box is inside all the first line pseudo elements <dael> oriol: Yeah <dael> Rossen_: Other opinions? <dael> Rossen_: Obj? <dael> RESOLVED: root inline box is inside all the first line pseudo elements |
CSS Inline defines the root inline box as
CSS Pseudo-elements defines
::first-line
asSo
::first-line
is a restricted inline-level, and inline-levels are wrapped inside the root inline box, which is inline, and inline-level fragments in the first line are wrapped inside the::first-line
.Which one is inside of which one?
The text was updated successfully, but these errors were encountered: