View Full Version : Tiny suggestion on grid css

12 Apr 2007, 2:53 PM

wouldn't it be better to define background colours in css using background-colour instead of background? I can't think of a reason why not to. The old way can get annoying when having background icons in the grid cells.

Kind regards,


17 Apr 2007, 5:29 AM
*bump* 8-|

This is still in the final 1.0. is there a reason to use background instead of background color?


.cell-confirmed {
background:url('../icons/tick.png') no-repeat 1px center;
.cell-option {
background:url('../icons/help.png') no-repeat 1px center;

The icons will disappear when hovering since it is overridden by

.x-grid-row-over td{

17 Apr 2007, 1:04 PM
Why would it be better?

18 Apr 2007, 11:20 AM
For the reason I gave in my previous post: If you specify a background image for a cell, it will be removed when hovering since the background property overwrites all background properties, while just the colour is needed.

19 Apr 2007, 6:42 AM
Or maybe we could at least have a way to specify a hover class as well?

20 Apr 2007, 1:43 AM
Thats possible:

.cell-edit, .x-grid-row-over .cell-edit {
background: #d9e8fb url('../icons/user_edit.png') no-repeat center center;
cursor: pointer;

But still, in my opinion it would be better to just specify background-colour instead of background. I guess you would have the same problem with selected cells.

20 Apr 2007, 6:09 AM
I agree using background-color would be better. x-grid-row-over's background removes x-grid-dirty-cell's background-image. So if the grid contains several dirty cells, the dirty.gif image disappears and reappears as each row is hovered.

Using background-color instead of background solves this problem.

20 Apr 2007, 3:45 PM
This change is in SVN.

25 Apr 2007, 8:35 AM
Great :)
Thank you.