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

Re: [css3-images] Proposed Gradients changes

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 29 Nov 2010 06:35:48 -0800
Message-Id: <76E72D9D-1A88-472F-B25A-CBBB03112F07@gmail.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
To: Rik Cabanier <cabanier@adobe.com>


On Nov 28, 2010, at 11:38 PM, Rik Cabanier <cabanier@adobe.com> wrote:

> I agree that CSS gradients should be as simple as possible. 
> The spec for axial gradients looks reasonable. 
> I think you could add another positioning parameter so you can define a custom begin and endpoint. (this is close to a webkit-gradient)
> Ie linear-gradient(center top center bottom, yellow, blue) would render the default axial gradient
> But maybe this is already too advanced...

Custom begin and endpoints were just removed actually, in order to simplify. The position of the starting and ending colors can be set via the color stops. If you need more precision than that in a background without using math or trial-and-error (which would be rate, really), you can use 'background-position'. 

Your example would be written as 'linear-gradient(top, yellow, blue)'. The 'top' is short for "start at the 'top' edge and continue in a straight line to the opposite side" ('top left' would be short for "start at the 'top left' corner and continue in a straight line to the opposite corner"). Personally, I'd prefer something more obvious to make this clear, such as 'top-to-bottom' and 'top-left-to-bottom-right' keywords. 
Received on Monday, 29 November 2010 14:36:28 GMT

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