Sometimes one wants to replace text by icons using CSS. For example, using code like...
.cell {
-fx-content-display: graphic-only;
}
#myFirstCell[text="X"] {
-fx-graphic: url("x.png");
}
#myFirstCell[text="Y"] {
-fx-graphic: url("y.png");
}
...but to make text-to-icon mappings like the above work, apparently support for CSS attribute selectors is needed. :-)
.cell {
-fx-content-display: graphic-only;
}
#myFirstCell[text="X"] {
-fx-graphic: url("x.png");
}
#myFirstCell[text="Y"] {
-fx-graphic: url("y.png");
}
...but to make text-to-icon mappings like the above work, apparently support for CSS attribute selectors is needed. :-)