PDA

View Full Version : overwriting theme css classes



JeromeA
9 May 2013, 2:01 PM
Hi
I'm using Sencha Cmd 3.1.1.274 and Ext.4.2

I created a theme package that extend the ext-theme-gray, which inherit from ext-theme-neutral, among others. The file ext-theme-neutral\sass\src\panel\TABLE.SCSS creates a rules that I do not want and I'm trying to overwrite it in my custom theme without much success... I created this file where I put my new rule: my-theme\sass\src\panel\TABLE.SCSS. This succeed to add my rule.. but how can I remove the neutral rule?

I'm starting to wonder if it is even possible. I'm trying to remove this rule:


.#{$prefix}grid-row-selected {
.#{$prefix}grid-td {
border-style: $grid-row-cell-selected-border-style;
border-color: $grid-row-cell-selected-border-color;
background-color: $grid-row-cell-selected-background-color !important;
}
}

to replace it with

.#{$prefix}grid-row-selected.#{$prefix}grid-td {
border-style: $grid-row-cell-selected-border-style;
border-color: $grid-row-cell-selected-border-color;
background-color: $grid-row-cell-selected-background-color !important;
}


The problem is, I can create that class without any problem... but I cannot get rid of the rule generated by ext-theme-neutral\sass\src\panel\TABLE.SCSS. I could modify that file but I don't think this is how it is intended to be.

Anybody know a way?

mitchellsimoens
15 May 2013, 11:55 AM
You'd probably have to duplicate the code to override the rules.

JeromeA
15 May 2013, 12:40 PM
yeah that's the only way I can think of.
thanks!