I add a CSS class "note" to only some Labels in a ...
# tornadofx
s
I add a CSS class "note" to only some Labels in a TreeTableCell. CSS
cell { note { backgroundColor += Color.RED } }
works as expected (only coloring those labels).
cell { and(selected) { backgroundColor += Color.RED } }
works as expected (coloring everything in the selected row).
cell { and(selected) { note { backgroundColor += Color.RED } } }
has no effect. I expected it to color only the labels with the "note" class in the selected row.
r
Any chance you could provide a minimal sample? All three of those seem to produce the expected CSS:
Copy code
cell {
    note {
        backgroundColor += Color.RED
    }
}
// becomes
.cell .note {
    -fx-background-color: rgba(255, 0, 0, 1);
}
Copy code
cell {
    and(selected) {
        backgroundColor += Color.RED
    }
}
// becomes
.cell:selected {
    -fx-background-color: rgba(255, 0, 0, 1);
}
Copy code
cell {
    and(selected) {
        note {
            backgroundColor += Color.RED
        }
    }
}
// becomes
.cell:selected .note {
    -fx-background-color: rgba(255, 0, 0, 1);
}