- From: Rik Cabanier <cabanier@gmail.com>
- Date: Thu, 9 Jun 2011 21:06:24 -0700
- To: "Eric A. Meyer" <eric@meyerweb.com>
- Cc: www-style@w3.org
- Message-ID: <BANLkTin8VnHD_DTHGfvq7RdhC86x=aHdhg@mail.gmail.com>
I completely agree. I made a similar proposal last December but was told the spec was too far along. A vector is much easier to define which probably why it is used in most design software. Rik On Thu, Jun 9, 2011 at 6:26 PM, Eric A. Meyer <eric@meyerweb.com> wrote: > At 10:46 -0700 6/9/11, Tab Atkins Jr. wrote: > > On Thu, Jun 9, 2011 at 10:33 AM, Brian Manthos <brianman@microsoft.com> >> wrote: >> > > And thus, finally, the root cause of the problem is obvious: The spec as >>> currently authored decided to choose "left/right the start location" instead >>> of "left/right the direction". >>> >> >> Yup, that's for historical reasons at this point - the first draft of >> linear gradients I wrote let you specify an explicit start point and >> end point for the gradient-line. I stuck with that model as the >> syntax mutated and simplified. >> > > I still prefer the idea of defining start and end points and having the > gradient lines be perpendicular to the line described by those points. It's > fairly unambiguous, it lets authors use any angle at any point within (or > even outside) the background area, and it avoids the whole keyword > confusion. And it seems really easy and clear to animate as well. > If we wanted to ensure the ability to use angles, then the syntax could > be written so that an angle can be used for the second value. That would > make the following equivalent: > > linear-gradient: 50% 50%, 100% 0, black, white; > linear-gradient: 50% 50%, 45deg, black, white; > > (Assuming a "0deg is the top" coordinate system, obviously.) > And then if you wanted to animate so the gradient "rotated" to the upper > left, you just animate the second value to '0 0' or '-45deg' or '315deg'. > Everything else stays the same. > > -- > Eric A. Meyer (eric@meyerweb.com) http://meyerweb.com/ > >
Received on Friday, 10 June 2011 04:06:53 UTC