- From: L. David Baron via GitHub <sysbot+gh@w3.org>
- Date: Mon, 07 Nov 2016 06:52:05 +0000
- To: public-css-archive@w3.org
dbaron has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-inline] should specify that line with initial letter is shortened relative to all floats initial letter can interact with == The spec for initial letters currently says that the initial letter [is placed relative to the line](https://drafts.csswg.org/css-inline/#initial-letter-model), and CSS 2 [specifies that the line is shortened by floats next to it](https://drafts.csswg.org/css2/visuren.html#floats). However, this doesn't correctly account for initial letter. If you interpret the specs literally, then something like: ```css #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 } ``` ```html <div id="float_one"></div> <div id="float_two"></div> <!-- line the next p up so that the first line is next to float_one only, but the initial letter is next to both floats --> <div style="height: 50px"></div> <p>This paragraph has an initial letter.</p> ``` will yield the bottom half of the capital "T" overlapping <code>#float_two</code>, 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 <code>#float_one</code> 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 Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/689 using your GitHub account
Received on Monday, 7 November 2016 06:52:12 UTC