-
Notifications
You must be signed in to change notification settings - Fork 647
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-3] text-align + initial-letter #5207
Comments
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 |
The CSS Working Group just discussed
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 |
@dauwhe Mind reviewing the edits? :) |
Edits look good. |
This is a follow-up to #884 (minutes).
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.
The text was updated successfully, but these errors were encountered: