W3C home > Mailing lists > Public > www-style@w3.org > November 2009

Re: Linear gradients: state of the proposal

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 6 Nov 2009 11:22:09 -0800
Message-ID: <dd0fbad0911061122y74aeabbav9bd193b2edd2d879@mail.gmail.com>
To: Simon Fraser <smfr@me.com>
Cc: Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>
On Fri, Nov 6, 2009 at 9:01 AM, Simon Fraser <smfr@me.com> wrote:
> To keep the gradients discussion moving, here's a summary of where things
> stand with linear gradients:
>
> * Tab's proposal is at: <http://dev.w3.org/csswg/css3-images/#gradients->
> * I raised objections related to the complexity of the proposal, and
> proposed a simpler two-point form with an optional angle:
> <http://lists.w3.org/Archives/Public/www-style/2009Nov/0050.html>
> * Tab said in person that he sees the value of a two-point form for linear
> gradients.

Yes, because of the possible uses of linear-gradient() outside of the
background property, where you won't have the ability to get around
some of the issues by using background-position.

(That said, I'm waiting on shepazu to finish up translating my
gradient examples to SVG.  It may be best to consider these cases
outside of the 80%, and just offload them to pure SVG.  Don't take
this as a rejection of integrating it, though.)

> * Dean and Roc question top left being the default. I'm fine with center
> top.

I'm not certain that "linear-gradient(-45deg,yellow,blue)" produces
the behavior that authors want.  I know what I expect (I put that
behavior in the spec), and I just asked a designer member of the list
(Alexis Deveria) for his uninformed opinion.  He said that he expected
that to produce a gradient going from one corner to another.  I think
this is generally what people will believe

(The exact corners he thought it would be are different from what the
spec says, but still, he assumed that it would originate in a corner
opposite from the direction he was thinking the angle pointed, which
is the current spec behavior.)

> * When the angle form is used, it's unclear if the angle of the rendered
> gradient is invariant under box aspect ratio changes
> <http://lists.w3.org/Archives/Public/www-style/2009Nov/0071.html>.

I addressed this in my previous email - I really don't understand how
the angle *wouldn't* be invariant.  If you do an explicit transform on
the gradiant after creating it (like a rotation or a scaling), sure,
it would obviously change.  But within the context of just the
gradient rule, it seems to me that an angle is an angle, and that's
that.

> * Angles in the gradient proposal (0deg is East, 90deg is North) differ from
> those used in SVG and transforms (angles increase in a clockwise direction).

Indeed, and Alexis Deveria was assuming the latter for the angle.  I'm
conducting an informal survey to see what the intuitive default is for
other people.

> I'm sure radial gradients will raise a similar amount of discussion.

Of course.  ^_^  As I did originally, I'd like to let linear-gradient
discussion settle before we move on, though.

~TJ
Received on Friday, 6 November 2009 19:23:04 GMT

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