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

Re: marker-pattern syntax

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 28 Nov 2012 10:01:34 +1100
Message-ID: <50B5464E.1030500@mcc.id.au>
To: Dirk Schulze <dschulze@adobe.com>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, SVG public list <www-svg@w3.org>
Tab Atkins Jr.:
>> The required "segment" or "path" keyword at the start of
>> 'marker-pattern' would disambiguate.  (Without it, a single "url()" is
>> a valid 'marker-pattern' value, and thus is ambiguous in the
>> shorthand.)

Oh, that's a nice feature of having the keyword in there.  Can/should we 
make it optional in marker-pattern?

Dirk Schulze:
> If we would decide to make marker a shorthand. Not sure if it is worth it.

I think we should, if only because it currently is a shorthand (for 
marker-{start,mid,end}) and I find it strange if it isn't a shorthand 
for all of these marker-* properties.

>> We could potentially do some fanciness to simplify the common case
>> that marker-segment is trying to address, too, and make it so that an
>> omitted offset defaults to "50%" in "segment" mode, rather than the
>> "0" of "path" mode.  Dunno if that's worthwhile, but it does mean that
>> we're simply replacing "marker-segment: url()" with "marker-pattern:
>> segment url()", rather than "marker-pattern: segment 50% url()".  (In
>> addition to being more verbose, it's not immediately clear what the
>> difference is between that last one and "marker-pattern: segment url()
>> 50%;", which actually draws *three* markers, at the beginning, middle,
>> and end of each segment.  Shortening the default case might make this
>> easier to get right.)  However, defaults changing based on other parts
>> of the declaration can also be confusing on their own, so I dunno.

I'm also unsure about this.  But I'm in favour of making the 
marker-segment:url() case simple to write.

I think I am still not quite convinced about having the offset as the 
length value before the first url().  Since all the values after that 
optional length are url()s and lengths, in any order, I feel like the 
initial length looks like it is part of that repeating list.  Can we 
distinguish it somehow?

   marker-pattern: 20px path url() 40px, ...
   marker-pattern: path(20px, url() 40px), ...
   marker-pattern: path 20px repeat(url() 40px), ...

(I don't really like any of those.)

In terms of whether I'm OK with the overall approach, yes, if we can 
ensure the marker-segment case can be written easily.
Received on Tuesday, 27 November 2012 23:02:17 GMT

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