handle relative URLs in live mode
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
The less live compiler appears to not resolve relative URLs correctly.
When using a file eg "/static/foo/bar/main.less" any url() statements encountered should be resolved relative to that as a base URL. Currently they are passed through unchanged and, because the compiled CSS is included in-line all the URLs are resolved relative to the base of the web page.
url("../../fonts/foo.woff") should become url("/static/fonts/foo.woff")
url("./foo.img") should become url("/static/foo/bar/foo.img")
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by tracing the Less live compiler's handling of url() values and reproduce the examples in the issue; done means relative URLs resolve against /static/foo/bar/main.less's directory instead of the web page base.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100