-
Notifications
You must be signed in to change notification settings - Fork 43
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
Labels
Comments
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. |
I think the second one is better. |
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
There are two ways of doing this:
First
<style>
elements in SVGIn this case all properties would be available in both scopes which could possibly make it harder to choose proper abbreviation (
f
forfont
or forfill
?) 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
<style>
elements in SVGIn this case SVG-only properties would be available only inside SVG. Which could, for example, help to avoid misusing
border
instead ofstroke
, 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
The text was updated successfully, but these errors were encountered: