Linking or importing LESS file on another host doesn't work.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
I'm using LESS client-side. LESS doesn't seem to process a file if it's on another host, if it's linked either via in HTML file or @import in LESS file. I'm trying to do the following.
I have several websites on different hosts, e.g., http://qwe.com and http://asd.com. All of them should have similar design coming from a common LESS stylesheet, but with several site specific parameters (colors, logo, etc.). This common stylesheet is stored as http://qwe.com/common.less. Each site has it's own stylesheet "style.less" that contains something like this:
"
@color1: #73B5DD;
...
@colorN: #080808;
@import (less) url("http://qwe.com/common.less");
.some_local_rule { margin: 0; }
...
...
"
It seems to work only if "common.less" is on the same host. Otherwise, no error is reported, but also there is no style.
The same happens, if I link a LESS file on another host directly from HTML using .
To be more precise, I'm currently doing it locally using several ports, e.g. http://localhost:1001/ and http://localhost:8000/ instead of http://qwe.com and http://asd.com. But I assume the problem is the same.
Is there any solution?
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
Reproduce the client-side case using a linked or @imported stylesheet across the localhost:1001 and localhost:8000 hosts described in the issue. Investigate how cross-host LESS resources are handled; done means the reported behavior has a documented solution or a verified fix, with no silent failure.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100