Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

MultiBrowser Live Preview: Fix cases where url()s in CSS weren't resolved correctly - #12705

Merged
zaggino merged 3 commits into
masterfrom
marcel/ld-css-relative-url
Aug 25, 2016
Merged

zaggino merged 3 commits into
masterfrom
marcel/ld-css-relative-url

Conversation

@marcelgerber

Copy link
Copy Markdown
Contributor

Fixes #11076 and #11936.

In cases where the referenced CSS files aren't in the same folder the HTML file is in, we had the problem that after altering the CSS, the url()s referenced in there (think background-image, @import, which the two issues above are about) were relative to the HTML instead of relative to the CSS.
My attempt at fixing this issue is to make any relative url() absolute (where the absolute path is the CSS file), that is, for example, converting a background: url(chevron.png); to a background: url(http://127.0.0.1:port/sub/chevron.png)

cc @busykai

Marcel Gerber added 3 commits August 23, 2016 01:41
Replace all occurrences of url() where the URL is relative to the CSS file with
an absolute URL so it is relative to the CSS file, not the HTML file
@zaggino

zaggino commented Aug 25, 2016

Copy link
Copy Markdown
Contributor

This is really nice and clean PR, LGTM

@zaggino
zaggino merged commit 452911a into master Aug 25, 2016
@zaggino
zaggino deleted the marcel/ld-css-relative-url branch August 25, 2016 22:20
@marcelgerber

Copy link
Copy Markdown
Contributor Author

Thanks @zaggino!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MultiBrowser Live Preview unloads @import-ed stylesheets upon editing

3 participants