You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While setting a global theme on the html tag works as expected, attempts to implement an exception by setting a data-bs-theme tag on an element has no effect. I have attempted to set it on many elements to no avail.
I can see that the child elements get the "light" theme and that it is clearly declared on the parent element but they also inherit bs-theme="dark" and it seems to not allow the parent theme to override.
Prerequisites
Describe the bug
While setting a global theme on the html tag works as expected, attempts to implement an exception by setting a data-bs-theme tag on an element has no effect. I have attempted to set it on many elements to no avail.
I can see that the child elements get the "light" theme and that it is clearly declared on the parent element but they also inherit bs-theme="dark" and it seems to not allow the parent theme to override.
react/html below:
Attached you will find a screenshot showing that the element does have the "light" theme but the properties of the "dark" theme are not overridden
Expected behavior
Well, i expected the element that got the light theme tag to implement it along with the child elements
To Reproduce
add data-bs-theme="dark" to the html tag
add data-bs-theme="light" to an element
hopefully it does work for you
Reproducible Example
https://codesandbox.io/s/interesting-ride-s38jps?file=/src/App.js
Screenshots
What operating system(s) are you seeing the problem on?
Linux
What browser(s) are you seeing the problem on?
Chrome, Firefox
What version of React-Bootstrap are you using?
2.9.0
What version of Bootstrap are you using?
5.3.2
Additional context
No response
The text was updated successfully, but these errors were encountered: