Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orient="auto-start-reverse" is SVG2 feature; needs compat data #23633

Open
S-Rafael opened this issue Nov 10, 2022 · 2 comments
Open

orient="auto-start-reverse" is SVG2 feature; needs compat data #23633

S-Rafael opened this issue Nov 10, 2022 · 2 comments
Labels
data:svg 🖌️ Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG

Comments

@S-Rafael
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/orient

What specific section or headline is this issue about?

Usage notes

What information was incorrect, unhelpful, or incomplete?

The description of the allowed values of the orient attribute of a <marker> element does not provide versioning information. Therefore, the documentation does not help in determining that the value auto-start-reverse is an SVG2 extension.

current description

What did you expect to see?

I would like the "Note" box to explicitly mention that this feature is only supported in SVG2 and later:

suggested wording

Do you have any supporting links, references, or citations?

Orient attribute in SVG 1.1: https://www.w3.org/TR/SVG11/painting.html#OrientAttribute
Orient attribute in SVG 2: https://svgwg.org/svg2-draft/painting.html#OrientAttribute

Do you have anything more you want to share?

This issue is split off from mdn/content#22061 as advised by @queengooborg.
It was first found by the Gitlab user KrIr17 when investigating a versioning issue in Inkscape (open-source SVG editor).

@sideshowbarker
Copy link
Collaborator

sideshowbarker commented Nov 10, 2022

Do you happen to know details about what the level of support is in browsers for orient="auto-start-reverse" as documented in the current spec at https://svgwg.org/svg2-draft/painting.html#OrientAttribute?

There is what seems to be a relevant test here:

https://wpt.fyi/results/svg/painting/marker-orient-001.svg

That test fails in Safari but passes in all other browsers.

And there are what seem to be some other relevant tests here:

Those tests both only pass in Firefox and fail in all other browsers — but it’s not clear if those failures are due to lack of support for orient="auto-start-reverse" or due to other failures.

So my best guess is that orient="auto-start-reverse" is supported in Firefox, maybe supported in Chrome — though possibly not completely — but very likely not supported at all in Safari.

Given that, the next step would be to update the data in the browser-compat-data repo at https://github.com/mdn/browser-compat-data/blob/main/svg/elements/marker.json#L155 — by adding notes there to the compat data for any browsers that don’t yet completely support the auto-start-reverse value.

And after that data is updated, those notes would then show up in the Browser Compatibility table at https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/orient

That’s the normal way MDN would handle information about an attribute like this: By documenting any differences between what the spec says and what’s actually implemented in browsers.

Otherwise, as far as SVG1.1 and SVG2: Browsers don’t have separate SVG1.1 and SVG2 support — browsers are agnostic to spec versions and don’t know the difference between which features are SVG1.1 features and SVG2 features.

And MDN just documents web-platform features as-implemented in browsers. So MDN intentionally doesn’t distinguish between newer versions of specs versus older versions — instead, the Specifications sections in MDN articles cite the current version of the spec, and the Browser Compatibility tables document any differences between what the spec says and what’s actually implemented in browsers.

And so, as far as this specific case: MDN intentionally doesn’t attempt to distinguish between the orient feature as documented in SVG1.1 versus the orient feature as documented in the current spec (SVG2). It only attempts to provide information about what the current spec says, and what the level of browser support is for what the current spec says.

@S-Rafael
Copy link
Author

S-Rafael commented Nov 10, 2022

Thanks @sideshowbarker for the detailed explanation. I understand that the MDN does not intend to follow the SVG versioning (although there are some "Note" boxes that mention attributes becoming Geometry Properties in SVG 2, so some versioning information is present anyway).

Unfortunately, I do not know of a granular test for orient="auto-start-reverse" which would presumably need to check the rendering output of an asymmetric marker to see if it's reversed in the marker-start position but rendered the same way as auto in other positions.

Currently all browsers are listed as fully supporting the orient spec; I imagine that this would have to be changed to "partial" for those that don't.

Edit: After some searching, I've found https://wpt.fyi/results/svg/painting/marker-orient-001.svg but I don't know how comprehensive it is.

@Josh-Cena Josh-Cena changed the title SVG <marker>: provide versioning information for orient attribute orient="auto-start-reverse" is SVG2 feature; needs compat data Jun 27, 2024
@bsmth bsmth transferred this issue from mdn/content Jul 2, 2024
@queengooborg queengooborg added the data:svg 🖌️ Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:svg 🖌️ Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG
Projects
None yet
Development

No branches or pull requests

3 participants