ExtJS: Theming single component

北城余情 提交于 2019-12-25 02:40:07

问题


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

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.

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


回答1:


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


来源:https://stackoverflow.com/questions/20256482/extjs-theming-single-component

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!