Re: [selectors3][css-inline] sizing of (floated) ::first-letter

On Sat, Sep 20, 2014 at 4:48 PM, Florian Rivoal <florian@rivoal.net> wrote:
> Selectors 3 says the following about ::first-letter
>
> "To allow UAs to render a typographically correct drop cap or initial cap,
> the UA may choose a line-height, width and height based on the shape of the
> letter, unlike for normal elements."
>
> Having left this open as a quality of implementation might have sounded like
> a good idea initially, but the resulting lack of interoperability makes it
> difficult to use in practice.
>
> In all (desktop) browsers I tested other than firefox, the following test
> case shows green and no red, as the floated first letter is sized the same
> way any regular float would be. However, firefox goes the extra mile and
> makes the float be as tight as possible around the glyph, resulting in a
> different line height.
>
> http://florian.rivoal.net/csswg/first-letter.html
>
> While I think I like firefox's behavior better, I would value
> interoperability even more, and it looks like other implementations are in
> agreement.
>
> As [css-inline] introduces initial-letter, which is ultimately better suited
> at doing drop-caps, do we really gain anything by allowing UAs to behave
> differently on ::first-letter than on a span containing the the same
> content? I suggest we close this interop problem by removing the sentence
> quoted above.
>
> Thoughts?

I agree.  'initial-letter' eats the use-case that motivated the loose
text in the first place, and having that unpredictability makes it
harder to reason about floated first-letter geometry.  We should
eliminate the special-case and match the non-FF browsers.

~TJ

Received on Monday, 22 September 2014 16:22:54 UTC