Re: [css3-images] Repeating oblique gradients

On Dec 1, 2010, at 3:53 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> On Wed, Dec 1, 2010 at 3:47 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> On Dec 1, 2010, at 1:52 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>>>> My position is that even though most images are rectangles that are stamped out parallel to the page edges, generated gradients do not have to be stamped out in the same way. When background properties see that the image is a gradient, they can supress the angle direction from expressing within the image, and instead rotate the entire background layer in such a way that the final result is that the rendered direction of the gradient within the background is the same as it would be in other properties. Supposing that the image is repeating in the gradient direction, then 'background-size' would determine whether the entire background painting area is filled with gradient, or you just see an angled strip of gradient.
>>>> 
>>>> With this strategy, we eliminate the ugly versions of horizontal and vertical  rectangles tiles, avoid the need to expand the syntax of gradients, and allow authors to use what they already know for creating repeating patterns.
>>> 
>>> And eliminate the ability to create gradient tiles,
>> 
>> Why would it eliminate the ability to create gradient tiles? I don't see that at all.
> 
> If background-repeat:repeat makes gradients repeat their color-stops,
> then it can't simultaneously tile the gradient.  It has to do one of
> the other.

I really don't see why not, except for radial gradients, which are not included in this special behavior. 


> (Though, below, I see that you're suggesting it do one thing for
> linear gradients, and a different thing for radial gradients.)
> 
> 
>>> which actually is
>>> kinda useful with radial gradients.
>> 
>> I don't think that something we do for linear gradient tiles has to adversely affect radial gradients. Linear gradients have these two directions that would map nicely to the x and y of background-repeat: the gradient direction, and the perpendicular direction of the width of the gradient. I am not suggesting to do something like that to radials, as their main direction is outward, and you can't break radial repetitions into tiles, rotated or not. Is that what your beef with repeats vs. tiles is? I never intended to suggest that background-repeat do anything special for radial gradients. Check the subject line of this thread.
> 
> Having background-repeat do something different for linear and radial
> gradients is kinda horrifying.  

That's bizarre. A linear gradient and a radial gradient are two different things, with different needs. 

> Even worse is having the color-stop
> repetition for the two types of gradients be through different
> methods.  This combines both of these problems.  T_J

I not suggesting a different way to do automatic repeats in radials. In both radial and linear, the only color stops you get are the ones you author, with no magic keywords to get them to repeat inside the image. 

With background-repeat, the only thing that needs fixing is linear gradients, which look bad at angles when tiled. So you fix it by setting the rotation of the background instead of the rotation of the gradient inside the image. It is the simplest solution and completely intuitive. 

Received on Thursday, 2 December 2010 00:40:17 UTC