-
Notifications
You must be signed in to change notification settings - Fork 20
CSS Documentation
Andrew Hamilton edited this page Jan 27, 2020
·
6 revisions
LWJGUI has its own CSS implementation. It lacks a LOT of features/functionality, but we try to add them when needed.
Stylesheets can be added to any class that extends Node in LWJGUI. A Stylesheet that is set to a Node will affect it and all of its descendants. You can also set a local Style to a Node object. Local styles only affect that node and no one else. They work similarly to defining an inline style attribute in HTML.
Current Supported Attributes:
- width (px only)
- min-width (px only)
- max-width (px only)
- height (px only)
- min-height (px only)
- max-height (px only)
- padding
- border-radius
- border-style (none/solid)
- border-left
- border-right
- border-top
- border-bottom
- border-width
- border-color
- background-color
- background-image
- box-shadow
- transition
- pointer-events (all/none)
- gap (for gridpane/flowpane)
- spacing (for vbox/hbox)
- font-size
- color
Current Supported Transitions:
- border-left
- border-right
- border-top
- border-bottom
- border-width
- background-color
- box-shadow
- gap
- spacing
- color
Current Supported Pseudo Classes:
- normal (default pseudo class, does not need to be specified)
- hover (active when mouse is hovering)
- focus (active when node is selected or being clicked)
- select (active when node is selected [NOT STANDARD CSS])
- active (active when node is being clicked)
- disabled (active when node is disabled)