Re: Repeating gradients (Was: Re: Talk on radial gradients)

On Aug 26, 2009, at 12:24 PM, "Tab Atkins Jr." <jackalmage@gmail.com>  
wrote:

>> Perhaps we should just have a keyword to indicate if that is true  
>> or not. If
>> not, then 45% becomes the same as 'bottom left to top right', and  
>> could be
>> written much shorter. The same word would control if the shape was  
>> a circle
>> or an oval (if only one radius is given, or no degrees). Background- 
>> size
>> would do all the heavy lifting.
>
> Note that in linear-gradient() I've gone ahead and eliminated to "to
> <bg-positon>" bit, so it's just "top left".
>
> However, I don't like making the image-generating function depend on
> things specified outside of it.  That means that the exact same
> gradient code (or whatever) works differently based on context.  I
> want to avoid that if possible.

Actually, that's kind of what you already have. If you had an actual  
pixel-based image with a 45 degree gradation in it, that angle would  
normally change as you stretch it one way or another. But in your  
proposal it doesn't. it constantly changes relative to itself (not  
relative to the background) as you stretch the box, in ways that  
static images do not. If you have a corner-to-corner gradient, on the  
other hand (not a specified angle), then your proposed gradient is  
resizing more like a static image would (the angle changing based on  
the background-size).

So my proposed change doesn't actually introduce new behavior, it just  
changes how you would specify those behaviors.

Received on Thursday, 27 August 2009 00:32:54 UTC