Smreks
Smreks

Reputation: 327

JavaFX CSS Styling: Change Highlight color of Selected Tabs

I'm trying to change the highlighted color of selected tabs. It seems the standard is blue and it is not the -fx-border-color as it adds a border on top of blue highlight. I was wondering what property changes this color. See images below:

enter image description here

enter image description here

Upvotes: 1

Views: 4361

Answers (2)

jns
jns

Reputation: 6952

Try this:

.tab-pane:focused > .tab-header-area > .headers-region > .tab:selected .focus-indicator {-fx-border-color: red}

Upvotes: 5

James_D
James_D

Reputation: 209358

I think this is a combination of -fx-focus-color (which defaults to #039ED3) and -fx-faint-focus-color (which is just a semi-transparent version: #039ED322).

Upvotes: 1

Related Questions