Re: marker-pattern has a weird grammar

On Tue, Nov 11, 2014 at 4:26 PM, Amelia Bellamy-Royds
<amelia.bellamy.royds@gmail.com> wrote:
> On 11 November 2014 09:56, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> > If an author wants to place multiple markers at the same point, just use
>> > a
>> > gap of zero.
>>
>> This simplifies the grammar, but complicates the authoring experience,
>> which is an inversion of the priority of constituencies.  If we think
>> it's reasonable to allow multiple markers at a given spot (and I think
>> it is) then allowing that to be specified directly is simpler.
>
> Fair enough, but if we can have gaps at both the beginning and end of a
> repeat pattern, then why not two gaps in a row?

Because two gaps in a row does nothing that you can't already
accomplish with calc(), but gaps at both start and end of a repeat
pattern *does* give you something new: the ability to "offset" the
repetition.  For example, say I wanted markers every 100px, but I
wanted the first one to be 20px from the edge.  I can write: "20px
url(#foo) 80px" to achieve this.

This could be done with an explicit offset too, of course, but this is
a simple way to do it without a new property.

> One further thing that needs to be clarified: are percentages defined in the
> user coordinate system or relative to path length?  Some of the past
> discussions have seemed to assume that percentages would be relative to path
> length.  But dash array percentages are calculated relative to the
> coordinate system definition of 100%.  I think for consistency the marker
> gaps should be defined the same way.  As much as I'd love to have a way of
> specifying dashes relative to path length, that's another discussion.

Indeed.

~TJ

Received on Wednesday, 12 November 2014 00:48:30 UTC