FW: Rotation in CSS

Forwarding...

-----Original Message-----
From: Alex Mogilevsky
Sent: Thursday, September 06, 2007 11:12 AM
To: Steve Zilles; w3c-css-wg@w3.org
Subject: RE: Rotation in CSS

Great topic!

> -----Original Message-----
> From: Steve Zilles
> Sent: Monday, September 03, 2007 11:08 PM
>
> ISSUE: what width should be used for the unrotated box. Depending
> on the rotation, the result may be either barely constrained or
> unconstrained by the width of the containing block.

This is the most interesting question...
There are a few options here:
1) always use containing block width at unrotated position
2) use width or height depending on angle (e.g. switch at 45 degrees)
3) use a formula that is equal to available width at 0 degrees and
available height at 90 degrees, e.g.

    min(width/abs(sin(alpha)), height/abs(cos(alpha)))

(the longest line that would fit in the box at a given angle)

> ISSUE: for the rotated box, the can be a lot of white space inside
> the anonymous box. Should line that abut the rotated object have
> their lengths adjusted to closely wrap the rotated box? Within
> this proposal, the anonymous (not the rotated) box is used to
> determine line lengths where floats intrude on line boxes.

This should be optional. Both "tight" wrap and "square" wrap are useful.
Also, when wrap is "tight", should text wrap on both sides of the float (there are 4 triangles to consider there)?

This asks for a property:

    float-wrap:square|tight|through

Another issue is how to apply the same to page floats (GCPM). The float can be anywhere on the page, so there should be a way to say if it wants text to wrap on both sides, one (left/right/inside/outside) or neither (note that "neither" is different from "clear" on the next element, since page floats can be positioned forwards and backwards vertically).

> Things to think about:

An interesting use case would be

    Write a script that rotates an box around a
    fixed point, e.g. point "1" (top left corner).
    The box is absolutely positioned.

This script will be complicated (if box size doesn't depend on rotation) or impossible (if it does). Note that the former would be easier and the latter would not be impossible if positioning referred to a given corner of the element rather than the bounding box...

And of course the most interesting topic for rotation is what happens to things that can't rotate (e.g. video). Should it unrotate within the rotated container and get sized by its bounding box?

Received on Friday, 7 September 2007 01:36:11 UTC