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 support for var() CSS function #235

Open
weltkante opened this issue Jun 25, 2024 · 1 comment
Open

Add support for var() CSS function #235

weltkante opened this issue Jun 25, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@weltkante
Copy link

I don't know exactly what it does but I have some svg files with things like var(--color-text, #000) that fail to load. I can work around it by doing a regex-replacement throughout the svg, so its not blocking me, just reporting it in case you think this should be supported. If its out of scope feel free to close.

Example (which is just a black bar):

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">
  <path d="M60 500h880" style="fill:none;stroke:var(--color-text, #000);stroke-linecap:square;stroke-miterlimit:2;stroke-width:68px" />
</svg>
@wieslawsoltes
Copy link
Owner

The CSS var is not supported https://developer.mozilla.org/en-US/docs/Web/CSS/var

@wieslawsoltes wieslawsoltes added enhancement New feature or request help wanted Extra attention is needed labels Jun 25, 2024
@wieslawsoltes wieslawsoltes changed the title unsupported svg style Add support for var() CSS function Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants