title: styling Thunderbird DOM elements: disable color inversion of selected message
body: <p>In Thunderbird:<br>
  For better visual emphasis I have manually added background-colors to my tags via userChrome.css<br>
  Therefoe my tagged eMails in my thread pane now have a background-color.</p>
  
  <p>example (yellow tag):</p>
  
  <pre><code>/* yellow = 2do*/
  #threadTree &gt; treechildren::-moz-tree-cell(lc-FFCC33) {background-color:#FFEB33!important}
  #threadTree &gt; treechildren::-moz-tree-cell-text(lc-FFCC33) {color:black!important}
  </code></pre>
  
  <p>The problem is: By default, the cursor (i.e. the selected message) looks just the same (white text on blue background-color). In order to distinguish selected messages from tagged messages, I thus have to change the look of the cursor.</p>
  
  <p>My choice for the cursor is: 1px dashed border and no background-color.</p>
  
  <pre><code>#threadTree &gt; treechildren::-moz-tree-row(selected,focus) {
      border: 1px dashed black !important;   
      border-left: 3px solid magenta !important;
      border-radius: 0 10px 10px 0;}
  
  #threadTree &gt; treechildren::-moz-tree-row(selected) {background-color:transparent!important}
  #threadTree &gt; treechildren::-moz-tree-cell-text(selected) {color:inherit!important}
  #threadTree &gt; treechildren::-moz-tree-row(selected,focus) {background-color:transparent!important}
  #threadTree &gt; treechildren::-moz-tree-cell-text(selected,focus) {color:inherit!important}
  </code></pre>
  
  <p>This prevents the default background-color inversion to blue. For untagged messages the background stays white and for tagged messages the background-color is defined by the tag.</p>
  
  <p>Let's remember: Thunderbird inverts colors for selected messages (white text on blue background). Now that I have disabled the background-color inversion, I'm left with white text on white background.</p>
  
  <p>So I have to prevent Thunderbird from changing the text color of selected messages to white. But how?</p>
  
  <p>I can set <code>-moz-tree-cell-text color</code> to black, which brings back the text, but the problem is, it is black for ALL messages. So a tagged message with, say, pink text color (determined by the tag) turns black when selected. But I want it to stay pink when selected:</p>
  
  <p><a href="https://i.stack.imgur.com/Zt0LM.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zt0LM.gif" alt="animation"></a></p>
  
  <p>I tried various keywords instead of "black", but none of them worked:</p>
  
  <pre><code>inherit
  initial
  currentColor
  Highlight
  HighlightText
  -moz-CellHighlight
  -moz-CellHighlightText
  -moz-html-CellHighlight
  -moz-html-CellHighlightText
  -moz-DialogText
  </code></pre>
  
  <p>I also tried <code>-moz-appearance:none!important</code> but to no avail.</p>
  
  <p>So my question is:
  How can I disable the text color of selected messages (without the aforementioned negative side-effects) ?</p>
  
  <p>Once selected, Thunderbird turns the text color white. So it seems I'd need to</p>
  
  <ul>
  <li>either tell Thunderbird to use the tag color instead of white,</li>
  <li>or prevent "white" to be assigned in the first place (I thought "inherit" should work, but it doesn't),</li>
  <li>or maybe you know another solution altogether ?  </li>
  </ul>
  
  <p>Do you know, how to solve this problem?
  Thank you.</p>
  
  <p>PS: Bonus points if you can explain to me, why the border style is lost on the yellow tagged eMail (see animation) and how to prevent that.</p>