W3C home > Mailing lists > Public > www-svg@w3.org > November 2012

marker-pattern syntax

From: Dirk Schulze <dschulze@adobe.com>
Date: Wed, 21 Nov 2012 22:54:49 -0800
To: SVG public list <www-svg@w3.org>
Message-ID: <113DAB6C-E9EB-4172-A18E-CA091A83806F@adobe.com>
Hi SVG folks,

Just looked at the syntax of maker-pattern and think that there is a mistake[1]:

	[ none | <length> | <percentage> | <funciri> ]+

"A bar (|) separates two or more alternatives: exactly one of them must occur."[2]

Means that just one in the list can occur, which is may or may not be correct.

<percentage>,<length> "Indicates the length of a gap in the repeated pattern of markers."

In this case it seems correct. But looking at the example, the values do not define the length of a gap but the distance between two markers (which makes more sense IMO). But in this case the syntax is wrong (and the wording can be improved). It depends on the needs of 'marker' shorthand, but I have two syntax proposals:

	none | [ <funciri> || [<length> | <percentage>] ]#


	none | [ <funciri> [<length> | <percentage>] ]#

The difference is the order of <funciri> and the distance. In the first proposal the order doesn't matter (I would prefer this), in the second the <funciri> must be first.

I changed the + with a #, because it seems to be more consistent with other CSS properties to comma separate sequences:

	marker-pattern: url(#marker1) 20px, url(#marker2) 20%;

But I did not check if that works well with 'marker' shorthand. But I would expect that marker-patterns will be used more often once they are implemented. Therefore, they should have higher priority in the syntax (means no / separator if possible).


[1] https://svgwg.org/svg2-draft/painting.html#RepeatingMarkers
[2] http://www.w3.org/TR/css3-values/
Received on Thursday, 22 November 2012 06:55:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:30 UTC