Re: [css3-images] Proposed Gradients changes

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 UTC