Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added a couple of related resource links

...

Code Block
themeMidnight
languagecss
titleExample CSS
linenumberstrue
collapsetrue
/*=============================================
 * SCROLLBARS
 *=============================================*/
.scroll-bar {
    -fx-background-color: transparent;
    -fx-opacity: 0.5;
}

.scroll-bar .track-background, 
.scroll-bar .track {
    -fx-background-color: transparent;
}

.scroll-bar .thumb {
    -fx-background-radius: 2px;
    -fx-background-color: -col-primary-trans;
}

.scroll-bar .increment-button, 
.scroll-bar .decrement-button {
    -fx-background-color: transparent;
    -fx-padding: 0;
}

.scroll-bar:horizontal .increment-arrow, 
.scroll-bar:horizontal .decrement-arrow {
    -fx-background-color: transparent;
    
    /* Overall scrollbar height is set by the button's padding */
    -fx-padding: 15px 0 0 0;
}

...

Resources

  • The JavaFX CSS Reference Guide give an overview of using JavaFX's CSS implementation and details of all available CSS properties.
  • ScenicView can be useful seeing how UI components are structured in the running application. Unfortunately it's live CSS reloading does not seem to be working.

Related articles

...

 

Filter by label (Content by label)
showLabelsfalse
max5
spacesNAUTW
sortmodified
showSpacefalse
reversetrue
typepage
labelscss development UI

...