I have a stylesheet like this:
*
{
-fx-font-size: 15px;
}
.title
{
-fx-font-size: 20px;
}
I had thought that since *
is more generic than .title
, then the -fx-font-size
defined in .title
would have precedence over it, but I'm wrong. No matter what font size I changed it to in .title
, that title label is still rendered at 15px
. When I removed the *
block, the title label would correctly reflect the size defined in .title
.
Is there anything wrong with my approach? I'm just trying to set a "global" look and feel, while giving specific nodes the flexibility to adjust it when that node needs a more customized look.
Edit
It seems like this problem is only visible for font related CSS properties. I have tried changing -fx-font-size
in my example to -fx-border-color
, and it seems to work according to normal CSS standard.
It seems like there is something weird with the font properties.