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

Re: Linear gradients, Transforms and angles...

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 20 Sep 2010 13:22:25 -0700
Message-Id: <1BAFC401-F11D-4D83-B897-C619595C588E@gmail.com>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, "L. DavidBaron" <dbaron@dbaron.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
To: Simon Fraser <smfr@me.com>
On Sep 20, 2010, at 12:09 PM, Simon Fraser <smfr@me.com> wrote:

> The endpoint-based form of linear gradients default to top-to-bottom, if I recall (the default starting point is 'top').

That is pretty arbitrary, though, and could be changed as easily as anything else in the proposal, if needed. 

> It seems somewhat counter-intuitive to have an angle gradient with an angle of zero go left-to-right.

I completely disagree with that statement. I find it counter-intuitive to have anything but left-to-right for zero degrees, and bottom-to-top for ninety degrees. That's really my point, in fact. But you probably realize that and are only referring to a desire for zero to match a default direction.  

> 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,

I believe the default was chosen because vertical gradients are a little mire common than horizontal ones on the Web. If it was more important for zero=default, then the default should be changed to left-to-right, not the other way around. On the other hand, if we only have angles for gradients (which you'll see more about from me soon), then no default is needed. 

> but I still think the horizontal vs vertical mismatch messes with author expectations.

This author's expectations are that 90deg should be upward for a linear direction specified in degrees. All my prior experience in life before learning how programmers think reinforce that expectation. 

Received on Monday, 20 September 2010 20:23:07 UTC

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