代码之家  ›  专栏  ›  技术社区  ›  summerrain

设置ThunderbirdDOM元素的样式:禁用所选消息的颜色反转

  •  1
  • summerrain  · 技术社区  · 7 年前

    在《雷鸟》中:
    为了更好的视觉强调,我已经手动添加了背景颜色,我的标签通过用户浏览器.css
    我的线程窗格中的标记邮件现在有了背景色。

    示例(黄色标签):

    /* yellow = 2do*/
    #threadTree > treechildren::-moz-tree-cell(lc-FFCC33) {background-color:#FFEB33!important}
    #threadTree > treechildren::-moz-tree-cell-text(lc-FFCC33) {color:black!important}
    

    我对光标的选择是:1px虚线边框,没有背景色。

    #threadTree > treechildren::-moz-tree-row(selected,focus) {
        border: 1px dashed black !important;   
        border-left: 3px solid magenta !important;
        border-radius: 0 10px 10px 0;}
    
    #threadTree > treechildren::-moz-tree-row(selected) {background-color:transparent!important}
    #threadTree > treechildren::-moz-tree-cell-text(selected) {color:inherit!important}
    #threadTree > treechildren::-moz-tree-row(selected,focus) {background-color:transparent!important}
    #threadTree > treechildren::-moz-tree-cell-text(selected,focus) {color:inherit!important}
    

    这将防止默认背景色反转为蓝色。对于未标记的消息,背景保持白色,对于标记的消息,背景颜色由标记定义。

    记住:Thunderbird会反转选定邮件的颜色(蓝色背景上的白色文本)。现在我已经禁用了背景色反转,剩下的是白色背景上的白色文本。

    我可以设置 -moz-tree-cell-text color

    animation

    我尝试了各种关键字,而不是“黑”,但没有一个有效:

    inherit
    initial
    currentColor
    Highlight
    HighlightText
    -moz-CellHighlight
    -moz-CellHighlightText
    -moz-html-CellHighlight
    -moz-html-CellHighlightText
    -moz-DialogText
    

    我也试过了 -moz-appearance:none!important 但无济于事。

    所以我的问题是:

    选定后,Thunderbird将文本颜色变为白色。看来我需要

    • 要么告诉雷鸟用标签颜色而不是白色,
    • 或者一开始就阻止分配“white”(我认为“inherit”应该起作用,但实际上不起作用),
    • 或者你知道另一个解决方案?

    你知道怎么解决这个问题吗?

    附言:如果你能向我解释一下,为什么边框样式会在黄色标签的邮件中丢失(见动画)以及如何防止这种情况,那就有加分了。

    0 回复  |  直到 7 年前
        1
  •  0
  •   Andra    7 年前

    当我在ManjaroLXQT中安装Thunderbird时,摆脱黑色窗口的唯一方法就是重新定义窗口的颜色用户浏览器.css. 所以我为文件夹和线程窗格重新定义了一些treechildren值。然后我注意到标记的消息在被选中时失去了标记颜色。通过谷歌搜索,我找到了这个线索(没有解决办法)。最终,我找到了一种方法来保存标记消息的颜色。然而,它假定使用预定的色码。
    例如,默认情况下,标记“Important”为红色(#FF0000)。然后我定义:

    #threadTree treechildren::-moz-tree-cell-text(selected, lc-FF0000) {
    color: #FF0000 !important;
    }

    它必须在定义之后 #threadTree treechildren:-moz-tree-cell-text(selected)

    推荐文章