如何修复 Firefox 的深色主题问题

bue*_*tge 12 gnome themes firefox

自从更新到 Ubuntu 18.04 以来,我使用了深色主题“Adwaita-dark”,并且在 Firefox 中有几个输入字段不可用。字体的背景和颜色是深色的,颜色相似。它不会被设置为替代主题,就像这个 q/a中提到的 Adwaita 的轻量级主题。我正在寻找一种解决方案,让所有应用程序都保持黑暗主题。

如何修复主题以使用输入字段,查看字符串以输入正确的内容?

下面 Google Drive 中的屏幕截图应该说明左侧标题字段中的问题,右侧是“文档”图标。

在此处输入图片说明

bue*_*tge 13

我使用 Firefox 的自定义样式表为我修复它们。userContent.css在目录中保留带有名称的自定义样式~/.mozilla/firefox/<custom-key>.default/chrome/。您还应该添加目录chrome,重要的是小写。使用下面的 css 代码为不同的输入字段修复它们。结果如下图所示。

在此处输入图片说明

如果您找不到要离开此样式表的文件夹,请阅读此答案

将以下源复制到自定义样式表文件userContent.css

input {
  border: 2px inset white;
  background-color: white;
  color: black;
  -moz-appearance: none !important;
}

textarea {
  border: 2px inset white;
  background-color: white;
  color: black;
  -moz-appearance: none !important;
}

select {
  border: 2px inset white;
  background-color: white;
  color: black;
  -moz-appearance: none !important;
}

input[type="radio"],
input[type="checkbox"] {
  border: 2px inset white !important;
  background-color: white !important;
  color: ThreeDFace !important;
  -moz-appearance: none !important;
}

*|*::-moz-radio {
  background-color: white;
  -moz-appearance: none !important;
}

button,
input[type="reset"],
input[type="button"],
input[type="submit"] {
  border: 2px outset white;
  background-color: #eee;
  color: black;
  -moz-appearance: none !important;
}

body {
  background-color: white;
  color: black;
  display: block;
  margin: 8px;
  -moz-appearance: none !important;
}
Run Code Online (Sandbox Code Playgroud)

如果您在单选按钮或复选框上遇到任何问题,在添加此 CSS 文件后,只需删除 -moz-appearance: none !important