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
We resolved that raised caps (sink=1) are treated as part of the text of the originating line for the purposes of alignment and justification. Then we tried to figure out what to do with sink > 1, and ended up anchoring the initial letter to the start edge while performing alignment in the remaining space.
I think this creates an unnecessary split in how raised caps and sunken caps interact with the rest of the content of the originating line. Both types of initial letters are affected by hanging-punctuation and text-indent, so having two models for implementing that behavior isn't great. Also a raised initial letter can still impact subsequent lines if it has a descender anyway, so we actually have to handle that problem in both cases regardless.
So I think we might want to consider a different solution: treat sunken initial letters the same as raised initial letters for the purpose of text alignment, and shorten the subsequent line boxes based on its resulting position in both cases. This way the positioning model of both types of initial letters is consistent, and we're handling subsequent impacted lines in both consistently in both cases as well.
Note: There are still some differences in how raised vs sunken caps are handled, but they're at the typesetting level (affecting justification opportunities/letter-spacing/etc.) rather than the layout level.
We thoroughly approve of this suggestion as it's what we're currently doing. Non-start alignment of initial-letter is weird anyway, but I think treating sink=1 differently to sink!=1 makes it even weirder. So I agree the "anchor to start edge and align in remaining space" approach should apply to all values of sink equally.
The CSS Working Group just discussed text-align + initial-letter, and agreed to the following:
RESOLVED: make drop caps behave like raise caps for the purposes of text-align and justification
The full IRC log of that discussion
<fantasai> Topic: text-align + initial-letter
<fantasai> github: https://wiki.csswg.org/planning/virtual-summer-2020#participants
<fantasai> github: https://github.com//issues/5207
<emilio> fantasai: we had a long discussion about this a while back and we decided for raise caps to make them part of the rest of the line
<emilio> ... but for drop caps we decided something else
<emilio> ... but having two models is not great, and even a raised initial can affect the second line if it has a descender
<emilio> ... so my proposal is to treat drop caps the same as raised caps, participating in the alignment context of the first line
<dbaron> It sounds like this might be better for shape-inside as well?
<emilio> ... then if it affects following lines it'd shorten them
<emilio> dbaron: What I've seen people do is combining initial-letter effects with shape-inside
<emilio> ... may or may not impact this discussion
<emilio> ... haven't worked through whether this decission affects it
<emilio> fantasai: I don't think it does
<dbaron> s/I've seen/I think I've seen/
<emilio> florian: as you pointed out raised cap with a descender already needs to deal with this so it makes sense to do the same
<emilio> RESOLVED: make drop caps behave like raise caps for the purposes of text-align and justification
Activity
fantasai commentedon Jun 13, 2020
Note: There are still some differences in how raised vs sunken caps are handled, but they're at the typesetting level (affecting justification opportunities/letter-spacing/etc.) rather than the layout level.
faceless2 commentedon Jul 8, 2020
We thoroughly approve of this suggestion as it's what we're currently doing. Non-start alignment of
initial-letteris weird anyway, but I think treating sink=1 differently to sink!=1 makes it even weirder. So I agree the "anchor to start edge and align in remaining space" approach should apply to all values of sink equally.css-meeting-bot commentedon Jul 28, 2020
The CSS Working Group just discussed
text-align + initial-letter, and agreed to the following:RESOLVED: make drop caps behave like raise caps for the purposes of text-align and justificationThe full IRC log of that discussion
<fantasai> Topic: text-align + initial-letter<fantasai> github: https://wiki.csswg.org/planning/virtual-summer-2020#participants
<fantasai> github: https://github.com//issues/5207
<emilio> fantasai: we had a long discussion about this a while back and we decided for raise caps to make them part of the rest of the line
<emilio> ... but for drop caps we decided something else
<emilio> ... but having two models is not great, and even a raised initial can affect the second line if it has a descender
<emilio> ... so my proposal is to treat drop caps the same as raised caps, participating in the alignment context of the first line
<dbaron> It sounds like this might be better for shape-inside as well?
<emilio> ... then if it affects following lines it'd shorten them
<emilio> dbaron: What I've seen people do is combining initial-letter effects with shape-inside
<emilio> ... may or may not impact this discussion
<emilio> ... haven't worked through whether this decission affects it
<emilio> fantasai: I don't think it does
<dbaron> s/I've seen/I think I've seen/
<emilio> florian: as you pointed out raised cap with a descender already needs to deal with this so it makes sense to do the same
<emilio> RESOLVED: make drop caps behave like raise caps for the purposes of text-align and justification
[css-inline-3] Make sunken initial letters align the same as raised o…
fantasai commentedon Aug 13, 2020
@dauwhe Mind reviewing the edits? :)
dauwhe commentedon Aug 26, 2020
Edits look good.