@MatsPalmgren said in #390 (comment):
Does the inserted text affect ::first-letter/::first-line in any way? (even if it doesn't, it'd be good to spell that out explicitly for clarity)
I said in #390 (comment):
If it is in the first lines (e.g. max-lines:1), then it should take the styles that affect the first line. Otherwise, we'll get weird and inconsistent typography in the first line. I believe that is already a consequence of "placed [...] as a direct child of the block container’s root inline box", but it doesn't hurt to say so if we agree (or to argue it out and then spec it if we don't).
For ::first-letter, I am less sure. I'm not what sure what the use case would be, and neither of what the implementation complexity would be. Any suggestion?
In #390 (comment), @MatsPalmgren responded:
OK, but I disagree that that follows from "placed [...] as a direct child of the block container’s root inline box". It really is necessary to point that out explicitly if that's the behavior you intended.
Please note thatlist-style-position:inside
::marker
boxes does not affect::first-letter/line
in current implementations, fwiw.Anyway, the problem with the
::first-*
pseudos is that some UAs construct boxes for them in the box construction phase, which happens before the layout phase, so if the inserted ellipsis should be affected by these styles then it might affect boxes that were already constructed. For example, if the ellipses is so wide that it requires the entire length of the line then any existing::first-letter/line
boxes needs to be undone somehow. For::first-letter
there's also the case where leading punctuation on the line should be included together with the first character of the ellipsis. The implementation of these pseudos is already quite messy (and buggy) in Gecko and I suspect that might be the case for other UAs too. This is why I'm asking for a detailed spec about how the interaction (or not) between these boxes should work, because otherwise we'll almost certainly end up with incompatible implementations.I would strongly prefer to keep the
block-overflow
property simple though, i.e. not interacting with boxes other than shortening the last line. We can introduce a more general "::fragment-before/::fragment-after
" in the future, that would magically appear at fragmentation boundaries (possibly with additional conditions that an author can control). For example, it's quite common in printed newspapers to insert a "continued from page N" at the start of a fragment when it continues from an earlier page.
In #390 (comment), @fantasai said:
Wrt
::first-line
and::first-letter
, I think the ellipsis should be considered part of the first line, but not the first letter pseudo. The::first-letter
pseudo behaves much more like an inline element, and the ellipsis is placed outside of any elements. Meanwhile::first-line
encompasses the entire line, it would be weird if something on it were somehow exempted.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3