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

replacing navbar-dark with data-bs-theme breaks toggler icon color #37754

Closed
3 tasks done
Tracked by #37549
kusma opened this issue Dec 29, 2022 · 0 comments · Fixed by #37760
Closed
3 tasks done
Tracked by #37549

replacing navbar-dark with data-bs-theme breaks toggler icon color #37754

kusma opened this issue Dec 29, 2022 · 0 comments · Fixed by #37760

Comments

@kusma
Copy link
Contributor

kusma commented Dec 29, 2022

Prerequisites

Describe the issue

When following the advice from the docs of replacing the deprecated navbar-dark-class with the data-bs-theme="dark"-attribute, the navbar-toggler-icon class no longer renders in a light color, but with a dark one. Changing the "global" theme on the page seems to change the color of the icon, but not changing the theme of the navbar itself.

I'm seeing the same behavior in the Bootstrap docs itself, in the examples right below the advice. All three icons have the same color, regardless of the theme that's set on the navbar itself. Toggling the theme using the menu changes all three to the same color.

I would expect this to respect the theme set closest to the icon, not the one set closest to the root.

Keeping the navbar-dark-class on the navbar works around the issue, but seems a bit hacky since this class is now deprecated.

Reduced test cases

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

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

@kusma kusma changed the title Provide a general summary of the issue replacing navbar-dark with data-bs-theme breaks toggler icon color Dec 29, 2022
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