[英]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) 中修復。 如果遇到此錯誤,請運行:
pip install -U dash-bootstrap-components
有關詳細信息,請參閱https://github.com/facultyai/dash-bootstrap-components/issues/827#issuecomment-1069361034
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.