How to keep css style for only one element
I have this CSS style in my application: .list-cell { -fx-background-color: null; -fx-font-size: 24px; -fx-text-fill: linear-gradient( from 0.0% 0.0% to 0.0% 50.0%, reflect, rgba(255,0,0,0.28) 0.0, rgba(102,243,255,0.58) 50.0, rgba(179,179,179,0.45) 70.0, rgba(179,179,179,0.45) 100.0); } .list-cell:hover { -fx-text-fill:linear-gradient( from 0.0% 0.0% to 100.0% 100.0%, reflect, rgb(255,255,255) 0.0, rgb(255,255,77) 100.0); } And I apply it to my program: scene.getStylesheets().add(getClass().getResource("/com/root/tomaszm/Design.css").toExternalForm()); And I would like to use this style only