title: Change tree-cell selected font color in JavaFX
body: <p>I have a JavaFX <code>TreeView</code> and want to change the font color of a selected cell to black, to make it look like a non-selected cell. (I tried <code>setSelectionModel(null)</code> but this throws errors.) The cells have a transparent background on a background image, if that matters.</p>
  
  <p>CSS:</p>
  
  <pre><code>.tree-view, .tree-cell {
      -fx-font: 20px "Segoe Print";
      -fx-background-color: transparent;
  }
  
  .tree-cell {
      -fx-background-color: transparent;
      -fx-padding: 0 0 0 0;
      -fx-text-fill: #000000;
  }
  
  .tree-cell:focused {
      -fx-text-fill: #000000;
  }
  
  .tree-cell:selected {
      -fx-text-fill: #000000;
  }
  
  .tree-cell .tree-disclosure-node {
      -fx-background-color: transparent;
      -fx-padding: 10 10 0 40;
  }
  
  .button {
      -fx-padding: 0 10 0 10;
  }
  </code></pre>
  
  <p>Result: ("test4" is selected)</p>
  
  <p><a href="https://i.stack.imgur.com/pcQMj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pcQMj.png" alt="Result: (&quot;test4&quot; is selected)"></a></p>
  
  <p>This seems like it should set the font color for selected cells to black, but it's not happening. The CSS file is loaded and being used (the font is correct, for instance, and I've modified other things as well), so that's not the issue.</p>