Dash Bootstrap 组件:使用深色主题时某些输入的样式不正确

Dash Bootstrap Components: Some inputs not styled correctly when using dark theme

我用 Plotly Dash / Dash Bootstrap 组件 (dbc) 编写了一个应用程序。使用浅色主题(Spacelab)时看起来不错,但使用深色主题(我试过 Darkly 和 Cyborg)时,下拉菜单和选择的样式不正确 - 它们应该有白色背景,但有黑色背景:

这是展示问题的其他功能齐全的代码:

import dash
import dash_html_components as html
import dash_bootstrap_components as dbc

app = dash.Dash()
app.config.external_stylesheets = [dbc.themes.DARKLY]

app.layout = html.Div(children=[
    html.H1(children='Hello Dash'),
    html.Br(),
    dbc.Input(id="run-namefield", type="text", placeholder="Run Name"),
    html.Br(),
    dbc.Select(id='run-relpath-y', placeholder="Select y file")
])

app.run_server(debug=True)

我用具有相同问题的示例应用替换了我的代码。黑暗中的黑暗,几乎不可读。

我没有在其他地方修改布局,而且我在任何地方都没有 .css 文件,它目前是一个代码文件。我尝试了 Chrome 和 Edge(相同的结果),还删除了 cookies/强制刷新页面 (Ctrl+F5)。

关于我可以尝试什么的任何提示?或者这可能是主题中的错误?

这是一个错误,已在最新版本 (#1.0.2) 中修复。如果遇到这个bug,请运行:

pip install -U dash-bootstrap-components

有关详细信息,请参阅 https://github.com/facultyai/dash-bootstrap-components/issues/827#issuecomment-1069361034