javascript - Changing the base color of a theme - Ext JS 6 - Stack Overflow

Is it possible to change the base code of a theme in Ext JS without creating a new custom theme? If the

Is it possible to change the base code of a theme in Ext JS without creating a new custom theme?

If there is, can someone please provide a method for doing this?

Thanks

Is it possible to change the base code of a theme in Ext JS without creating a new custom theme?

If there is, can someone please provide a method for doing this?

Thanks

Share Improve this question asked Jul 12, 2016 at 14:35 LuliLuli 411 silver badge5 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

If your application is built by Sencha Cmd, easy as cake.

From your app directory with the javascript source code of Application.js, navigate to ..\sass\src.

Now create a file Application.scss which contains:

$base-color: dynamic(#fc0)

Call sencha app build production and you will find that your application now uses the worst yellow I could find, instead of the original blue.

(I have tested against an application with Triton theme, there are some issues with gray and classic theme because they rely on background images which are not affected by a changed base color.)

Alexander's answer is the correct one for lasting changes. If you need ad-hoc style changes, look at the Ext.util.CSS class and its method updateRule, which allows you to change individual styles for css classes. This requires some fiddling however, because the base color is used in many different places and also in lighter/darker variations.

swapStyleSheet lets you change the entire theme or variations of theme overrides.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745514274a4630912.html

相关推荐

  • javascript - Changing the base color of a theme - Ext JS 6 - Stack Overflow

    Is it possible to change the base code of a theme in Ext JS without creating a new custom theme? If the

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信