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

Re: [gradients] basics

From: Simon Fraser <smfr@me.com>
Date: Sun, 08 Nov 2009 19:15:32 -0800
Cc: www-style list <www-style@w3.org>
Message-id: <A73FAF01-2C86-4615-AD23-80CC948854E0@me.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
On Nov 8, 2009, at 7:08 pm, Tab Atkins Jr. wrote:

> On Sun, Nov 8, 2009 at 10:50 AM, Simon Fraser <smfr@me.com> wrote:
>> I think the points made need to be:
>> * gradient images have no intrinsic size,
>> * therefore they fill the box they are being rendered into (like  
>> SVG images
>> with no intrinsic size)
>> * and therefore, when applied to backrounds, background-size etc  
>> have no
>> effect.
>
> 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), and so background-size and
> background-repeat have no effect.
>
> I will make this a bit clearer in the introduction to the section.

But background-size does have an effect if given absolute length units:

background-image: linear-gradient(yellow, blue);
background-size: 50px 50px;

will give you a 50x50px square containing the gradient, whose repeat  
behavior can then be controlled using background-repeat. I think this  
is a desirable behavior and we should keep it.

>
>> If you refer to the CSS 2.1 spec I think you should be more  
>> specific about
>> which section you are referencing.
>
> Will do.

Thanks
Simon
Received on Monday, 9 November 2009 03:16:46 GMT

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