W3C home > Mailing lists > Public > www-style@w3.org > August 2009

Re: Talk on radial gradients

From: Simon Fraser <smfr@me.com>
Date: Mon, 24 Aug 2009 09:30:39 -0700
Cc: www-style list <www-style@w3.org>
Message-id: <6048016F-3BE0-4172-9DD3-86A7F4A9F81A@me.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
On Aug 24, 2009, at 6:55 AM, Tab Atkins Jr. wrote:

> On Sun, Aug 23, 2009 at 11:43 PM, Simon Fraser<smfr@me.com> wrote:
>> On Aug 23, 2009, at 11:18 am, Tab Atkins Jr. wrote:
>>> Second, I don't think an ending circle is necessary *at all*, with a
>>> point or radius.  As I mentioned above, in every case of a radial
>>> ...
>> I'm not sure I agree here. You could imaging a radial gradient  
>> background
>> being used to highlight a foreground item. In that case you'd want to
>> gradient
>> to be a lot smaller than the box. Sure, you could add a color-stop,  
>> but ever
>> additional color-stop adds complexity.
> If you're highlighting a foreground item, you'll have to know how
> large the item is and where it's positioned.  If you know that, you
> can make yourself a gradient in any common image editor.

You can use getBoundingClientRect in JS. Pre-canned images would
not work with flexible layouts.

My point is not to dwell on this particular case, but to make the point
that the assumption that authors almost always want radial gradients
to fill the box may not be valid.

>>> Third, and this is something I'm not completely sure on yet but  
>>> think
>>> is probably important, you should be able to specify elliptical
>>> shapes.
>> I agree, but FYI elliptical shapes are not supported by Core  
>> Graphics on
>> Mac,
>> so there may be significant impediments to implementation.
> Hrm.  That's a problem.  Without ellipses, though, radial gradients
> are kinda useless.  By far their most common use on the web, I
> believe, is to fill boxes according the box's shape.
> That might be why Hyatt only did circular gradients at first.
> However, SVG handles elliptical gradients just fine (just coded one
> for myself to be sure).  How do you draw them on the Mac?

It transforms the graphics context, which we can do for CSS gradients
as well, so go nuts with ellipticals!

Received on Monday, 24 August 2009 16:31:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:38 UTC