Re: [css3-images] simplifying radial gradients

On Oct 11, 2011, at 9:58 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> For example, if I wanted the equivalent
> of a simple "cover" gradient with stops at 0%, 50%, and 100%, with
> your simplified syntax I'd instead have to place the stops at 70.7%
> and 141.4%.  It's silly to require trial and error and non-intuitive
> numbers for such a simple gradient that would be relatively common.

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 also have to do those sort of calculations if I want the color stops to be percentage-based, but also want to know how many pixels they will be for a certain image size (or to make that percentage be a certain number of pixels for a given image size). 

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. 

Received on Tuesday, 11 October 2011 17:53:42 UTC