W3C home > Mailing lists > Public > www-style@w3.org > July 2015

Re: [css-inline] Wrapping around initial letters

From: Alan Stearns <stearns@adobe.com>
Date: Fri, 24 Jul 2015 13:34:25 +0000
To: Tom Potts <karaken12@gmail.com>, Dave Cramer <dauwhe@gmail.com>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <D1D78575.2B037%stearns@adobe.com>
On 7/24/15, 5:35 AM, "Tom Potts" <karaken12@gmail.com> wrote:

>Interesting. It looks to me like this could use shape-outside, treating
>the initial letter gylph as the used shape. In that case, it could be
>modified by authors with shape-margin if they want to adjust the spacing
>One thing that seems a little odd with the illustrations, between
>Examples 2 and 3 the "o" of "out" in the third line is closer to the
>initial "A" in Example 3 than Example 2. It's entirely consistent with
>the spec as written (as far
> as I can tell), but it seems strange that the option that makes lines
>closer to the letter actually moves that line further away, in this case.

In a similar vein, a letter with a straight right edge (say, H) could push
the first line farther away with first-line versus none. The shape-outside
property on floats does not allow the effect of the shape to extend
outside the float’s margin box. If we used shape-outside (or adopted a
similar constraint) then these oddities could be avoided.

I don’t think there’s a fixed offset that works for every situation
(side-bearing?, stroke weight?). So using shape-outside would also allow
the author to choose an offset using shape-margin.

If we used shape-outside, we’d still need the initial-letter-wrap
property, I think. It’s just that the ‘auto’ and ‘first-line’ values would
extend the shape-outside behavior (not just floats). And the author could
choose a shape-outside based on the letter’s ink or fall back to their own
shape function if they wished.

We would need a new keyword for shape-outside for the ink, likely the
general ‘wrap around this element’s rendered content’ idea that I’ve been
meaning to add to shapes level 2. There are some security implications for
this - malicious script could determine whether a link had been visited by
looking at a carefully constructed wrapping result. So there would be some
situations where wrapping around an initial letter would have to fail
(whether or not we use shape-outside).

>P.S. Should there be a link to the Inline Layout module in there
>On 24 July 2015 at 12:21, Dave Cramer <dauwhe@gmail.com> wrote:
>At the Sydney F2F we resolved [1] to add full kerning around initial
>letters. I've written up a rough outline of a proposal at [2]. The basic
>idea is for an initial-letter-wrap property with values (none | auto |
>first-line). None is the default, and current
> behavior. Auto allows the line boxes adjacent to the initial letter to
>just touch the ink of the initial letter (plus some offset). First-line
>just makes the adjustment on the first line, and leaves the default
>behavior on the other lines. Illustrations at
> [2] should help make this clearer.
>Instead of a new property, should we just use shape-outside, possibly
>with some new values?



Received on Friday, 24 July 2015 13:34:56 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:18 UTC