Re: [css-inline] initial-letter in WebKit (feedback after implementing)

On 09/05/2014 10:36 AM, Dave Cramer wrote:
>
> I'm fine with this. This would not be a typical shorthand, as an
> omitted value would not use the initial value of the longhand
> property. We do want initial-letter: 3 to mean initial-letter-size: 3
> and initial-letter-drop: 3.

It is a common pattern for a shorthand to duplicate values into the
missing longhands.

> Using only one longhand might result in some interesting results,
> depending on the initial values (see below). Having initial-letter-drop
> to be 2 or 3 without a corresponding initial-letter-size would result
> in a small dropped letter. Let's hope that doesn't become a design trend!

This is a reason to not split this into longhands. We generally only
split a property if it needs to cascade independently for some reason.
You've just provided a reason to *not* cascade independently.

I wouldn't split the property unless there's a real rationale for it.
"I prefer to implement single-valued properties" is not a good enough
rationale.

> On further reflection, I wonder if "normal" is necessary, or if the
> initial values could just be "1". If initial-letter-drop is "1",
> then the initial letter should sit on the first text baseline, which
> it would do anyway. And if initial-letter-size was "1", then the
> character should extend from the baseline to the cap height of the
> same line, which it would do anyway.

We added normal to control the clearing behavior of the next paragraph.
   http://www.w3.org/mid/537AF67C.5010004@inkedblade.net

> I'm not sure about this, and would like to do some more testing.
> It's relatively common for drop caps to have a background color,
> which would extend out a bit from the letter. I've tried some of
> these and they look good, but I can also imagine cases where the
> usual inline behavior would be good (gradients, etc.).

If you contain the margin box (rather than the border box), then
you can not only provide appropriate spacing, but if you want a
background to leak out, you can set a negative margin accordingly
to get that effect.

~fantasai

Received on Monday, 8 September 2014 14:16:28 UTC