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

Re: Gradient syntax proposal

From: James Elmore <James.Elmore@cox.net>
Date: Sat, 15 Aug 2009 12:15:44 -0700
Message-Id: <3DD83E8B-FCBE-4051-B649-B94E8C17D64F@cox.net>
Cc: Brad Kemper <brad.kemper@gmail.com>, fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Hi, all;

Why not place the gradient FIRST, then the positioning?

This might make some of the simplest cases even simpler, for example,

linear-gradient(green, blue) /* if the default is top to bottom, this  
makes a very simple background */

Then, on to the rainbow example: linear-gradient(red, orange, yellow,  
green, blue, purple)

The next step in learning how to use this feature would be to specify  
the spacing of the gradients -- repeating the previous example with  
other than defaults, gives

linear-gradient(red, orange 20%, yellow 40%, green 60%, blue 80%,  
purple)

This uses the defaults for the first (0%) and the last (100%)

NOTE: I may have the values wrong because I am not used to gradient  
specification, but the idea is to make it very simple to use them.


Then, the users can add the positioning -- after a slash. To make a  
diagonal rainbow, try:

linear-gradient(red, orange, yellow, green, blue, purple / top-left)

This just seems simpler to me, as a casual user. Make the defaults  
simple, sensible, and it will be easier to use. Place the gradient  
first. (that is what you are specifying, right?) Then the starting  
point and ending point will make sense, based on the gradient. (or  
the point, angle, and length, for the angle form, if that is still  
under consideration.)

I am losing parts of this discussion, either because I do not yet  
have my head around the concepts, or because I do not have a  
reference for the actual proposal. Rather than repeat everything,  
could someone provide a url to the syntax being proposed. At least, a  
reference to the 'bg-position' would help me. Maybe I am just too  
lazy to look it up, but it is not clear to me exactly what the  
difficulties / complexities of the positioning system are.

Thanks,

</James>
Received on Saturday, 15 August 2009 19:16:26 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:20 GMT