20

the following css would select all cells with 'new' style class and set it's color to green

.table-view .new:filled {
    -fx-background-color: green;
}

but on selection, it stays green, what I want is to respect the usual selection color, so is there something like:

.table-view .new:filled:not(selected){
    -fx-background-color: green;
}

also I've noticed a strange behavior, the following css

.table-view :selected{
    -fx-background-color: yellow;
}

would normally turn selection color of talbe to yellow, where as the following css to set the selection color of updated cells is not working

.table-view .updated:selected{
    -fx-background-color: yellow;
}
Brad Turek
  • 2,472
  • 3
  • 30
  • 56
DrAhmedJava
  • 731
  • 8
  • 16
  • Don't know if that helps, but I was looking for a similar formula when designing the Javafx MenuBar but I solved it with a different approach which is considered here: [JavaFX menu css](https://stackoverflow.com/questions/21912946/how-can-i-style-a-javafx-menu-and-its-items-in-css) I used different color on the: menu:showing .label . As I said I don't know if that helps but it might. – VJindustries May 27 '20 at 17:15

0 Answers0