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

On Sep 8, 2014, at 9:15 AM, fantasai <fantasai.lists@inkedblade.net> wrote:

> 
>> 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.

I think ideographic first letters illustrate author's needing control over the size of the first letter without altering the drop distance. The examples I've seen show first letters of varying sizes (some much smaller than the drop distance and some close to the same size etc.), and it seems like you could give authors some more precise control if you separated the "drop" property from the "height" property and allowed the latter to support lengths.

Then an author could say:

initial-letter-drop: 3

and set up appropriate letter heights within that 3-line area as needed, e.g.,

initial-letter-height: 30px

> 
>> 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

The way I'm using normal is to preserve all existing first-letter behavior for backwards compatibility. "normal" is the default and it prevents any of these new behaviors from being applied. In an ideal world, I'd change the size of the first letter to huge the cap height and the glyph descent all the time, but I'm nervous about backwards compatibility, since authors have already put in negative margin hacks to work around those issues.

> 
>> 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.

Yeah, I'm not sure about this either. I definitely think aligning the top even if the border spills "up" is correct. At the very least the border should be allowed to spill into the leading of the previous line. The goal should be for the first-letter not to disrupt the spacing between lines IMO, so not pushing the line down because of top border/padding seems important.

dave

Received on Monday, 8 September 2014 18:52:09 UTC