Re: [css3-images] closest side radial gradients

On Nov 3, 2011, at 9:31 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> On Wed, Nov 2, 2011 at 9:38 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> As much as I would have to slow down the process, I'd like to suggest another change to radial-gradient. Right now, if you have a position change so that the gradient is not centered, the gradient gets clipped when you have farthest-side or *-corner, but for closest side the gradient just gets smaller as you get closer to a side, and disappears altogether (except for the last stop) if you align the center with an edge.
>> 
>> What I think we should consider is that closest-side should not make the gradient smaller. The way this would work is that 'closest-side' would not consider the side(s) that you've offset the gradient towards when determining which is closer, and the gradient would get clipped instead.
>> 
>> I think this would be more useful design-wise, especially when aligning the center with a side or corner, and is probably more in the spirit of what closest-side was intended for. If you wanted the old behavior you could still achieve it through the gradient sizing, e.g. 'radial-gradient(-12.5% -25%, 75% 50%, white, black)' (I think). But I think the clipping behavior would be more useful more often.
>> 
>> Below (or attached image, if you don't see it embedded), I show a sketch of this idea (for 'circle' shape), with current spec behavior on the left and proposed on the right.
> 
> I prefer to not change the functionality now unless there's a horrible
> mistake that we've missed up to now.  This doesn't seem like a
> horrible mistake, but rather just a feature request.  I'm totally cool
> with working on this problem in level 4.
> 
> For now, let's just finish up the discussion on a more literate syntax
> and then finish things at this level.  As soon as we move to LC I'll
> open a real ED for level 4, and we can address better implicit-sizing
> keywords there.
> 
> Is that cool?

I don't think it is the sort of thing you can just change in CSS4, after people start using CSS3 version. That would then be a breaking change. What I am proposing is that 'closest-*' acts, in effect, as 'closest-opposing-*', although I don't really think a keyword name change is needed. To me, this makes the side/corner uses of <bg-position>  (the primary reason for having <bg-position>) doubly as useful as what the draft currently has, while removing an non-useful and unintuitive behavior that is not present in 'farthest-*'. 

Received on Thursday, 3 November 2011 16:55:30 UTC