2013-03-07 2 views
0

필자는 Semantic.gs와 LESS가있는 일부 중첩 열을 사용하여 유체 레이아웃을 구현했습니다. 그러나 이제 고객은 레이아웃을 수정하기를 원했습니다.Semantic.gs에서 중첩 된 열을 고정 레이아웃으로 사용

grid.less에서 @ total-width : 100 % 행을 주석 처리 할 수 ​​있다고 생각했지만, 이제는 다른 less 파일이 .row() mixin이있는 행에 오류를 발생시킵니다.

해결 방법이 있습니까?

여기 여기 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%; 

grid.less

의 중요한 부분이다. 의 셀에만() 속성을 줄 수 있습니다 :

#v_main_wrapper{ 
    position:relative; 
    float:none; 
    .row(47); 
    &:after{ 
    content: ""; 
    display: table; 
    clear: both; 
    } 

} 
+0

일부 코드를 입력하십시오! – Bigood

+0

죄송합니다, 코드 –

답변

0

내가 당신이 원하는 것이라고 생각 : 덜 컴파일러는 '정의되지 않은 (292 선)은 컴파일러 오류 전체 폭 @ 변수를'오류를 제공합니다 이 :

@total-width: @gridsystem-width; //leave this uncommented, to calculate width 
//@total-width: 100%; 
+0

을 보여주기 위해 편집되었습니다. Thanks ScottS. 내 중첩 된 열에서는 작동하지 않았지만, 서로 쌓아 놓았습니다. 나는 전체 너비를 최소 너비와 같은 980으로 설정했다. –

+0

@MaureenDunlap : 나는 그 제안을 고려했지만, 그것이 모든 문제를 해결할 지 확신하지 못했습니다. 이론적으로, 여러분이 열 수, 열 너비 및 거터 너비를 다시 계산하기를 원하는 것처럼 보일 것입니다.'@ gridsystem-width' = 980이므로 계산합니다. 그러나, 980이 당신을 위해 일했던 것처럼 단지 하드 코딩을한다면, 그것은 훌륭합니다. – ScottS

관련 문제