Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text on cards don't respect data-bs-theme #37765

Closed
3 tasks done
Tracked by #37549
kusma opened this issue Dec 30, 2022 · 1 comment · Fixed by #37777
Closed
3 tasks done
Tracked by #37549

Text on cards don't respect data-bs-theme #37765

kusma opened this issue Dec 30, 2022 · 1 comment · Fixed by #37777

Comments

@kusma
Copy link
Contributor

kusma commented Dec 30, 2022

Prerequisites

Describe the issue

When setting data-bs-theme to dark on a Card, the background color changes, but not the foreground colors.

I'd expect either neither or both to change.

Reduced test cases

https://codepen.io/kusma/pen/ZEjWxyb

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

Firefox

What version of Bootstrap are you using?

v5.3.0-alpha1

@julien-deramond
Copy link
Member

julien-deramond commented Dec 31, 2022

Thanks for reporting this issue @kusma.
Indeed your live example only works when data-bs-theme="dark" is set to <html> but not contextually 🤔
I haven't looked at why in details yet but it definitely need to be fixed.
Possibly because $card-cap-color: null !default; and that the default color is only changed when data-bs-theme="dark" is set to <html>. Maybe we need to set $card-*-color to body color custom property or something like that.
At the end, we'd need to have the same behavior for all Sass vars having a null value as color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants