2011-12-09 3 views
0

저는 Sankar입니다. SASS를 사용하여 특정 Extjs 버튼에 색상을 지정하려고했습니다. 그러나 Iam이 해결책을 찾을 수 없습니다. 제발 도와주세요. 다음 코드를 제공했습니다.Extjs 4 버튼 색상이 SASS 문제를 사용합니까?

$base-color: #5291C5; 

@import 'compass'; 
@import 'ext4/default/all'; 

@include extjs-button-ui(
    'smallbtn', 
    $border-radius: 10px, 
    $border-color: #A52A2A, 
    $background-color: #A52A2A, 
    $color: #A52A2A 

    enter code here 
); 

추가 정보

당신의 @include의 @import 주어진 reply.I '에서 ext4/기본/모든'에 대한

감사합니다; 그런 다음 몇 가지 구문 오류가 표시됩니다.이 솔루션을 얻을 수 없습니다. 내가 "tbar"같은 것을 만들 때 요구 사항이 { 텍스트 : 'Retrieve', ID : btnConsolidatedRetrieve ', UI :' '녹색 }는 내가 주어진 .scss 파일은 이걸이없는 나는 나에게 간단한 예제를 제공 changing.Please

$include-default: false; 


$base-color: #5291C5; 

@import 'compass'; 
@import 'ext4/default/all'; 

@include extjs-boundlist; 
@include extjs-button; 
@include extjs-btn-group; 
@include extjs-datepicker; 
@include extjs-colorpicker; 
@include extjs-menu; 
@include extjs-grid; 
@include extjs-form; 
@include extjs-form-field; 
@include extjs-form-fieldset; 
@include extjs-form-file; 
@include extjs-form-checkboxfield; 
@include extjs-form-checkboxgroup; 
@include extjs-form-triggerfield; 
@include extjs-form-htmleditor; 
@include extjs-panel; 
@include extjs-qtip; 
@include extjs-slider; 
@include extjs-progress; 
@include extjs-toolbar; 
@include extjs-window; 
@include extjs-messagebox; 
@include extjs-tabbar; 
@include extjs-tab; 
@include extjs-tree; 
@include extjs-drawcomponent; 
@include extjs-viewport; 


@include extjs-button-ui(
'green', 

$border-color: #CC00FF 
); 

$relative-image-path-for-uis: true; 

은 "tbar"이 제공 한 후 없습니다입니다 도구 모음 버튼을 찾으려면이 버튼을 클릭하십시오.

답변

0

@import 'ext4/default/all'; 행이 맨 아래에 있는지 확인하지 않으면이 코드가 작동하지 않습니다. _all.scss의 mixins가 컴파일되기 전에 해당 값에 액세스해야하기 때문에 _all.scss에서 가져온 변수에 영향을주지 않습니다. 가져 오기 후 모든 코드를 위젯 등을 처리하는 데 필요하지 않은 경우 사용자가 직접 코드를 선언 할 수 있습니다.

또한 compass compile을 입력 할 때 터미널에서 오류 메시지가 나타나는지 확인하십시오. 나쁜 이미지 URL.

다음 두 개의 기사가 도움이됩니다. 내가 ExtJS에 대한 SASS UI를 만드는 방법을 배운 그들은 나에게 매우 중요했다 :

http://existdissolve.com/2011/09/extjs-4-theming-getting-this-thing-to-go/

http://existdissolve.com/2011/09/extjs-4-theming-custom-uis/

+0

안녕 스미스, 당신의 reply.I에 대한 덕분에 내 code.Please이에 대해 살펴 편집 대답 해줘. – Sankar