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

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

From: Simon Fraser <smfr@me.com>
Date: Sun, 13 Feb 2011 09:27:39 -0800
Cc: www-style <www-style@w3.org>
Message-id: <3083FA19-C8A0-4809-9BA9-499F97347542@me.com>
To: w3-style@boblet.net
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 GMT

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