- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Sun, 13 Feb 2011 16:23:57 -0800
- To: Simon Fraser <smfr@me.com>
- Cc: w3-style@boblet.net, www-style <www-style@w3.org>
On Sun, Feb 13, 2011 at 9:27 AM, Simon Fraser <smfr@me.com> wrote: > 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. It seems like this just matches the most common way people talk about the two different things. When giving a coordinate or length pair, it's traditional to give the horizontal one first. When naming a corner, it's traditional to say "top" or "bottom" first. These aren't consistent with each other, but they're consistent with English and common usage. ~TJ
Received on Monday, 14 February 2011 00:24:49 UTC