-
Notifications
You must be signed in to change notification settings - Fork 718
[css-inline] Line breaks inside drop-caps? #2886
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
I think we've got two options here: have multiline layout inside the initial letter, or suppress line breaks like we do in ruby annotations. Since if someone wants to do the former they can turn the element into an inline-block already, I'm going to suggest the latter. |
Agreed. |
Thinking about it some more... we actually can handle line breaks in initial letters. I forgot about that. See https://www.w3.org/TR/2016/WD-css-inline-3-20160524/#initial-letter-indentation So long as we can do that, handling block-level descendants and forced line breaks fall out. It's possible that we may end up dropping that feature, in which case ruby-style inlinification would be appropriate... but it means that an initial letter would overflow rather than wrapping if it contained too much inline content, which isn't great. It would be adequate for application to |
Diff for inlinification, in case we need it <h4 id="initial-letter-inlinification">Inlinification</h4>
The UA must ensure
that all the contents of an <a>initial letter</a>
that is not an <a>atomic inline</a>
are <a>inline-level</a>
by:
<ul>
<li><a>Inlinifying</a> its children. (See [[css-display-3#transformations]].)
<li><a>Suppressing line breaks</a>
by converting all forced line breaks
as defined for <a>collapsible</a> segment breaks in [[css-text-3#line-break-transform]].
</ul>
Note: This is the same set of transformations
applied to the content of <a>ruby annotations</a>
in [[css-ruby-1]]. |
CJK typography uses titles which are typeset fairly similarly to dropcaps, can be long, and can wrap lines. (The alignment is
Since the sizing of the heading is meant to be an integral number of lines, it feels that this could be achieve by However, trying to follow that approach runs into a bunch of difficulties, and I no longer thing that Therefore, I don't think |
https://drafts.csswg.org/css-inline-3/#propdef-initial-letter
The spec says
And the example shows how you can sink whole phrases:
So what happens when there is a line-break in the middle of the sunken content? We shouldn't stack the sunken values.
The text was updated successfully, but these errors were encountered: