gulp-clean-css
gulp-clean-css copied to clipboard
Relative paths to a picture in selects: after and: before
When I use @import local files in my shared file, the relative paths are broken in the code taken from the included file — the points are deleted. This happens only for selectors: after Here is an example of what is happening: style.css @import url ('main.css');
The main.css code is initially: .element: after { background: url ("../ img / icons / pic.svg"); }
And the output in the style.css file is this: .element: after { background: url (img / icons / pic.svg); } That is, relative paths have been destroyed, and the image request returns 404 error! With what it can be connected?
@KimonoVIP I pushed some changes regarding long standing issues in #52 that sound similar to your issue. Can you please update your plugin to at least version 4.1.1 and let me know if the problem persists? Thanks!
@scniro Updated to version 4.2.0 - it did not help. Anyway, the path to the background image after the assembly is distorted and does not work. So far I have been using this method (
.option::before { /* clean-css ignore:start / background: url("../img/check.svg") center no-repeat; / clean-css ignore:end */ }
look at https://github.com/jakubpawlowicz/clean-css/issues/1100