View Full Version : Tiny suggestion on grid css
JorisA
12 Apr 2007, 2:53 PM
Hi,
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,
Joris
JorisA
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?
Example:
.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{
background:#d9e8fb;
}
jack.slocum
17 Apr 2007, 1:04 PM
Why would it be better?
JorisA
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.
ashishterp
19 Apr 2007, 6:42 AM
Or maybe we could at least have a way to specify a hover class as well?
JorisA
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.
reawilliams
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.
jack.slocum
20 Apr 2007, 3:45 PM
This change is in SVN.
JorisA
25 Apr 2007, 8:35 AM
Great :)
Thank you.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.