Variaible precidence different than less.js

146 views
Skip to first unread message

Dave

unread,
Apr 11, 2013, 6:07:50 PM4/11/13
to dot...@googlegroups.com
Here is a simplified example of something that works in less.js (using the "try it" option on less2css.org":
 
@test: sample1;
element { name: @test }
@test: sample2;
 
On the less2css.org website, this will translate to the following:
 
element { name: sample2; }
 
Unfortunately, using dotless it actually translates to "sample1" instead. 
 
Does anyone know how to get dotless to do this the same way as less.js?
 
 
[[[ If you are wondering why, it is because I want to use twitter.bootstrap and override some of the variables in variables.less with my own variables.less file.  I know that I can modify the values directly in the twitter.bootstrap variables.less file, but with less.js you shouldn't need to do that.  As the above example demonstrates, you should be able to override the variable values by assigning the values after including the bootstrap.less file.]]]

kovarik...@gmail.com

unread,
Apr 24, 2013, 11:53:37 AM4/24/13
to dot...@googlegroups.com, david.k...@gmail.com
+1 - I have this problem too, why it behaves differently than less.js?

Luke Page

unread,
Apr 26, 2013, 4:09:38 AM4/26/13
to dot...@googlegroups.com, david.k...@gmail.com
yes, there is an option to switch more to the less.js way of doing things.


On 24 April 2013 16:53, <kovarik...@gmail.com> wrote:
+1 - I have this problem too, why it behaves differently than less.js?

--
You received this message because you are subscribed to the Google Groups "DotLess (Less Css for .NET)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotless+u...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
Visit this group at http://groups.google.com/group/dotless?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

kovarik...@gmail.com

unread,
Apr 26, 2013, 4:41:15 AM4/26/13
to dot...@googlegroups.com, david.k...@gmail.com
Thanks Luke, where to find that option?

david.k...@gmail.com

unread,
Apr 26, 2013, 8:44:34 AM4/26/13
to dot...@googlegroups.com, david.k...@gmail.com
A colleague of mine found a setting in dotLess which, when turned to TRUE, will solve this and have dotLess mimic the behavior of less.js for this purpose.  The variable is called:  DisableVariableRedefines   and it is set to false by default.  I've confirmed that changing this value will work for the example shown above.

ryan.r...@gmail.com

unread,
May 31, 2013, 11:03:07 AM5/31/13
to dot...@googlegroups.com, david.k...@gmail.com
I am having the same problem demonstrated here, what is the solution for dotLess?

david.k...@gmail.com

unread,
May 31, 2013, 2:20:26 PM5/31/13
to dot...@googlegroups.com, david.k...@gmail.com

Ryan Cummins

unread,
May 31, 2013, 2:48:02 PM5/31/13
to dot...@googlegroups.com, david.k...@gmail.com
I have tried setting that in my Web.config, but it does not appear to fix anything. Is there something else that needs to be updated or somewhere else where I should put this?

In my case, i am trying to overload variables declared in an import of an import.

radek....@gmail.com

unread,
Jun 23, 2014, 8:18:42 AM6/23/14
to dot...@googlegroups.com, david.k...@gmail.com
<dotless minifyCss="false" cache="true" web="false" disableVariableRedefines="true" />

i confirm that this works. but i dont see reason for this strange name. variableRedefines="true" or disableVariableRedefines="false"  make more sence.

Dne pátek, 31. května 2013 20:48:02 UTC+2 Ryan Cummins napsal(a):
Reply all
Reply to author
Forward
0 new messages