-
Notifications
You must be signed in to change notification settings - Fork 719
[css-inline] fill out initial-letter/float interaction section #360
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 agree that the initial-letter's vertical position should not account for the floats. I think that's what the spec currently specifies, since it doesn't say otherwise, and doesn't define the initial letter as a float. (Though it could be moved down for floats if it actually doesn't fit next to them.) The horizontal position, on the other hand, does definitely need to account for floats, and does, since the initial letter is placed horizontally relative to the line, which is affected by floats... at least modulo issues like #689. Then there's the question of how the position of floats needs to account for the initial letter (the opposite direction of interaction from my previous two paragraphs), which is what the section currently covers. It could perhaps be retitled to make it clearer that it covers how floats move in response to initial letter, and not how initial letter moves in response to floats (which I believe is fully defined elsewhere). I believe floats whose placeholder/anchor is in a line after the first line of the block with initial-letter but one that does intersect the initial letter do need to be pushed down vertically past floats. Otherwise you'd have to find a way to address the circularity of placing a float in a way that would need to shorten a prior line (assuming a sensible fix for #689). I think the short text currently in the spec came out of a rather long working group discussion we had on this topic some time ago, although I'm not completely convinced it does so adequately (e.g., for opposite-side floats), but I haven't considered this closely. As the issue currently in the section notes, it's less clear whether we want that behavior for a float whose placeholder/anchor is in the first line of the block with initial-letter, since in that case it is entirely possible to displace the initial letter. (But is it desirable?) /cc @chenpighead |
But what if the float is anchored in the second line? Do you want it to push the initial letter in (like your first picture above, but a line lower), or do you want the float to get pushed down to the third line (like your third picture above). My gut feeling is for the latter (pushing down). |
Link to F2F discussion: https://lists.w3.org/Archives/Public/www-style/2017Feb/0050.html |
OK, @dauwhe and I made edits based on the WG’s F2F discussion in Seattle. Flagging Agenda+ for formal review, and because the various points (below) weren't formally resolved during that meeting. The conclusions of the Seattle discussion were:
|
The Working Group just discussed
The full IRC log of that discussion |
https://drafts.csswg.org/css-inline/#initial-letter-floats needs more details.
One user of the dropcap.js polyfill has run into a problem where the float simulation of a dropcap interacts badly with multiple same-side floats:
adobe-webplatform/dropcap.js#21
It would be good if we could define initial-letter in such a way that the floated widgets laid out as if the initial-letter did not exist, and the initial-letter would be placed at the top of the in-flow content without reference to the floats or any float clearing.
The text was updated successfully, but these errors were encountered: