Thanks!
This gave me control over the sidebar. However by doing this I realize that there is more to this than setting a dark background -> text, selectbox and other components need work.
I guess it’s better to wait for a supported dark theme at this point…
Thanks
Thank you for this workaround, @randyzwitch! This worked well on my streamlit v.0.71.0. However, I just tried updating my streamlit version to 0.72 and resulted in the background reverting back to the default color. Is there a new workaround or I should stick with 0.71 for now?
Thank you again for all the wonderful things that streamlit is doing!
As part of work towards formally supporting themes in Streamlit, we’ve been re-factoring the codebase. So the CSS selectors will be changing. The quickest way to fix this would be to use your browser’s developer tools to find what .sidebar .sidebar-content changed to.
I’ll try to post the answer later today if I get a chance to do some coding today.
This is what I used to change sidebar colour for anyone interested. Thanks for the update @randyzwitch, looking forward to seeing how theme support looks!
I have done some experiments with manipulating the CSS however, I believe, it is better to wait for official support.
I tried to change the background colors and border of different elements from the “reddish” default to something else, but after inputting some values, selecting items from a drop menu and so on, everything defaults to the original.
You should inspect the HTML code of your Streamlit App using your browser. In my case, full code for setting backgroung color of sidebar is:
st.markdown("""
You can easily change the sidebar color via theming nowadays. Just add the following text to your config file (in .streamlit/config.toml) to e.g. make the sidebar orange: