Re: [css3-2d-transforms] inconsistency between 2d-transforms & css3-background

On Feb 13, 2011, at 6:15 am, Oli Studholme wrote:

> I just noticed that individual border-radius properties e.g.
> border-top-right-radius lists vertical then horizontal axes, whereas
> transform-origin values are horizontal then vertical axes, e.g
> transform-origin: 100% 0; is equivalent to transform-origin: right
> top;. Based on margin/border/padding (TRBL) I would have expected
> vertical then horizontal, and this is also the way I’d write them e.g.
> “The search box is often in the top right of the page”, rather than
> “right top”.
> 
> It’d be nice to standardise this kind of thing, as writing CSS like:
>    .top-right {border-top-right-radius: 0; transform-origin: right top;}
> is somewhat odd ;)

transform-origin behaves like background-position:
<http://www.w3.org/TR/css3-background/#the-background-position>

which, like <http://www.w3.org/TR/css3-background/#the-border-radius>,
takes the horizontal length first. This seems more natural to me, since
the horizontal offset is usually specified before the vertical offset in math.
If you use at least one keyword, they can be in any order.

Border-width, margins and padding use the "clockwise from top" shorthand,
so reduce to vertical offset first. I think it's probably too late to change these
properties to try to attain consistency.

Simon

Received on Sunday, 13 February 2011 17:28:21 UTC