Re: [css3-images] linear-gradient keywords and angles are opposite

On Fri, 10 Jun 2011 09:04:24 +0900, Simon Fraser <smfr@me.com> wrote:

> On Jun 9, 2011, at 4:23 PM, Tab Atkins Jr. wrote:
>
>> On Tue, Jun 7, 2011 at 11:34 AM, Brian Manthos <brianman@microsoft.com>  
>> wrote:
>>> Paraphrasing [1]:
>>> When specified via angle, the angle can be understood as both the  
>>> direction ("toward the <angle>") and the ending point ("ends at  
>>> <angle>").
>>>
>>> Paraphrasing [2] and [3]:
>>> When specified via keyword, the keyword can be understood as both  
>>> opposite direction ("away from the <keyword(s)>") and the starting  
>>> point ("starts at  <keyword>").
>>>
>>>
>>> Is it intentional that these two ways of specifying gradient-line are  
>>> opposite?
>>
>> I've just committed a change to switch the way keywords are interpreted.
>>
>> I'm sticking with top/right/bottom/left for now, but explicitly saying
>> that they indicate where the ending-point of the gradient should be.
>
> I don't like this, for the reason that fantasai described earlier in the  
> thread. I think it's more intuitive for the keyword to describe the  
> starting position of the gradient. It comes as the first parameter, so  
> logically associates with the start of the gradient. Similarly, in the  
> declaration it comes next to the first color stop, so mentally will be  
> associated with that stop.
>
> linear-gradient(left, black, white)
>
> It just obviously a black->white gradient from left to right. Being  
> right-to-left just hurts my brain.

I think the answer is that neither meaning of "left" is intrinsically  
better. The word is ambiguous, and which ever meaning you decide to give  
it will be counter intuitive to some people or in some situations.

The problem is that we are trying to use a word that expresses a position  
do describe a direction.

I think we should replace left with leftwards, top with upwards, etc. Some  
people might say that leftwards is an uglier word than left, but I am sure  
nobody will ever be confused about what it means.

  - Florian

Received on Friday, 10 June 2011 02:34:29 UTC