W3C home > Mailing lists > Public > www-style@w3.org > August 2009

Re: Gradient syntax proposal

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 17 Aug 2009 17:13:40 -0700
Message-Id: <FE4239AB-137E-4370-8BC7-A992C59FC25E@gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "www-style@w3.org" <www-style@w3.org>

Sent from my iPhone

On Aug 17, 2009, at 3:34 PM, fantasai <fantasai.lists@inkedblade.net>  

>>> This is not simple?
>>> linear-gradient(top left 135deg 200px / red, white, blue)
>>> /* linear gradient from top left corner angled at 135deg going for  
>>> 200px
>>>   transitioning from red to white to blue */
>> That requires an *additional* argument to the angle construction.
>> It's equally easy to do:
>> linear-gradient(135deg / red, white, blue 200px)

It's also including 'top left' which is unnecessary and so far not  
included for angles. The is only one corner that makes logical sense  
for angles between 90 and 180, and that is the lower left.

> Which requires an additional argument to the last color  
> construction. :)

The last color stop already has a place for a length. Angles have  
stood alone in Tad's proposal.

> Is the 200px offset from the beginning of the gradient or from the
> last color stop? I'm not totally clear on this.

All measurement are from the beginning.

Exept with David Perrell's idea, if percentages are in between two  
other stops that are not percentages, then they would be percentages  
of what's between those other stops.

> (I find it easier
> to think of the entire gradient being 200px long and then filling
> in the color stops than positioning the last color stop and then
> filling in the color stops backwards from there.)

I find it easier to think of the last stop's measurement as being the  
end. Why specify the end twice? Or the beginning? It's much simpler to  
have one set if measurements to say where the colors go, than to have  
one set of measurements overlayed into another.
Received on Tuesday, 18 August 2009 00:14:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:28 UTC