我使用Semantic.gs和一些具有LESS的嵌套列实现了一个流畅的布局。但是现在我们的客户决定他们想要修复布局。
我以为我可以简单地注释掉grid.less中的@total-width:100%行,但是现在其他更少的文件在使用.row()混合输入的行上给出了错误。
有解决这个问题的办法吗?
以下是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文件中有问题的部分。编译器给出的错误越少:“编译器错误变量@total-width is undefined (行:292)”,这是具有.row()属性的行:
#v_main_wrapper{
position:relative;
float:none;
.row(47);
&:after{
content: "";
display: table;
clear: both;
}
}发布于 2013-03-08 03:09:32
我想你会想要这个:
@total-width: @gridsystem-width; //leave this uncommented, to calculate width
//@total-width: 100%;https://stackoverflow.com/questions/15276475
复制相似问题