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

Add SVG data #59

Open
strarsis opened this issue Apr 6, 2017 · 15 comments
Open

Add SVG data #59

strarsis opened this issue Apr 6, 2017 · 15 comments
Labels
idle Issues and pull requests with no activity for three months.

Comments

@strarsis
Copy link

strarsis commented Apr 6, 2017

It would be helpful to have also SVG related data.

Optimizers like svgo heavily use such data, see https://github.com/svg/svgo/blob/master/plugins/_collections.js .

Some svgo plugins also define extra data:

Further interesting data for SVG: Which attributes allow color-, dimension-, number-, string-, url-values?
This avoids blindly iterating over all values and trying to match them with multiple regexps for example.

@Elchi3
Copy link
Member

Elchi3 commented Nov 9, 2017

@pelotom
Copy link

pelotom commented Apr 4, 2018

Just wanted to mention that csstype is a project which generates CSS type definition files for TypeScript and Flow from the MDN data. It's now being used in the typings for React as well as a growing number of CSS-in-JS libraries. So it would benefit a lot of high-profile libraries and their many users if the MDN data were complete 😄

@pkuczynski
Copy link
Contributor

I could work on this, but not sure how to start. @lahmatiy any suggestions?

Would this be a good source for start: https://www.w3.org/TR/SVGTiny12/index.html ?

@frenic
Copy link
Contributor

frenic commented Apr 5, 2018

I added https://github.com/frenic/csstype/blob/master/src/data/svg.ts based on https://svgwg.org/svg2-draft/propidx.html as a temporarily solution until this is solved.

@lahmatiy
Copy link
Contributor

lahmatiy commented Apr 5, 2018

@pkuczynski I think https://www.w3.org/TR/SVG2/ should be a source of truth. But that spec is huge and property definitions aren't located in one place. I can suggest to add properties in parts.

@lahmatiy
Copy link
Contributor

lahmatiy commented Apr 5, 2018

Oh, I forgot about property index appendix. Thank you @frenic for pointing out.
@pkuczynski I think that link https://www.w3.org/TR/SVG2/propidx.html can be used too

@lahmatiy
Copy link
Contributor

lahmatiy commented Apr 5, 2018

And here one problem: some SVG styling property names intersect with regular one and have differ syntax. We need to decide what to do with that issue.

@pkuczynski
Copy link
Contributor

@lahmatiy I think the last comment relates to #144, requesting the ability to specify attribute support by tag. This is not currently supported, isn't it?

@wbamberg
Copy link
Contributor

wbamberg commented Apr 5, 2018

Also please note that @JeremiePat is working on improving the SVG docs on MDN at the moment, and as part of that is looking into moving SVG data (that's currently embedded in MDN macros) into this repository. So he might be able to help :).

https://discourse.mozilla.org/t/time-to-lift-up-the-svg-documentation-to-the-next-level/25529
https://discourse.mozilla.org/t/cleaning-svg-macro/27192

@JeremiePat
Copy link

JeremiePat commented Apr 5, 2018

Yes, and I'm following that discussion very closely. At that point and based on the feed back I got so far I do not plan to do any hard change in where the data are hosted at the moment.

That said, rationalizing MDN data about SVG is definitely in my scope for the next months. At that point, the only thing I know for sure is that the SVG2 spec is the source of truth regarding SVG specification. But even like that the spec is still in flux on some points so there is no rush on my side.

@pkuczynski
Copy link
Contributor

@JeremiePat should I then not work on this for now?

@JeremiePat
Copy link

@pkuczynski Actually, it's quite the opposite. As I do not plan to do any big change in the short term, I would love to assist you with the ongoing work here. Please feel free to lead and I'll assist as much as I can.

@waldyrious
Copy link

An additional reference: Fyrd/caniuse#3 ("SVG feature coverage").

@jcready
Copy link

jcready commented Jul 12, 2019

What's the word on this?

@g-a-v-i-n
Copy link

would love an update on this

@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Issues and pull requests with no activity for three months.
Projects
None yet
Development

No branches or pull requests