W3C home > Mailing lists > Public > www-svg@w3.org > January 2013

Re: [svg2] paint-order (more a CSS syntax question)

From: Dirk Schulze <dschulze@adobe.com>
Date: Mon, 7 Jan 2013 06:37:51 -0800
To: Erik Dahlstrom <ed@opera.com>
CC: "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <DDE8E8C5-4877-4CD1-9E93-3D5F76F487E6@adobe.com>

On Jan 7, 2013, at 4:17 AM, Erik Dahlstrom <ed@opera.com> wrote:

> A question about the 'paint-order' property [1]:
> 
> the double bars, ||, that separate the values in 'paint-order'. Does CSS  
> say what is the expected result is when a value keyword is repeated more  
> than once? I'm looking at CSS3 Syntax, and I don't see a clear answer[2].
> 
> Consider the following cases:
> 
>   paint-order: fill fill;
>   paint-order: stroke markers stroke;
> 

The proper spec is CSS Values and Units [1]:

""
A double bar (||) separates two or more options: one or more of them must occur, in any order.
""

In your case it is exclusive. A value does not occur more then once, like for the 'background' shorthand [2].

Example of valid values are:

	paint-order: normal;
	paint-order: stroke;
	paint-order: stroke fill markers;
	paint-order: marker fill;

and so on. Examples for invalid:

	paint-order: normal stroke;
	paint-order: fill fill;
	paint-order: stroke markers stroke;

Greetings,
Dirk

PS: The brackets for fill || stroke || markers seem to be unnecessary:

""
Juxtaposition is stronger than the double ampersand, the double ampersand is stronger than the double bar, and the double bar is stronger than the bar. Thus, the following lines are equivalent:
  a b   |   c ||   d &&   e f
[ a b ] | [ c || [ d && [ e f ]]]
""

[1] http://www.w3.org/TR/css3-values/#component-combinators
[2] http://www.w3.org/TR/css3-background/#the-background

> 
> 
> [1] https://svgwg.org/svg2-draft/painting.html#PaintOrderProperty
> [2] http://www.w3.org/TR/css3-syntax/
> 
> -- 
> Erik Dahlstrom, Core Technology Developer, Opera Software
> Co-Chair, W3C SVG Working Group
> Personal blog: http://my.opera.com/macdev_ed
> 
Received on Monday, 7 January 2013 14:38:24 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:53 GMT