There are 5 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-1928fa7f-11df-4539-a9fe-e4b4d624b617 XWIKI-22206 Open

Minify CSS removes spaces from SVG background-image

 
View issue   ยท   Add comment
 

5 comments

 
cid:jira-generated-image-avatar-b92fd861-2eb7-4f56-8d26-bcb4b018faad Charpentier Lucas on 22/May/25 16:32
 

AFAIU, using spaces in a URL is incorrect and is why it's unexpected for the YUI compressor.
We probably need to escape the spaces in here.

 
cid:jira-generated-image-avatar-b92fd861-2eb7-4f56-8d26-bcb4b018faad Charpentier Lucas on 22/May/25 16:34
 
AFAIU, using spaces in a URL is incorrect and is why it's unexpected for the YUI compressor.
We probably need to escape When escaping all the spaces in here with a `%20`, things work properly even with minification .
 
cid:jira-generated-image-avatar-b92fd861-2eb7-4f56-8d26-bcb4b018faad Charpentier Lucas on 22/May/25 16:35
 
AFAIU, using spaces in a URL is incorrect and is why it that 's unexpected for why the YUI compressor acts weirdly .
When escaping all the spaces with a `%20`, things work properly even with minification.
 
cid:jira-generated-image-avatar-b92fd861-2eb7-4f56-8d26-bcb4b018faad Charpentier Lucas on 22/May/25 16:36
 
AFAIU, using spaces in a URL is incorrect and that's why the YUI compressor acts weirdly.
When escaping all the spaces with a `%20`, things work properly even with minification.


{quote}background-image: url("data:image/svg+xml,%3C%3Fxml%20version='1.0'%20encoding='utf-8'%3F%3E%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201000%201000'%3E%3Cpath%20d='M585.6,123.3c0-75.5-29.1-113.3-87-113.3c-57.8,0-86.9,37.8-86.9,113.3c0,14.1,1.8,29,5.3,44.8L459,368.4c3.4,17.6,5.3,30.6,5.3,39.4c0,10.5-4.4,15.9-13.2,15.9c-5.3,0-18.4-9.9-39.5-29.4l-152.7-144c-31.6-30.2-66.7-45.3-105.4-45.3c-58,0-86.9,25.6-86.9,76.7c0,49.4,34.5,87.3,103.5,113.9l196.5,74c30.1,10.6,45.1,21.2,45.1,31.7c0,7-15,16.8-45.1,29.2l-196.5,74c-69,26.6-103.5,65.4-103.5,116.6c0,51,28.1,76.7,84.3,76.7c38.6,0,74.6-15.9,108-47.6L411.7,608c21.1-19.3,34.2-29,39.5-29c8.8,0,13.2,5.2,13.2,15.7c0,8.8-1.9,22.1-5.3,39.6L417,834.6c-3.5,15.7-5.3,30.6-5.3,44.6c0,74,29,110.9,86.9,110.9c58,0,87-36.9,87-110.9c0-12.2-1.9-27-5.4-44.6l-39.4-200.2l-5.4-31.7v-10.4c0-8.8,4.4-13.1,13.3-13.1c5.2,0,18.4,9.7,39.4,29l152.9,142.2c33.3,31.7,68.4,47.6,105.3,47.6c58,0,87-26.3,87-79.1c0-49.1-34.6-87-103.5-113.2l-199.1-73.9c-30-12.3-45-22-45-29c0-8.8,15-19.3,45-31.6l199.1-73.8c68.9-26.3,103.5-65,103.5-115.9c0-50.9-29.1-76.4-87-76.4c-36.9,0-72,15.8-105.3,47.4L588.2,394.7c-21,19.4-34.2,29.1-39.4,29.1c-8.9,0-13.3-4.4-13.3-13.3l44.8-242.4C583.8,150.5,585.6,135.6,585.6,123.3L585.6,123.3z'%20fill='%23333'/%3E%3C/svg%3E");{quote}


Here is a topic that helped me in finding this out: https://stackoverflow.com/questions/13949588/yui-compressor-is-removing-spaces-from-filter-values
 
cid:jira-generated-image-avatar-b92fd861-2eb7-4f56-8d26-bcb4b018faad Charpentier Lucas on 22/May/25 16:37
 
AFAIU, using spaces in a URL is incorrect and that's why the YUI compressor acts weirdly.
When escaping all the spaces with a `%20`, things work properly even with minification.

{quote}background-image: url("data:image/svg+xml,%3C%3Fxml%20version='1.0'%20encoding='utf-8'%3F%3E%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201000%201000'%3E%3Cpath%20d='M585.6,123.3c0-75.5-29.1-113.3-87-113.3c-57.8,0-86.9,37.8-86.9,113.3c0,14.1,1.8,29,5.3,44.8L459,368.4c3.4,17.6,5.3,30.6,5.3,39.4c0,10.5-4.4,15.9-13.2,15.9c-5.3,0-18.4-9.9-39.5-29.4l-152.7-144c-31.6-30.2-66.7-45.3-105.4-45.3c-58,0-86.9,25.6-86.9,76.7c0,49.4,34.5,87.3,103.5,113.9l196.5,74c30.1,10.6,45.1,21.2,45.1,31.7c0,7-15,16.8-45.1,29.2l-196.5,74c-69,26.6-103.5,65.4-103.5,116.6c0,51,28.1,76.7,84.3,76.7c38.6,0,74.6-15.9,108-47.6L411.7,608c21.1-19.3,34.2-29,39.5-29c8.8,0,13.2,5.2,13.2,15.7c0,8.8-1.9,22.1-5.3,39.6L417,834.6c-3.5,15.7-5.3,30.6-5.3,44.6c0,74,29,110.9,86.9,110.9c58,0,87-36.9,87-110.9c0-12.2-1.9-27-5.4-44.6l-39.4-200.2l-5.4-31.7v-10.4c0-8.8,4.4-13.1,13.3-13.1c5.2,0,18.4,9.7,39.4,29l152.9,142.2c33.3,31.7,68.4,47.6,105.3,47.6c58,0,87-26.3,87-79.1c0-49.1-34.6-87-103.5-113.2l-199.1-73.9c-30-12.3-45-22-45-29c0-8.8,15-19.3,45-31.6l199.1-73.8c68.9-26.3,103.5-65,103.5-115.9c0-50.9-29.1-76.4-87-76.4c-36.9,0-72,15.8-105.3,47.4L588.2,394.7c-21,19.4-34.2,29.1-39.4,29.1c-8.9,0-13.3-4.4-13.3-13.3l44.8-242.4C583.8,150.5,585.6,135.6,585.6,123.3L585.6,123.3z'%20fill='%23333'/%3E%3C/svg%3E");{quote}


Here is a topic that helped me in finding this out: https://stackoverflow.com/questions/13949588/yui-compressor-is-removing-spaces-from-filter-values



YUI CSS compressor steps: https://yui.github.io/yuicompressor/css.html