W3C home > Mailing lists > Public > www-style@w3.org > October 2011

Re: [css3-images] simplifying radial gradients

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 11 Oct 2011 10:52:59 -0700
Message-Id: <05894C5F-6D49-458B-9AE5-F82861C0D8D2@gmail.com>
Cc: Sylvain Galineau <sylvaing@microsoft.com>, Alan Gresley <alan@css-class.com>, Brian Manthos <brianman@microsoft.com>, "L. DavidBaron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

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

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:05 UTC