W3C home > Mailing lists > Public > www-style@w3.org > September 2014

[css-image] gradient midpoints

From: Rik Cabanier <cabanier@gmail.com>
Date: Sun, 28 Sep 2014 20:41:07 -0700
Message-ID: <CAGN7qDB+orkm2dRyoqJdOfRfWHJVbN+LtE7tjZ6xrV4G7JFyOg@mail.gmail.com>
To: www-style list <www-style@w3.org>
I have a couple of question about the current wording of midpoints for CSS

1. The spec [1] contains 2 contradictory statements:

Similarly, the color of a color stop can be omitted. The causes the color
to be automatically computed to halfway between the two surrounding stops,
so that the "midpoint" of a transition can be easily adjusted. *If multiple
stops in a row lack a color, they space themselves out equally in "color
space", giving more control over the smoothness of the transition.*


There can only be at most one color interpolation hint between any two
given normal color stops; using more than that makes the function invalid.

I think the second statement is the correct one since exponential
interpolation between midpoints is not defined.

2. The spec also doesn't require that a midpoint is not the first or last
stop in a gradient.

3. I think it's OK to assume that a midpoint that coincides with a regular
stop, does nothing?

4. It is now legal to write a color stop with no information at all.
For instance: linear-gradient(white 0%,,black 100%) -> note the two commas.
Is this OK?

1: http://dev.w3.org/csswg/css-images-4/#color-interpolation-hint
Received on Monday, 29 September 2014 03:41:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:46 UTC