ExtJS:单片机 [英] ExtJS: Theming single component

查看:226
本文介绍了ExtJS:单片机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是更改单个面板的标题的字体大小。

My target is to change header's font size for one single panel.

我试图阅读 http://docs.sencha.com/extjs/4.2.1/#!/guide/theming ,但是我所有的发现是在主题JS覆盖中提出了整个应用程序,将所有面板的项目和重写配置选项,但没有CSS变量覆盖单个组件。

I tried to read http://docs.sencha.com/extjs/4.2.1/#!/guide/theming, but all what I found was theming the whole applications, theming all-the-panels-in-the-project and overriding config options in "Theme JS Overrides", but no CSS variables overriding for single component.

有没有办法实现它,而不用整个项目的SASS?

Is there any way to achieve it without fussing with this SASS for whole project?

推荐答案

只需向该面板添加一个类,然后创建一个匹配规则:

Just add a class to the panel, then create a rule to match:

new Ext.panel.Panel({
    cls: 'foo',
    renderTo: document.body,
    title: 'X'
});

.foo .x-header-text {
    font-size: 24px;
}

这篇关于ExtJS:单片机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆