[css-inline] should specify that line with initial letter is shortened relative to all floats initial letter can interact with · Issue #689 · w3c/csswg-drafts (original) (raw)

The spec for initial letters currently says that the initial letter is placed relative to the line, and CSS 2 specifies that the line is shortened by floats next to it.

However, this doesn't correctly account for initial letter.

If you interpret the specs literally, then something like:

#float_one { float: left; width: 100px; height: 100px } #float_two { float: left; width: 200px; height: 100px; clear: left; } p::first-letter { font-size: 20px; initial-letter: 5 }

This paragraph has an initial letter.

will yield the bottom half of the capital "T" overlapping #float_two, because the initial letter is placed relative to its line box, and the line box is placed relative to its height only, and that height only intersects #float_one

I think the spec needs to say that the line is shortened to account for floats "next to" the initial letter, using wording similar to that in CSS 2. I haven't thought about this solution in any detail, though.

cc @chenpighead