Bootstrap mixin compilation with LESS

by Steven17. September 2012 12:09

I've been working on the Bootstrap mixins today and ran into an issue with arguments - i'm not sure is this is specific to the compiler I am using or a more general problem but i understand it is being removed in the next version (2.2) anyway. The fix can be found here - and repeated below for brevity (you escape any calls to .box-shadow but wrapping the function call in quotes).

.box-shadow(@shadow) {-webkit-box-shadow: @shadow;-moz-box-shadow: @shadow;box-shadow: @shadow;
}
.element {.box-shadow(~"0 1px 3px #eee, 0 5px 10px #f5f5f5");
}

You can then download a compiler from http://www.dotlesscss.org and run bootstrap through it as follows:

dotless.Compiler bootstrap.less bootstrap.css

Tags:

Tech

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

 
Steven Livingstone-Perez is VP Engineering at KILTR, creator of Valebrity and other things. He is married & has two children.
 
He mains the VentureIQ blog focusing on tools for startups.

Books I've Written

What I Do

undefined

Founder

 

undefined

VP Engineering