From 7d96fba8a60ee24742292524f4a7a4aec3f178ca Mon Sep 17 00:00:00 2001 From: Eric Willigers Date: Tue, 14 Aug 2018 18:01:18 +1000 Subject: [PATCH] d attribute has different syntax than property --- master/paths.html | 36 ++++++++++++++++++++++++++++++++++-- master/types.html | 6 +++++- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/master/paths.html b/master/paths.html index fe05a906..15974459 100644 --- a/master/paths.html +++ b/master/paths.html @@ -231,6 +231,10 @@

Specifying path data: the 'd'none value.

+

When 'd' is parsed as an attribute, it is parsed according to the + svg-path EBNF + grammar, instead of the CSS grammar given above.

+

For animation, two 'd' property values can only be interpolated smoothly when the path data strings contain have the @@ -253,12 +257,40 @@

Specifying path data: the 'd'interpolated separately as real numbers. Flags and booleans must be interpolated as - fractions between zero and one, with any non-zero value considered - to be a value of one/true. + integer values clamped between zero and one.

+
+ +

The 'd' attribute

+ +
+
+ + + + + + + + + + + + + +
NameValueInitial valueAnimatable
d"path data"As if not specified.yes
+
+
+ +

+ The contents of the attribute must match the svg-path EBNF grammar defined below, and errors within the string are handled according to the rules in the Path Data Error Handling section. If the path data string contains no valid commands, then the behavior is the same as if the attribute was not specified. +

+ +

Path data

+

The following sections list the commands that can be used in path data strings. Those that draw straight line segments include the lineto commands diff --git a/master/types.html b/master/types.html index 52b62e12..e236b8fc 100644 --- a/master/types.html +++ b/master/types.html @@ -143,7 +143,11 @@

Attribute syntax

unitless length and angles to be used in presentation attribute while disallowing them in corresponding property values.

-

Note that all presentation attributes, since they are +

The 'd' presentation attribute is an exception, it is parsed + according to the svg-path + EBNF grammar.

+ +

Note that all other presentation attributes, since they are defined by reference to their corresponding CSS properties, are defined using the CSS Value Definition Syntax.