W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: Linear gradients, Transforms and angles...

From: Simon Fraser <smfr@me.com>
Date: Mon, 20 Sep 2010 12:09:52 -0700
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, "L. David Baron" <dbaron@dbaron.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-id: <F0151358-B11F-42AC-83D7-25DF3C23F301@me.com>
To: Brad Kemper <brad.kemper@gmail.com>
On Sep 20, 2010, at 10:56 AM, Brad Kemper wrote:

> On Sep 20, 2010, at 10:15 AM, Daniel Glazman wrote:
>> Le 20/09/10 18:21, L. David Baron a écrit :
>>> However, there is an argument, which I think I've heard Dean make in
>>> the past, that 0° should point along the positive X axis (right) and
>>> 90° should point along the positive Y axis (down).  It's a little
>>> confusing at first, but it does all fit together sensibly that way.
>> I'm fine either way. I only way an angle in a gradient to have the same
>> meaning as an angle in rotation.
> Why? A rotation is a movement in a circular direction . A linear gradient is a movement in a linear direction. Why should they be the same? When you take a northbound train, you don't expect the direction of travel to be specified in the same way as a merry-go-round. The degree to which you move in a circular direction often has "clockwise" for positive numbers, because clocks are typically round and are familiar for their direction of circular motion. The same is not true of linear motion, where degrees can be any angle but in geometry and maps are most often represented in reference a standard of counterclockwise progression with 90 degrees pointing up and 0 degrees pointing right.

The endpoint-based form of linear gradients default to top-to-bottom, if I recall (the default starting point is 'top'). It seems somewhat counter-intuitive to have an angle gradient with an angle of zero go left-to-right. Unfortunately, with 0° pointing up, you get a bottom-to-top gradient.

I realize that we don't necessarily have default behavior for angle gradients, but I still think the horizontal vs vertical mismatch messes with author expectations.

Received on Monday, 20 September 2010 19:10:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:47 UTC