Re: [css3-images] simplifying radial gradients

On Oct 11, 2011, at 11:13 AM, Brian Manthos <brianman@microsoft.com> wrote:

>> From: Brad Kemper [mailto:brad.kemper@gmail.com]
>> If I wanted a 'cover' gradient with a color stop at 50% of the height
>> and width, I would have to do similarly silly calculations. I think it
>> would actually be more useful for 50% to always mean 50% of the way to
>> the side, even if the gradient gradates to the corners.
> 
> I disagree.
> 
> For all 4 CSS gradient flavors today, color stop locations are relative to the gradient line (segment) length.  Changing it to something different is undesirable and confusing, IMO.

It's not changing how color stops work. For a contain gradient, 100% is to the sides, and 50% is half the distance to the nearest side. Having color stops greater than 100% are still allowed, and you can see them still in the corners if they are less than 141%. That doesn't change the gradient line, and with 'contain' the 50% point is still 50% of the gradient length, which is based on the width & height (until you start adding other parameters). 

> If you can accomplish what you want by changing the gradient line (segment) length for radial gradients, that might be interesting to consider.

Right now we have two different ways to change the gradient line length to get the exact same results. That's twice as many as needed. 

> Figuring that out with the current syntax can be very convoluted
>> because of this, and also because of the way every other parameter
>> (except color stops) affects the gradient length, often in unintuitive
>> ways.
> 
> I'm not sure I understand what you're getting at here.

I describe it in another email I sent this morning. Sorry I don't have quick access to the Lino to paste in here. 

> Position and size/shape parameters define the size and location of the ellipse (which is sometimes a circle) and thus the gradient line.  The color stops are placed along that gradient line.
> 
> The paragraph above (as I read it) suggests that gradient stops should be inputs to the gradient line (segment) length calculations, rather than applied after that length is determined.  I don't even know how that would work without introduce math cycles and other craziness.
> 
> I'm probably just misreading it.

Yes, you are. 

Received on Tuesday, 11 October 2011 19:38:48 UTC