In addition to the previous methods you can address JavaFX elements through the type selectors, using their short class name:
GridPane { -fx-background-color: lightblue; -fx-padding: 10px;}
Here, we are setting the background color and padding properties for all GridPane objects that are styled using this CSS.