-
Notifications
You must be signed in to change notification settings - Fork 715
[css-inline] Sizing problem with initial-letter-wrap: grid #947
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
Comments
Actually, even that is wrong. It should be |
Proposed text (and a new figure 11):
@frivoal is the figure accurate? Does the exclusion area need to include the letterspacing shown, otherwise the next character would be off-grid? |
Thanks! Yes, the figure and text look good good to me. However, thinking about letter spacing gave me a follow up question. Should the exclusion area count towards the min content inline size? If the line is shorter than the exclusion area but long enough to fit the initial letter frame, should there be scrollable overflow? I suggest that the answer to both questions should be no. If it is yes, then we probably shrink the exclusion area by 1 letter spacing when it is the last thing on the line (but not when it is not). That seems fiddly and needlessly complicated. |
OK, we updated the spec (just with slightly different wording than you suggested). Good catch on the formula. I think I agree with you on the min-content size, there shouldn't be anything special caused by the exclusion area change. Probably the margin box of the initial letter should always be considered as part of the content, just as with any inline or float. |
@frivoal Closing out the issue, mind reviewing to make sure we got it right? :) |
2171624 looks good. Are you tracking the intrinsic size question elsewhere, or should I file it? |
File away! |
https://drafts.csswg.org/css-inline/#initial-letter-wrapping says:
This seems wrong on two accounts:
This value is meant for CJK uses. The
ic
unit is the relevant one, not thech
unit. If we want to support aligning to a grid for latin monospaced fonts, we could make this depend oninitial-letter-align
, and useic
when it is set toideographic
andch
when it is set toalphabetic
, but I am not sure it is worth doing, as Initial letters on monospaced latin text seems unusual.n
shouldn't be the size of the initial letter as specified by the initial-letter property. That would result in a too small exclusion area when the line gap is large (or when the initial-letter text is long).Here's an example of
initial-letter: 2
with a large line gap in vertical text. Each[ ]
represents a1ic
square.Here, the exclusion area needs to be
8ic + 7 × letter-spacing
, not2ic + 1 × letter-spacing
.I suggest replacing that sentence with something like this:
The text was updated successfully, but these errors were encountered: