简体   繁体   English

Extjs 4按钮颜色使用SASS问题?

[英]Extjs 4 button color using SASS issue?

I am Sankar.I tried to give color for a particular Extjs button using SASS.But Iam unable to findout the solution.Please help me about this.I given the following code. 我是Sankar,我尝试使用SASS为特定的Extjs按钮赋予颜色,但是Iam无法找到解决方案,请帮我解决这个问题,并给出了以下代码。

$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
);

Extra Information 额外的信息

Thanks for your reply.I given @include @import 'ext4/default/all'; 感谢您的回复。我给了@include @import'ext4 / default / all'; at the bottom.Then it is showing some syntax error.I am unable to get a solution for this.The requirement for me as I created a "tbar" some thing like this { text: 'Retrieve', id: 'btnConsolidatedRetrieve', ui:'green' } The .scss file which i given is 然后显示了语法错误。我无法解决此问题。当我创建“ tbar”这样的东西时,对我的要求是这样的{text:'Retrieve',id:'btnConsolidatedRetrieve', ui:'green'}我给的.scss文件是

$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; 

After giving this the "tbar" is not changing.Please give me a simple example for this.I am unable to find toolbar-button for this ui. 给它之后,“ tbar”就没有改变。请给我举一个简单的例子。我无法找到该用户界面的工具栏按钮。

This code won't work unless you make sure the @import 'ext4/default/all'; 除非您确保@ @import 'ext4/default/all';否则此代码将不起作用@import 'ext4/default/all'; line is at the very bottom. 线在最底部。 Anything declared after it will not take effect on the variables imported from _all.scss since the mixins in _all.scss need to have access to those values before they are compiled. 在此之后声明的任何内容都不会对从_all.scss导入的变量生效,因为_all.scss中的mixins需要在编译它们之前访问这些值。 You can certainly declare your own code after the import all line, if it's not needed for processing of the widgets etc. 如果不需要处理小部件等,您当然可以在import all行之后声明自己的代码。

Also, check for error messages in the terminal when you do compass compile , as that will usually catch syntax errors or bad image urls. 另外,在进行compass compile时,请在终端中检查错误消息,因为这通常会捕获语法错误或错误的图像URL。

The following two articles should provide more help for you. 以下两篇文章应该为您提供更多帮助。 They were invaluable to me as I learned how to make SASS UIs for ExtJS: 当我学习了如何为ExtJS制作SASS UI时,它们对我来说非常宝贵:

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM