[css-images] Syntax for image() incorrect?

The description for the image() function says that it allows to use a
solid color as an image.

Though its syntax is defined as

    image( [ [ <image> | <string> ]? , <color>? ]! )

meaning that colors are only allowed as fallback values. So, in order
to allow solid-color images, either the syntax needs to be changed to

    image( [ [ <image> | <color> | <string> ]? , <color>? ]! )

or

    image( [ [ [ <image> | <string> ]? , <color>? ]! | <color> ] )

or <image> may be changed to accept <color> values directly, i.e.

    <url> | <image()> | <image-set()> | <element()> | <cross-fade()> |
<gradient> | <color>

Furthermore, the syntax for the image() function suggests that the
comma stands for its own and is not influenced by the question mark
multiplier after <color>. Therefore I wonder whether the correct
syntax would rather be (disregarding the changes suggested above)

    image( [ <image> | <string> ] [ , <color> ]? )

Sebastian

Received on Thursday, 3 March 2016 13:38:24 UTC