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

On Jun 9, 2011, at 9:20 AM, Brian Manthos <brianman@microsoft.com> wrote:

>> Behalf Of fantasai
>> Let's say I create a gradient like this:
>> 
>>   background: linear-gradient(left, blue, green);
>> 
>> This will create a gradient with blue starting at the left edge of the
>> box
>> progressing to green on the right edge of the box.
>> 
>> Now suppose I create a gradient like this:
>> 
>>   background: linear-gradient(left, blue, green 10px);
>> 
>> This will create a gradient with blue starting at the left edge of the
>> box
>> and progressing to green at 10px from the start of the gradient, i.e.
>> at
>> the left edge of the box, and continuing as green until the right edge.
> 
> background: linear-gradient(left, transparent 90%, blue 90%, green);
> 
> With the current spec this will render a similar "colors on the right" rendering.  Is this one a problem for the "weird, the colors should be on the left" way of thinking about things too?
> 
> 
> Again, the root issue is that angle and keyword specifications are not consistent with each other in the prose or in the effect.  One of them should be change so the spec is self consistent across first parameter formats.
> 
> If you want it to mean "coming from <keyword>" then the angles should behave the same way.

Is there evidence that this is a major confusion point that needs fixing? The issue is that you and at least a few others intuitively take 'left' to mean "leftwards" instead of "from left", correct?

If this really is a big issue, we could change 'left' (etc.) to 'from left' (etc.) or 'towards right' (etc.). This would be OK with me, even though I'd rather not. At least that way, authors could write multiple versions of the declarations to handle the syntax changes between versions (as they do now, when including '-webkit-gradient' and IE's 'filter' property for simple horizontal or vertical gradients). 

Received on Thursday, 9 June 2011 17:06:06 UTC