I have Dash 1.1.1 and I am trying to change the color scheme to have a black background and while text. I’ve managed to get everything to work except for the Dropdown elements.
The initial look of Dropdowns is fine, except the color of the default values is too dark:
However, if I select one of the dropdown menus, the backgrounds are white:
How do I make the selected menus also have black background and white text?
Here is the beginning of my layout, which contains all of the Dropdowns:
app.layout = html.Div(style={‘backgroundColor’: ‘black’, ‘color’: ‘white’}, children=[
html.Label(‘Dropdowns’),
dcc.Dropdown(
id=‘universe’,
options=[{‘label’: i, ‘value’: i} for i in table_list],
value=table_list[-1],
style={‘backgroundColor’: ‘black’, ‘color’: ‘black’}
),
dcc.Dropdown(
id=‘ranking’,
options=[{‘label’: ‘All’, ‘value’: ‘All’}]+[{‘label’: i, ‘value’: i} for i in rankings],
value=‘All’, style={‘backgroundColor’: ‘black’, ‘color’: ‘black’}
),
dcc.Dropdown(
id=‘category’,
options=[{‘label’: ‘All’, ‘value’: ‘All’}]+[{‘label’: i, ‘value’: i} for i in factor_categories.keys()],
value=‘All’, style={‘backgroundColor’: ‘black’, ‘color’: ‘black’}
),
…
I’ve attempted to make changes to css stylesheets, but never see any of them show up, so I’m not sure I’m doing that correctly:
external_stylesheets = [‘dashboard_style.css’, ‘bootstrap.css’]
app = dash.Dash(name, external_stylesheets=external_stylesheets)
I’ve also tried without any modified stylesheets and I still get the above problem.
I’m new to Dash and plotly and don’t have much experience with css stylesheets, so please let me know if there is basic information that I haven’t provided.
Thanks.