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

Problem with @import statement #352

Closed
mckn opened this issue Jan 14, 2014 · 2 comments
Closed

Problem with @import statement #352

mckn opened this issue Jan 14, 2014 · 2 comments

Comments

@mckn
Copy link

mckn commented Jan 14, 2014

I upgraded to dotless version 1.4.0 and got the following issue:

My file structure looks like this:

\styles\variables.less (130 lines of code, only variable declerations)
\styles\grid.less (30 lines of code, a simple grid made with mixins)
\styles\modules\module.less (ordinary less style file)

Module.less imports first the grid.less and second the variables.less. When I try to TransformToCss it gives me an empty string and a debug-text saying:

variable @bg-color is undefined on line 19 in file '~/styles/modules/module.less':
[18]: padding: 20px;
[19]: background: @bg-color;
-------------^

variable @bg-color is undefined on line 19 in file '~/styles/modules/module.less':
[18]: padding: 20px;
[19]: background: @bg-color;
-------------^

variable @bg-color is undefined on line 19 in file '~/styles/modules/module.less':
[18]: padding: 20px;
[19]: background: @bg-color;
-------------^

I have a asp.net application and using the built-in bundling with the following adapter:

https://github.com/scott-xu/System.Web.Optimization.Less

If I downgrade to dotless 1.3.1 everything works just fine..so it seems to be a problem with the dotless parser.

Hope you can help me with this issue, Thanks!

@webmaxru
Copy link

Hi! Just use disableVariableRedefines="true" (a bit illogical value, yes) parameter in dotless section of web.config

@rytmis
Copy link
Contributor

rytmis commented Feb 26, 2015

Dupe of #312, I think

@rytmis rytmis closed this as completed Feb 26, 2015
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

3 participants