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

Re: [gradients] basics

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 9 Nov 2009 08:52:03 -0600
Message-ID: <dd0fbad0911090652v6f9042b2ic15d1deb2977270a@mail.gmail.com>
To: Brendan Kenny <bckenny@gmail.com>
Cc: Brad Kemper <brad.kemper@gmail.com>, Simon Fraser <smfr@me.com>, "news@terrainformatica.com" <news@terrainformatica.com>, www-style <www-style@w3.org>
On Sun, Nov 8, 2009 at 10:54 PM, Brendan Kenny <bckenny@gmail.com> wrote:
> On Sun, Nov 8, 2009 at 10:39 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> On Nov 8, 2009, at 7:08 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>>> We can actually be stronger about this - gradient images are infinite
>>> in size (the abstract concept of 'box' used when describing their
>>> rendering has no intrinsic size),
>>
>> I don't think that is an accurate statement. They have no intrinsic size,
>> but 100% in a color-stop would match the width of the background-size for
>> 0deg linear-gradients. That's not infinite size, but is full resolution at
>> any size.
>
> Right, but I think his point is just that a color is still defined for
> any point beyond the final color-stop, even if it's not displayed.
> Even with a finite extent/color-stop box, the gradient itself *could*
> cover an infinite plane with color.

Yup, that was my thought - the 'box' mentioned in the spec would be an
abstract concept that obeyed background-size, but the gradient itself
would be infinite in extent.

> However, if a gradient is a generated image, it makes sense to respect
> background-size as the canvas (so to speak) that the gradient is drawn
> on. That seems to be what most people here had already assumed would
> happen.

Yup, both current implementors seem to have aligned behind that now.
Truth be told, it's probably the most sensical interpretation, as it
then fully and intuitively interacts with all the other background-*
properties.  There are just some interesting tricks you can do with an
infinite-extent image.  Ah well.  I'll make it clear in the spec that
the 'box' is the actual size of the image too.

(I think it'll end up reading sort of weird, though - the intrinsic
dimensions of the gradient are the same as the effective dimensions of
an image without intrinsic dimensions used in the same context.)

> Would percentage-type values for end points scale with
> background-size, then?

It appears they do in the current implementations, and that makes the
most sense to me as well.

~TJ
Received on Monday, 9 November 2009 14:53:04 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:22 GMT