SVG styles are being ignored
See original GitHub issueHello,
Firstly thank you for the awesome library.
My issue is with the svg styles being skipped/not appearing in the final output CSS.
I use a grunt plugin grunt-contrib-cssmin
Environment
- grunt-contrib-cssmin version - 2.2.1
- clean-css version - 4.1.11
- node.js version - 6.11.3
- operating system: Windows 8
Input CSS
.node:hover circle {
r: 18;
stroke: orange;
}
Actual output CSS
.node:hover circle {
stroke: orange;
}
Expected output CSS
.node:hover circle {
r: 18;
stroke: orange;
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:5
Top Results From Across the Web
SVG styles are being ignored · Issue #1021 · clean-css/clean-css ...
My issue is with the svg styles being skipped/not appearing in the final output CSS. I use a grunt plugin grunt-contrib-cssmin Environment ...
Read more >"Background" style property ignored for <svg> elements inside ...
The issue is that, when an <svg> is embedded in HTML, it kind of does double-duty as both an SVG element and an...
Read more >T68672 SVG style element ignored if no type attribute is ...
The <style> element is ignored if you omit the default value type="text/css". This bug seems new as upstream on ...
Read more >SVG styles being ignored - The Mail Archive
Hi all, I have a document which imports an SVG as a full page graphic. It used to display fine, but recently I...
Read more >Styles in SVG seem to be ignored when converting SVG to PDF
I'm using spire.pdf 5.1.0 library. I'm trying to add SVG to a PDF as a new layer. First, I'm converting SVG to PDF....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there any chance of this being fixed? What it looks like is this regex (https://github.com/jakubpawlowicz/clean-css/blob/master/lib/optimizer/level-1/optimize.js#L35) is look for >= 3 char in the property name.
I’ve found this error in an Angular project. AngularCLI implements clean-css on production builds. I’ve tested with units (like
r: 20px
) but it doesn’t work fine.