PDA

View Full Version : Problems Changing grid row color via getRowClass



mysticav
8 Oct 2013, 1:14 PM
Hi,

I'm using 4.2.1, Neptune Theme.

This is how my CSS class is defined:



.App-row-red .x-grid-cell {
background-color:#FFA6A6;
color: #6B0909;
}

It works, but the problem is that x-grid-row-selected and x-grid-row-focused stop working. THat is, when I over the row or select the row, my custom .App-row-red background color prevails.

using chrome development tools inspector, this is how the row class looks:


class="x-grid-row App-row-red x-grid-data-row x-grid-row-selected x-grid-row-focused"
So Why App-row-red is taking precedence over all other classes ?

mysticav
8 Oct 2013, 8:27 PM
I'm using Neptune theme.

skirtle
8 Oct 2013, 9:21 PM
http://www.sencha.com/forum/showthread.php?147073#post1002058

I recommend doing some background reading on CSS specificity, though in this case it's a tie so it simply uses the last rule defined.

The order of classes in the class attribute is irrelevant.