Styling dbc.Components in an external css file

Hi there!
Does anyone know if there is a way to style dbc.Components in an external css file? Say, I want to add a border to all of my dbc.col’s at once but don’t want to add a custom className to all of them in my python code. I already have a css file connected and working with my python code, but I don’t know how to refer to those components in it. So I’m looking for something like:

dbc-col {

}

but couldn’t find anything in the documentation so far…
Will be grateful for any help and tips!

Cheers

Hi @matvei ,

Try:

.col {
    your styles
}

In general, most of the dbc styling is done with this css sheet:
https://cdn.jsdelivr.net/gh/AnnMarieW/dash-bootstrap-templates@V1.0.2/dbc.css

Omg this works thank you! I’ve tried all combinations except this one… :slight_smile:

1 Like