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

@imported stylesheets reloaded relative to html document not relative to parent stylesheet, resulting in 404 #248

Open
liskin opened this issue Jun 4, 2021 · 0 comments

Comments

@liskin
Copy link

liskin commented Jun 4, 2021

$ cat index.html 
<!DOCTYPE html>
<html><head><link rel="stylesheet" href="css/style.css" type="text/css"></head><body></body></html>

$ cat css/style.css 
@import url("import.css")

$ cat css/import.css 
/* imported */

$ python3 -c 'from livereload import Server, shell; server = Server(); server.watch("."); server.serve();'
[I 210604 10:20:55 server:335] Serving on http://127.0.0.1:5500

When I now do touch css/import.css, livereload attempts to reload /import.css?livereload=1622798509993 instead of /css/import.css?livereload=1622798509993.

liskin added a commit to liskin/xmonad-web that referenced this issue Jun 4, 2021
Gets rid of the annoying

    [2021-06-04 10:27:26] ERROR `/font-raleway.css' not found.

because livereload incorrectly handles relative @import in CSS.

Related: lepture/python-livereload#248
slotThe pushed a commit to slotThe/xmonad-web that referenced this issue Dec 11, 2021
Gets rid of the annoying

    [2021-06-04 10:27:26] ERROR `/font-raleway.css' not found.

because livereload incorrectly handles relative @import in CSS.

Related: lepture/python-livereload#248
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant