Open ewilligers opened 7 years ago
There were extensive discussions about this, which no one from Blink participated in. See #49 and #119. The version shipped by Blink does not make sense & is inconsistent with other properties. The fact that it was shipped based on an early draft that was still being debated in the working group, with no experimental flag, is something that reflects poorly on Blink's implementation process.
The path()
function, as spec'd, is a <shape-function>
data type that can be used and replaced in any context where circle()
, ellipse()
, polygon()
and inset()
are used. Furthermore, the path()
function includes a fill-rule parameter, but the fill-rule for <path>
elements is defined by a separate property.
In contrast, offset-path
, as spec'd, should accept any of the shape functions. (The fill-rule isn't relevant, but it isn't a contradiction, either.) Last I checked, Blink's motion path implementation only accepted path, but that is a limitation of the implementation.
I'm not sure I agree with "does not make sense & is inconsistent" - you can't get from an attribute value to a <string>
without massaging/preprocessing the former (adding quotes, escaping newlines.) That path()
is a <basic-shape>
also doesn't restrict it from appearing in other productions. Choosing "untyped" over "typed" is what doesn't make sense to me.
That's pretty irrelevant though, because we can "fix" (recognize and serialize <string>
) this in Blink (I'll comment on the bug mentioned.) The ship is ways out to sea though, and I'm not sure d: <string>
is going to outsell d: <path()>
. I guess the least we can do is try though, with use counters and whatnot ('d' property usage is already tallied, but not the value set), even if that could just appear to be a play to the gallery.
The fact that it was shipped based on an early draft that was still being debated in the working group, with no experimental flag, is something that reflects poorly on Blink's implementation process.
I want to make it very clear for the record how ridiculous this statement sounds. At the 2016 face-to-face meeting which Eric references, the working group spent a considerable amount of time asking browser vendors to implement and ship more of SVG 2. Are we now to be taken to task for fulfilling the working group's wishes?
I don't find the SVGWG's reasons for dropping the path() function to be very compelling. While it could be viewed as technically being consistent for the d property to differ from consumers of <basic-shape>
, this is a distinction that will be lost on most authors. It's far more usable to accept the path() function everywhere, even if SVG never accepts the other <basic-shape>
s.
I want to make it very clear for the record how ridiculous this statement sounds. At the 2016 face-to-face meeting which Eric references, the working group spent a considerable amount of time asking browser vendors to implement and ship more of SVG 2. Are we now to be taken to task for fulfilling the working group's wishes?
While there were certainly requests for implementation of SVG2 features, to be fair, there was also a process where the group would resolve on what features were ready for implementation and I don't recall a resolution for this feature.
The minutes (https://www.w3.org/2016/02/05-svg-irc) seem to reflect that there was talk about setting up such a process in April. Critically, this was intended to help implementers who were paralyzed by choice, not to prohibit implementers from implementing bits.
The flavor of those minutes is very much "please implement more stuff".
This is WAI according to this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=652822#c8
Adding Agenda+ because it is not clear fro reading the issue which way we should go here. I note that @ewilligers has a patch ready which would fix this, assuming we accept the path() function which I think makes sense from a CSS consistency viewpoint.
The Working Group just discussed d property value
, and agreed to the following:
RESOLUTION: d property only supports path() for now but potentially will support other CSS shape function
RESOLUTION: The d property will support the shape function path() only for now. The d attribute will only support SVG path string an no functional notation. d will be a presentation attribute and contributes into the CSS styling hierarchy as other presentation attributes.
RESOLUTION: Discuss winding rule issue of polygon() and path() with CSS WG. Especially with regards of use in different properties like offset-path, d and clip-path.
RESOLUTION: Keep path() without fill rule on d property for now.
Blink shipped the d presentation attribute with value: path() | none
based on the Sydney face to face discussions early in 2016, and the spec text
from around the same time.
This is consistent with the syntax for offset-path https://drafts.fxtf.org/motion-1/#offset-path-property
I didn't realize the syntax had changed in a teleconference https://github.com/w3c/svgwg/issues/119 until https://crbug.com/652822 was raised after Blink shipped.
It isn't possible to change the syntax returned by getComputedStyle in a backwards compatible way.
Please consider restoring the spec syntax to path() | none
This has two major advantages: