Mr A
Mr A

Reputation: 1385

Overwrite only the essential parameters in Mixin

Simple question. I just started looking at less for CSS building, I stumbled upon this dilemma:

.fontcase (@family:'helvetica',@size:1em,@fontweight:300,@color:#ffffff) {   
    font-family: @family Arial  sans-serif;   
    font-size:@size;   
    font-weight:@fontweight;   
    color:@color; 
}

#ex-topnav-items {
     .fontcase(@fontweight:700);

     margin:5px;   
     line-height: 1.5em;
     letter-spacing: 1px; 
}

I just want to override some of one parameter from the mixins, but it seems this is not the proper syntax.

Upvotes: 1

Views: 271

Answers (1)

Luke Page
Luke Page

Reputation: 8186

That format is correct and is supported, but only in the main branch of less.js (to be included in the release after 1.3.0) and in dotless (from a much earlier version - dotless is a c# port).

So, wait, use the main branch of less.js or use dotless..

Upvotes: 1

Related Questions