If I am trying to set the same attribute in FXML and in a class definition in CSS, I would expect that the attribute set in FXML is considered more specific than the one from CSS.
For example, if I have a control such as
<Label styleClass="myLabel" prefHeight="40.0">
and, at the same time, a CSS definition such as
Label.myLabel {
-fx-pref-height: 100px;
}
I would expect the label to have a height of 40 px. Instead, it has 100 px. Is there a way to make the attribute in the FXML have precedence?