Skip to content

Instantly share code, notes, and snippets.

@kinsleykajiva
Forked from k33ptoo/JavaFX TC .css
Created September 12, 2017 05:33
Show Gist options
  • Save kinsleykajiva/ac452bc8280bc52be384e9af98f2ba0c to your computer and use it in GitHub Desktop.
Save kinsleykajiva/ac452bc8280bc52be384e9af98f2ba0c 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;
}
@AppiahEnoch
Copy link

Thanks alot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment