English 中文(简体)
仅覆盖Mixin中的基本参数
原标题:Overwrite only the essential parameters in Mixin

简单的问题。我刚开始少看CSS构建,我偶然发现了这个困境:

.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; 
}

我只是想重写混入中的一个参数,但这似乎不是正确的语法。

问题回答

这种格式是正确的,并且受到支持,但仅在less.js的主分支(将包含在1.3.0之后的版本中)和无点(从更早的版本开始,无点是一个c#端口)中。

所以,等等,使用less.js的main分支或使用dotless。。





相关问题
PHP exec() not executing batch files

I tried googling for this issue and found many people with the same problem but no solution. $result = exec("C:\Ruby191\bin\lessc.bat less\$file", $output); Here result is an empty string ...

Ruby LESS gem equivalent in Python

The Ruby LESS gem looks awesome - and I am working on a Python/Pylons web project where it would be highly useful. CSS is, as someone we re all familiar with recently wrote about, clunky in some ...

Visual studio - precompile - dotless

I wonder if there is a way to precompile *.less files(http://www.dotlesscss.org/) with visual studio. The site gives me a dotless.compiler.exe but I am not sure how to hook this up to visual studio. ...

热门标签