Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

Using local css file AND dash.bootstrap component

Greetings

I am trying to build an app where I am using a CSS3 file AND dash_bootstrap_components. I have tried the following line of code (from a previous post)
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])

But all this does is ignore my local css file (whose styles are applied successfully) and apply bootstrap classes to my app (I think). I have only added a dbc.button (shown in the link, as the first example of the documentation for dash_bootstrap_components) and I am confused as there aren’t any other css classes defined in that excerpt.

The code for the button:
dbc.Button("Button 1", color = "primary", outline = "True", class_name="me-1")

How would I retain my local css styling and use the dbc.button?

Thank you.

As far as I know, your local css will be applied after any external stylesheets. Now, it doesn’t necessarily mean that all styles will be overridden because of the cascading, but I would expect that attributes that bootstrap does not touch (like background color for blocks and so on) will use definitions from your own stylesheet instead.

Is this still a problem for you?