- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 17 Aug 2009 16:00:46 -0500
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: www-style@w3.org
On Mon, Aug 17, 2009 at 3:54 PM, fantasai<fantasai.lists@inkedblade.net> wrote: > Brad Kemper wrote: >> On Aug 17, 2009, at 11:00 AM, fantasai <fantasai.lists@inkedblade.net> >> wrote: >> >>> I would prefer restricting stops to percentages. The swapping effect >>> is confusing, and I don't see any reason you'd /need/ to use lengths >>> when you can specify the length of the overall gradient already. >> >> I can think of plenty of situations where I'd want the whole gradient to >> be a fixed distance, regardless of box size, and regardless of angle. I'd >> like to be able to set that in a simple grammar, using color-stops only. >> It's not nearly as simple if the angle is not a multiple of 90, and I have >> to use bg-position. > > 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) (You probably meant an angle other than 135deg, btw. That points up into the top-left, and would currently result in a pure-blue gradient as the starting and ending points are identical.) ~TJ
Received on Monday, 17 August 2009 21:01:45 UTC