I've set up a stylesheet with the following styles:
*
{
-fx-font-size: 15px;
}
.title
{
-fx-font-size: 20px;
}
I assumed that since *
is a more general selector than .title
, the font size specified in .title
would take precedence over it. However, to my surprise, no matter what font size I specify in .title
, the title label still shows up as 15px
. Removing the *
block resolved this issue and the title label displayed the correct size from .title
.
Am I doing something wrong here? I just want to establish an overall appearance while allowing certain nodes to have their own distinct look when needed.
Edit
It appears that this problem only affects font-related CSS properties. When I changed -fx-font-size
to -fx-border-color
in my example, it behaved as expected based on standard CSS rules.
There seems to be some peculiar behavior specifically related to font properties.