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 opacity conflicts with attributify opacity="" #2104
Comments
I also encountered some false positives in SVGs Playground In the playground above, it extracts some margins from
presetAttributify({ignoreAttributes: ['placeholder', 'fill', 'opacity']}) But this will ignore these attributes in other places too, not just SVGs. And In my opinion, we should have some special handling for SVGs.
My suggested solution is to remove these attributes from the code using regex. |
Not sure if this comment (still) applies here: #205 (comment) |
Thanks. It's a good idea to add namespaces to avoid confusion between unocss and svg attributes. As @sibbng says, we should remove unocss parsing of svg attributes. |
SVG can use
opacity="0.7"
meansopacity: 70%
.It also will parsed by unocss as
opacity: 0.007
meansopacity: 0.7%
.The text was updated successfully, but these errors were encountered: