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

Support for CSS properties in SVG #296

Open
pepelsbey opened this issue Aug 17, 2014 · 4 comments
Open

Support for CSS properties in SVG #296

pepelsbey opened this issue Aug 17, 2014 · 4 comments
Labels

Comments

@pepelsbey
Copy link
Contributor

There are two ways of doing this:

First

  1. Get a list of all possible CSS properties that could be applied to SVG
  2. Inject them to existing dictionary
  3. Make sure that Hayaku is available inside <style> elements in SVG

In this case all properties would be available in both scopes which could possibly make it harder to choose proper abbreviation (f for font or for fill?) and could also cause problems with CSS-only properties in SVG and vice versa. But this shouldn’t be a problem if you know what you’re doing.

Second

  1. Get a list of all possible CSS properties that could be applied to SVG
  2. Divide CSS and SVG properties between scopes (they would intersect)
  3. Make sure that Hayaku is available inside <style> elements in SVG

In this case SVG-only properties would be available only inside SVG. Which could, for example, help to avoid misusing border instead of stroke, etc. But this would also make it impossible to write external CSS files for SVG but this is rather rare case.

I wish there could be a third way of doing this combining all good side of the first two. Maybe there is.

/cc @yoksel

@kizu kizu added the Feature label Aug 18, 2014
@kizu
Copy link
Member

kizu commented Aug 18, 2014

I like the overall idea! The second variant is better, as there is not that big of an intersection between those styles available for HTML and for SVG, so we could introduce a new scope for SVG and then somehow reuse or just copy-and-paste those properties that are shared with the CSS.

@yoksel
Copy link

yoksel commented Aug 19, 2014

I think the second one is better.

@pepelsbey
Copy link
Contributor Author

@kizu
Copy link
Member

kizu commented Sep 13, 2014

Yep, saw it live, thought about this issue too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants