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

Re: [gradients] basics

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 11 Nov 2009 10:56:57 -0600
Message-ID: <dd0fbad0911110856h1b30bb8avae9588423b1215da@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style <www-style@w3.org>
On Wed, Nov 11, 2009 at 10:19 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On Nov 11, 2009, at 6:31 AM, Tab Atkins Jr. wrote:
>>> Hmm. I would find that unexpected for both root and background-size: 50%.
>>> The root does not have a background painting area to clip to with
>>> 'background-clip'?
>> Really?  :root is magic - it allows backgrounds to overflow itself
>> normally.  Having a gradient act differently (that is, actually
>> clipping to the :root's background-size) would actually screw things
>> up quite a bit in that case.  I *often* resize <body> and set a
>> too-large background on it.
> OK, that makes sense.

All right, so current clipping behavior *isn't* quite what we want.
At least in some cases we *do* want it to act like an infinite image.

> Hmmm. It still seems like more magic than we need. If you want the color
> stops to be closer together while still having the color flow to the edges,
> why not just set them closer together?

You're the one that came up with the example.  ^_^

In general, though, I don't think there's a correct solution to this.
I know of several places where I'd want it to act like an infinite
image, but there are certainly also cases where you want it to be
finite (without repeating).  Luckily we've already got stuff in the
works to address this - Moz has the -moz-image-rect() function already
which clips an image to a specific region.  Can we just ensure that
image-rect() makes it into CSS3 Images and call it a day?  I can
revise the gradient section to more clearly explain the infinite-ness
of the generated image.

Received on Wednesday, 11 November 2009 16:57:51 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:41 UTC