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

Svg Support #22

Closed
wants to merge 1 commit into from
Closed

Svg Support #22

wants to merge 1 commit into from

Conversation

fdietze
Copy link
Contributor

@fdietze fdietze commented Feb 7, 2018

I was able to port the svg-tags from scalatags via vim-macros!

For reference:

  • Create generic svg/Attrs.scala trait with typed listings of SVG attributes
  • Same for svg/Tags.scala (might need multiple files similar to how HTML tags are done)
  • Add JS-specific type aliases of the above to jsdom/defs/package.scala
  • Probably need a new key class: SvgAttr (I don't think we should reuse Attr for that), and a canonical builder for it (see canonical dir). Don't want to accidentally use SVG attrs on HTML elements, and without Track parent tag of properties #13 not sure what else we can do. Not sure about this, and IIRC you're not using these concrete classes in Outwatch, so I guess I'll need to think about this some time later.
  • For the Tag class, I think no need to create SvgTag, maybe Tag[SVGElement] would be enough. Not sure.
  • Lastly, we'd need to add SVG to the bundle in CompileTest. I think I'm ok allowing naming collisions between SVG and HTML, since most librarries will probably choose to namespace everything svg-related. Things within SVG should probably be free of collisions and follow the same naming guidelines as our HTML stuff
  • SVG Namespaces?

fixes #20

@fdietze fdietze mentioned this pull request Feb 7, 2018
@fdietze
Copy link
Contributor Author

fdietze commented Feb 8, 2018

Closing in favor of #23

@fdietze fdietze closed this Feb 8, 2018
@fdietze fdietze deleted the svg branch February 8, 2018 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SVG support
1 participant