Semantic.gs を使用して流動的なレイアウトを実装し、LESS を使用していくつかのネストされた列を実装しました。しかし今、クライアントはレイアウトを修正することを決定しました。
grid.less の @total-width:100% という行をコメント アウトするだけでよいと思っていましたが、他の LESS ファイルで .row() mixin のある行でエラーが発生するようになりました。
これに対する回避策はありますか?
ここに grid.less の関連部分があります
/////////////////
// Semantic.gs // for LESS: http://lesscss.org/
/////////////////
// Defaults which you can freely override
@column-width: 20;
@gutter-width: 10;
@columns: 47;
// Utility variable - you should never need to modify this
@gridsystem-width: (@column-width*@columns) + (@gutter-width*@columns) * 1px;
// Set @total-width to 100% for a fluid layout
//@total-width: @gridsystem-width;
//@total-width: 100%;
// Uncomment these two lines and the star-hack width/margin lines below to enable sub-pixel fix for IE6 & 7. See http://tylertate.com/blog/2012/01/05/subpixel-rounding.html
@min-width: 980;
@correction: 1 / @min-width * 100 * 1.5%;
LESS ファイルの問題のあるセクションは次のとおりです。LESS コンパイラは、エラー 'Compiler Errors variable @total-width is undefined (Line: 292)' を返します。これは、.row() 属性を持つ行です。
#v_main_wrapper{
position:relative;
float:none;
.row(47);
&:after{
content: "";
display: table;
clear: both;
}
}