You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get a list of all possible CSS properties that could be applied to SVG
Inject them to existing dictionary
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
Get a list of all possible CSS properties that could be applied to SVG
Divide CSS and SVG properties between scopes (they would intersect)
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.
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.
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: