Skip to content

Instantly share code, notes, and snippets.

@k33ptoo
Created September 11, 2017 11:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save k33ptoo/165be4edbd7696d2569a251671867776 to your computer and use it in GitHub Desktop.
Save k33ptoo/165be4edbd7696d2569a251671867776 to your computer and use it in GitHub Desktop.
Contains basic css for customizing a TableView and Charts.
.table-view .column-header,
.table-view .column-header-background .filler {
-fx-background-color: #6622CC;
}
.table-view .column-header .label{
-fx-text-fill: white;
-fx-font-weight: bold;
-fx-alignment: CENTER_LEFT;
}
.table-view .cell{
-fx-cell-size: 35;
-fx-alignment: center-left;
-fx-background-color: #29292D;
-fx-border-color: #29292D;
-fx-text-fill: lightgray;
-fx-alignment: CENTER_LEFT;
}
.table-row-cell:selected {
-fx-background-color: whitesmoke;
-fx-text-background-color: #6622CC;
}
/* scroll bar starts here */
/* The increment and decrement button CSS class of scrollbar */
.table-view .increment-button ,.table-view .decrement-button {
-fx-background-color:transparent;
-fx-background-radius: 2em;
}
/* The main scrollbar **track** CSS class */
.table-view .scroll-bar:horizontal .track,
.table-view .scroll-bar:vertical .track{
-fx-background-color: transparent;
-fx-border-color:derive( #6622CC,80%);
-fx-background-radius: 2em;
-fx-border-radius:2em;
}
/* The main scrollbar **thumb** CSS class which we drag every time (movable) */
.table-view .scroll-bar:horizontal .thumb,
.table-view .scroll-bar:vertical .thumb {
-fx-background-color:derive( #6622CC,90%);
-fx-background-insets: 2, 0, 0;
-fx-background-radius: 2em;
}
/* chart properties */
.chart {
-fx-padding: 10px;
-fx-background-color: transparent;
-fx-legend-visible: false;
}
.chart-plot-background {
-fx-background-color:transparent;
}
.chart-pie {
-fx-border-color: derive(-fx-pie-color, 1%);
-fx-border-width: 0px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment