Quantcast
Channel: XWiki Forum - Latest topics
Viewing all articles
Browse latest Browse all 1369

Minify CSS removes spaces from SVG background-image

$
0
0

Good evening XWiki people,
I have noticed a problem with CSS minification and the use of SVG background images.
If the minification is turned on, the spaces are removed from the SVG data. When turned off the problem disappears.

Without minification

background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 16 16'%3E%3Cpath d='M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z' fill='%2344aa11' /%3E%3C/svg%3E");

With minification

background-image: url("data:image/svg+xml,%3Csvgxmlns='http://www.w3.org/2000/svg'viewBox='441616'%3E%3Cpathd='M193H5c-1.110-2.9-22v14c01.1.89222h14c1.1102-.92-2V5c0-1.1-.89-2-2-2zm-914l-5-51.41-1.41L1014.17l7.59-7.59L198l-99z'fill='%2344aa11'/%3E%3C/svg%3E");

My current XWiki version is 16.4.0 ( :+1:)

Many thanks

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1369

Trending Articles