Hello!
Is there a way to switch between lists of css files which I want to append. I have tried callback with radio buttons but no luck so far.
external_css = [“https://rawgit.com/.../application.css”, “https://rawgit.com/.../toolkit-inverse.css”]
@app.callback(
Output(‘hidden_div’, ‘children’),
[Input(‘radio_style’, ‘value’)])
def update_style(radio_style):
if radio_style == ‘Dark’:
external_css = [“https://rawgit.com/.../application.css”, “https://rawgit.com/.../toolkit-inverse.css”]
return external_css
elif radio_style == ‘Light’:
external_css = [“https://rawgit.com/.../application.css”, “https://rawgit.com/.../toolkit-light.css”]
return external_css
for css in external_css:
app.css.append_css({“external_url”: css})
Thank you )