facultyai / dash-bootstrap-components

Bootstrap components for Plotly Dash
https://dash-bootstrap-components.opensource.faculty.ai/
Apache License 2.0
1.1k stars 219 forks source link

Little issue with "inverse" parameters on dbc.Card #823

Closed rtadewald closed 2 years ago

rtadewald commented 2 years ago

What is happening?

Hello, guys. First of all, thank you all for the great job. I simply love the library.

With that being said, I'm facing a small issue related to use of the inverse parameter in the Card component. It's not changing the color the way it should.

Here's my code: Captura de Tela 2022-03-14 às 13 54 42

And here's what I'm getting: Captura de Tela 2022-03-14 às 13 55 42

Even if I try to write "inverse=False", "inverse=True" or change the Bootswatch theme in the app section, I keep seeing a white Card.

Thank you so much.

tcbegley commented 2 years ago

Thanks for reporting! Looks like a bug, I'll look into it.

tcbegley commented 2 years ago

I tried to reproduce this and didn't get the same issue as you

image
import dash_bootstrap_components as dbc
from dash import Dash, html

app = Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])

app.layout = dbc.Container(
    dbc.Card(
        [
            dbc.CardHeader("Header"),
            dbc.CardBody(
                [
                    html.H5("Title", className="card-title"),
                    html.P("Some content", className="card-text"),
                ],
            ),
        ],
        color="light",
        inverse=False,
    ),
    className="p-5",
)

if __name__ == "__main__":
    app.run_server(debug=True)

Can you run this code and see if you have the same problem?

rtadewald commented 2 years ago

Yeah, I got the same thing: Captura de Tela 2022-03-14 às 14 13 56

Here's my packages: Captura de Tela 2022-03-14 às 14 14 34

tcbegley commented 2 years ago

That's very odd... I have installed exact same versions of dash packages as you and am not seeing it this end.

Could you look at the text in the inspector / developer tools and see if you can find out where the text color styles are coming from?

rtadewald commented 2 years ago

Ah, I see. That's my fault, I'm sorry. I had an old style.css inside my assets, and he's the one replacing the code. I'm so sorry. Thanks for your help!

tcbegley commented 2 years ago

No problem, glad we got to the bottom of it :)