Re: [gradients] basics

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.

~TJ

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