天天看點

firefox使用深色GTK主題時文本區域故障(vertex主題輸入框字型為白色,看不清)

轉載自:https://wiki.archlinux.org/index.php/Firefox_%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29#.E4.BD.BF.E7.94.A8.E6.B7.B1.E8.89.B2GTK.E4.B8.BB.E9.A2.98.E6.97.B6.E6.96.87.E6.9C.AC.E5.8C.BA.E5.9F.9F.E6.95.85.E9.9A.9C

=============================================================================

使用深色GTK主題時,可能看不到某些網站輸入框和文本區域的文字(白底白字)。這可能是因為某些網站隻設定了背景色或文本色,而Firefox主題使用了一樣的顔色。

可以在

~/.mozilla/firefox/xxxxxxxx.default/chrome/userContent.css

設定所有網頁的标準色彩配置。

下列代碼設定輸入框預設白底黑字,預設設定不會覆寫網站自己的設定:

input {
    -moz-appearance: none !important;
    background-color: white;
    color: black;
}

textarea {
    -moz-appearance: none !important;
    background-color: white;
    color: black;
}

select {
    -moz-appearance: none !important;
    background-color: white;
    color: black;
}


=================================================================
此方法,我親自測試可行。
================================================================= 
      

下列代碼強制設定色彩(設定 > 内容 > 顔色中的“允許頁面選擇顯示顔色而無需使用上面的設定”):

input {
    -moz-appearance: none !important;
    background-color: pink !important;
    color: green !important;
}

textarea {
    -moz-appearance: none !important;
    background-color: pink !important;
    color: green !important;
}

select {
    -moz-appearance: none !important;
    background-color: pink !important;
    color: green !important;