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

Comments

Projects
None yet
3 participants
@mckn

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

This comment has been minimized.

Show comment
Hide comment
@webmaxru

webmaxru Sep 29, 2014

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

webmaxru commented Sep 29, 2014

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

@rytmis

This comment has been minimized.

Show comment
Hide comment
@rytmis

rytmis Feb 26, 2015

Contributor

Dupe of #312, I think

Contributor

rytmis commented Feb 26, 2015

Dupe of #312, I think

@rytmis rytmis closed this Feb 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment