You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-display][css-pseudo] Interaction of run-in and ::first-line #1441
If a run-in sequence is immediately followed by a block box that does not establish a new block formatting context, it is inserted as direct children of the block box after its ::marker pseudo-element’s boxes (if any), but preceding any other boxes generated by the contents of the block (including the box generated by the ::before pseudo-element, if any).
The reparented content is then formatted as if originally parented there. Note that only layout is affected, not inheritance, because property inheritance for non-anonymous boxes is based only on the element tree.
First, does "boxes generated by the contents of the block" include block's ::first-line? If yes, what about ::first-lines generated by ancestor blocks?
Second, the premise in the last sentence is false. A non-anonymous box fragment can inherit some properties from a ::first-line pseudo-element, which is based on the box tree. So it's not clear whether a run-in inserted into the next block is supposed to ignore that block's ::first-line styles or not.
Example:
<section><span>Foo</span><div>Bar</div></section>
section { color: red }
div::first-line { color: green; background: blue }
span { display: run-in }
What color does Foo have? Does it have a blue background behind?
My intuition is that runins should be affected by ::first-line styles, but this'll rely on how we actually, properly, define ::first-line, and so this issue is blocked on that.
Activity
Loirooriol commentedon May 22, 2017
If an in-flow
::markeris inside::first-line(being discussed in #1442), then I guess a run-in should also. What happens with inheritance?tabatkins commentedon Jul 5, 2017
My intuition is that runins should be affected by ::first-line styles, but this'll rely on how we actually, properly, define ::first-line, and so this issue is blocked on that.
fantasai commentedon Jul 5, 2017
Fixed normatively in 37c01a4 (consistent with the text in the subsequent note).
Loirooriol commentedon Jul 5, 2017
Seems OK to me. Well, not sure if this will make
::first-lineeven more hard to implement properly, but I'm not an implementator :)