Re: [svgwg] Does the entire path need to be valid in order to use a path attribute on a textPath

I agree with your logic, and I don't think we have any implementations yet, so there is no compat risk in changing it.

Furthermore, we have this instruction in the definition of `path` attribute:

> An empty string indicates that there is no path data for the element. This means that the text within the ‘textPath’ does not render or contribute to the bounding box of the ‘text’ element.  If the attribute is not specified, the path specified with ‘href’ is used instead.

If that is the desired behavior (similar to an empty `d` value on a `<path>` preventing rendering), then I think that should be the invalid value default as well (that is, `path="foo"` should behave the same as `path=""`).  And then it only makes sense to use partial parsing, too. Basically, if a `path` attribute is present, `href` is ignored. Use as much of the path as can be parsed, and then layout as much of the text as fits on that path..

For the summary description, the "If the path contains an error..." sentence could be removed completely.
_______________________

Aside, when someone makes edits, also fix the typo in the `href` definition:

> or the referenced element is not a ‘path’ element) or basic shape

"or basic shape" should be inside the ")"!

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/393#issuecomment-374456360 using your GitHub account

Received on Tuesday, 20 March 2018 03:00:34 UTC