-
Notifications
You must be signed in to change notification settings - Fork 746
Description
It doesn't seem to be clear whether initial-letter is in-flow or out-of-flow. More specifically, is the box of initial-letter first-letter contained by its ancestors' box?
For example, if I have:
<style>div::first-letter { initial-letter: 2; }</style>
<div><span style="background: yellow">hello world</span></div>
does the first letter "h" has the yellow background as well? Also what if the span
has border
?
If the initial letter is out-of-flow, then the background color would not cover the initial letter. I believe it is how WebKit currently implements initial letter (it simply makes initial-letter floating). If the initial letter is in-flow, then initial letter would have the background color as well.
I guess the difference on their effects might not be very important, but it would significantly affect how they would be implemented. I think handling initial letter as out-of-flow is probably easier to implement (as shown by WebKit), but CSSWG should decide whether that is what we want.