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

RE: Gradient syntax proposal

From: David Perrell <davidp@hpaa.com>
Date: Thu, 20 Aug 2009 10:47:14 -0700
To: <www-style@w3.org>
Tab Atkins Jr. wrote:
| linear-gradient(left / green 30px, wheat 20%, mirror)

The mirror idea sounds good, but I don't like this form. 'Mirror' isn't a color stop. It would make more sense to me if 'mirror' is a keyword in the first part:

linear-gradient(left mirror / green 30px, wheat 40%)

where 'mirror' divides the gradient length in two and percentages refer to half the full length of the gradient (100% = 50% of the gradient length). This would degrade symmetrically.

| > Actually, neither color-stop positioning solution is 
| satisfactory inasmuch as the implicit position of color-stops 
| (subdividing the span between explicit color stops) doesn't jibe 
| with either. A default value is normally one of several 
| specifiable options.
| Not sure what you're saying here.

First and last color stop positions are specified as 0% and 100% by default. Default position for other color stops is a percentage of the space between stops with specified position. So, I'm thinking of a hierarchy of position types: percent <- relative length <- pixels <- default. Relative lengths refer to spans within specified percentages, pixel lengths to spans within specified percentages or relative lengths, default lengths within any specified lengths.

Make sense?

(BTW, since computed percentages for stops without specified positions are percentages of a span *between stops*, having percentages in general refer to spans between <length> stops is not totally inconsistent.)

| Last I saw it, it was discussed on a telecon and appeared in the
| minutes.  Here you go:
| http://lists.w3.org/Archives/Public/www-style/2009Jul/0176.html

Thanks! I was looking for the first mention (I thought it was many years ago), but that's a good reference.

Received on Thursday, 20 August 2009 17:48:30 UTC

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