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

Add flag to treat @import URLs as opaque #823

Closed
wants to merge 1 commit into from
Closed

Conversation

@jamesrdf
Copy link

jamesrdf commented Jun 4, 2012

Not every @import URL will end in .css or .less, some may include a query string to generate the CSS or LESS dynamically. This patch adds an "opaque" boolean flag to the less.Parser parameter and if true will cause all import URLs to be the same: never append ".less" and always inline the style rules.

Some example @import would be:
@import url("style.cgi?lang=en");
@import url("style.cgi?format=lesscss");

@lukeapage

This comment has been minimized.

Copy link
Member

lukeapage commented Aug 5, 2012

I'm not sure if opaque is a good option name..
also this is only an issue for less.js in the browser right?
also you could add &dummy=.less on to the end to get around this issue?

@jamesrdf

This comment has been minimized.

Copy link
Author

jamesrdf commented Aug 5, 2012

I am using less.js on server side and want to combine all less and css files into one.

The &dummy=.less is a workaround, but requires editing all @import rules, which is not desirable in my situation.

@matthew-dean

This comment has been minimized.

Copy link
Member

matthew-dean commented Dec 13, 2012

There may be a more elegant solution. See the thread at the bottom of issue #315.

@lukeapage lukeapage closed this Dec 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.