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

Relatives paths getting Broken (../ being stripped from paths) #1100

Closed
taibhse-designs opened this issue Dec 2, 2019 · 3 comments
Closed
Labels

Comments

@taibhse-designs
Copy link

No matter what I try, the ../ gets stripped from the image path resulting in a broken link and no image being displayed.

Configuration options

Clean CSS is part of the minify plugin / extension for Brackets, configs appear to be all defaults I think.

Input CSS

.hire-me {
    background: url("../images/hire.jpg");
}

Actual output CSS

.hire-me {background: url(images/hire.jpg);}

Expected output CSS

.hire-me {background: url(../images/hire.jpg);}
@TobbeLino
Copy link

Check out https://stackoverflow.com/questions/43786547/how-to-keep-my-relative-paths-with-clean-css-minifying
We also stumbled upon this problem, and setting "rebase" = false got the desired output.

The "rebase"-feature seems to be enabled by default, but I suspect it may be broken when running on Windows. We have a node application that has been running on Windows for some time, generating relative URLs without changing them (generating your "Expected output CSS"). But when we switched to running the same application through Docker, it started removing "../" from all relative URLs. Maybe that's what "rebase" is supposed to do, but the feature did NOT seem to work (or at least did not work in the same way) when running directly in Windows...
Feels like there may be a Windows/Linux path-separator issue causing this.

@jakubpawlowicz
Copy link
Collaborator

See my last comment to #1067

@jakubpawlowicz
Copy link
Collaborator

Rebasing is now disabled by default, see 3de8b05 and more comments in #1067.

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

3 participants