W3C home > Mailing lists > Public > www-style@w3.org > June 2011

Re: Inline elements should be affected by 2D Transforms

From: Brian Blakely <anewpage.media@gmail.com>
Date: Fri, 3 Jun 2011 11:37:58 -0400
Message-ID: <BANLkTimaO+k0Y8EFX=K-bxCJrnSA=HXB3g@mail.gmail.com>
To: Alan Gresley <alan@css-class.com>
Cc: Brad Kemper <brad.kemper@gmail.com>, Simon Fraser <smfr@me.com>, Boris Zbarsky <bzbarsky@mit.edu>, www-style@w3.org
Alan,

The behavior for split inline elements that I surmise most people would want
is that each "piece" behaves like its own element.  So, for all intents, its
bounding box functions as a discreetly-transformed target, and that
transform is mirrored across all targets.

*Example*
**
<span style="transform: rotate(45deg);">[The quick red fox jum-]
[ped over the lazy brown dog.]</span>

The sentence (encapsulated in a span) above has been divided into two
fragments due to a line break.  The brackets visually illustrate how the
inline content is divided into discreet transform targets.

If the span is transformed as above (at a rotation of 45 degrees), then both
fragments will rotate independently, and the transform origin specified will
be relative to the dimensions of each fragment.


This approach encompasses all existing and proposed methods of displaying
inline content.

-Brian


On Fri, Jun 3, 2011 at 1:06 AM, Alan Gresley <alan@css-class.com> wrote:

> On 3/06/2011 1:33 AM, Brad Kemper wrote:
>
>>
>> On Jun 2, 2011, at 7:56 AM, Simon Fraser wrote:
>>
>>  On Jun 2, 2011, at 6:27 AM, Brian Blakely wrote:
>>>
>>
>  Restored support for inline elements should follow an analysis of
>>>> current implementations, and either a single implementation is
>>>> chosen as the standard, or an amalgam that optimally satisfies.
>>>>
>>>
>>> The problem is that there isn't an implementation that makes
>>> sense.
>>>
>>> Consider an inline element split over 2 lines, with a rotation
>>> transform. What do you expect to happen?
>>>
>>
>> I would expect the two lines to rotate as though the transform was
>> applied to their bounding box, all without disturbing any of the
>> content outside the span.
>>
>
>
> So how many things need to be checked. Would you want transform-origin [1]
> to work with rotated inline elements split over 2 lines?
>
>
>  TL---------T---------TR
>  L----------C----------R
>  BL---------B---------BR
>
>
> Split 1:
>
>  TL---------T----
>  L----------C----
>  BL---------B----
>
>  -----TR
>  ------R
>  -----BR
>
>
> Split 2:
>
>  TL----
>  L-----
>  BL----
>
>  -----T---------TR
>  -----C----------R
>  -----B---------BR
>
>
> The wider the containing block, the more this goes crazy.
>
> Split 3:
>
>                           TL----
>                           L-----
>                           BL----
>
>  -----T---------TR
>  -----C----------R
>  -----B---------BR
>
>
>
>
> [1] http://dev.w3.org/csswg/css3-2d-transforms/#transform-origin
>
>
>
>
> --
> Alan Gresley
> http://css-3d.org/
> http://css-class.com/
>
Received on Friday, 3 June 2011 15:38:45 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:41 GMT