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

Problem with "background-image: url('data:image/svg+xml;" in 3.4.17 #787

Closed
sea-kg opened this issue Jun 14, 2016 · 2 comments
Closed

Problem with "background-image: url('data:image/svg+xml;" in 3.4.17 #787

sea-kg opened this issue Jun 14, 2016 · 2 comments
Labels

Comments

@sea-kg
Copy link

sea-kg commented Jun 14, 2016

In CleanCSS 3.4.9 was fine

Original css:

.icon{
   margin-left: -25px;
   background-image: url("data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%0A%3C!--%20Generator%3A%20Adobe%20Illustrator%2017.0.0%2C%20SVG%20Export%20Plug-In%20.%20SVG%20Version%3A%206.00%20Build%200)%20%20--%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20width%3D%2214px%22%20height%3D%2225px%22%20viewBox%3D%220%200%2014%2025%22%20style%3D%22enable-background%3Anew%200%200%2014%2025%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpolygon%20style%3D%22fill%3A%23FFFFFF%3B%22%20points%3D%2212.329%2C25.243%200.086%2C13%2012.793%2C0.293%2014.207%2C1.707%202.914%2C13%2013.743%2C23.829%20%22%2F%3E%0A%3C%2Fsvg%3E");
}

I used minify function in some build.js:

var cleancss = new CleanCSS().minify([inFile1, inFile2]);

Got minifier wrong backgroud image:

.icon{
   margin-left: -25px; 
   url('data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%0A%3C!--%20Generator%3A%20Adobe%20Illustrator%2017.0.0%2C%20SVG%20Export%20Plug-In%20.%20SVG%20Version%3A%206.00%20Build%200);')
}
@jakubpawlowicz
Copy link
Collaborator

It's a regression indeed. Please stick to 3.4.9 while it's being fixed.

jakubpawlowicz added a commit that referenced this issue Jun 15, 2016
Yet another regression so we revert to the original order of
processing `url()` values.
@jakubpawlowicz
Copy link
Collaborator

Fixed in 3.4.18!

silverwind pushed a commit to silverwind/clean-css that referenced this issue Sep 25, 2016
Yet another regression so we revert to the original order of
processing `url()` values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants