holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.7k stars 510 forks source link

Describe how to change the global css variables of a design #4830

Open MarcSkovMadsen opened 1 year ago

MarcSkovMadsen commented 1 year ago

I would like to change the value of --panel-primary-color generally for the Bootstrap design in an app.

I was looking to https://pyviz-dev.github.io/panel/how_to/styling/apply_css.html for a description. But it contains only information on styling specific components. Not the default template or all components.

mayonnaisecolouredbenz7 commented 10 months ago

+1 for this. At the moment my work around is setting global css. hex_color="#183b8a" accent_css = ":root { --design-primary-color:" + f"{hex_color}" + "}" pn.config.global_css = [accent_css]

But according to the documentation that is discouraged if I am not mistaken?