Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Read data in CSS

$
0
0

@vl2376 wrote:

I am building a python plotly dash webapp. I am using colors and fonts to style it, and I’d like these colors to be easily changeable. For now I need to declare them both in my python and css codes, as I used plotly for the graphs and css for the styling of some elements. Is there a wy to declare them in a single place, so that I dont have to change colors and fonts at several places. I am thinking something like a json file, which I can easily parse in python but dont know how to parse in css .

For now:

Python code:

color1 = "rgb(0, 63, 114)"
color2 = "rgb(0, 97, 152)"
font = "SourceSansProRegular"

CSS code:

:root {
    --dark-blue: rgb(0, 63, 114);
    --light-blue: rgb(0, 97, 152);
    --font: "SourceSansProRegular";
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles