Re: [gradients] basics

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 UTC