Skip to content

Linking or importing LESS file on another host doesn't work. #1377

Open
@pavelborodin

Description

@pavelborodin

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions