I was working on this project on a separate branch in Git and while this theoretically shouldn't be possible, it seems my CSS was not properly applying itself until I merged the branch into main
. Afterwards, the CSS applied perfectly to the file, without having to make any additional changes.
So if your CSS doesn't apply to your FXML file despite the code logically being correct and you were working on a separate branch like I was, merging your branch into your main
/master
may be the solution.