I'd like to use some of the mixins from Bootstrap.less http://markdotto.com/bootstrap/

But I'm receiving a parse error on the .button and .gradient mixin:

LESS ERROR: parse error: failed at `.button(@color: #f5f5f5, @text_color: #333, @text_shadow: 0 1px 1px rgba(255,255,255,.75), @font_size: 13px, @padding: 9px 15px 10px, @rounded: 6px) {` line: 177, sites/vtm.be/themes/vtmcleanup/css/layout-fixed.css.less

LESS ERROR: parse error: failed at `filter: e(%("progid:DXImageTransform.Microsoft.Gradient(StartColorStr='%d', EndColorStr='%d', GradientType=1)",@startColor,@endColor));` line: 215, sites/vtm.be/themes/vtmcleanup/css/layout-fixed.css.less

Comments

corey.aufang’s picture

Try the dev version and see if that fixes the problem for you.

corey.aufang’s picture

Oh also, I think when you used mix-ins you're supposed to separate the arguments with semi-colons not commas.

So the first one would be like:

.button(@color: #f5f5f5; @text_color: #333; @text_shadow: 0 1px 1px rgba(255,255,255,.75); @font_size: 13px; @padding: 9px 15px 10px; @rounded: 6px) {
corey.aufang’s picture

Status: Active » Closed (won't fix)

Closing since I haven't gotten further feedback.

bryan kennedy’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Status: Closed (won't fix) » Needs review

I just tried this with the latest dev here and ran into exactly the same error.

I am using the latest bootstrap less files and the 7.x-2.x-dev LESS CSS Preprocessor module. I have no special variables set, just the default setup for both the Drupal Module and Bootstrap less files.

bforchhammer’s picture

Status: Needs review » Closed (duplicate)

The less compiler bundled with the module requires commas instead of semicolons, and afaik does not support the e escape function. For a possible solution see #1302132-2: @import "mixins.less" and using mixins doesn't work.