How do I apply a style (like padding) to all Nodes visible ever? As in, that should be the default style (each Node could overwrite it, ofc)
a
abhinay
06/26/2018, 4:11 PM
Why would you want to apply padding to all visible nodes?
By default only controls in JavaFX have pre-defined style-class assigned to them. Therefore, if you want to do it via css, you will have to first assign a style class to each visible node.
r
Ruckus
06/26/2018, 4:18 PM
Actually, in CSS, you can use
*
to style everything. (Int the CSS DSL, the appropriate selector is
star
.)
Ruckus
06/26/2018, 4:20 PM
(You may want to be careful with this though. Most `Node`s in JavaFX are made of many nested `Node`s, so you may see a lot more padding than you expect.)