I'm using JFoenix to have google material like elements in my JavaFX application. I notice that in order to style JFoenix's elements with css, some commands are not the same as when using only JavaFX, so I'm not being able to style JFoenix's TabPane as I'd wish to.
At the moment my TabPane is as shown in the following image: https://ibb.co/DtxVpJJ
And I wish to change those close tab buttons color as follows: https://ibb.co/yRbDGnQ
I already tried a lot of solutions I found in the internet, but none of them is able solve the problem. The main two solutions were:
Change directly the color of the button (https://blog.samirhadzic.com/2016/08/30/close-options-for-tabpane).
Hide the button and replace it with an icon. (Javafx change Tab X to image icon from url)
Using the code to change the color, nothing happens:
.jfx-tab-pane > .tab-header-area > .headers-region > .tab:selected > .tab-container > .tab-close-button{
-fx-background-color:red;
}
Using the following code, the icon appears but still behind the white default cross:
.jfx-tab-pane .tab-close-button {
-fx-background-color: transparent;
-fx-shape:null;
-fx-background-image: url("../../assets/close-32.png");
-fx-background-size: 25;
-fx-background-repeat: no-repeat;
}
Result:
This seems such a simple problem and I'm not being able to fix it. Any ideas?