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
I've encountered an issue when using the form-switch component in Bootstrap. When changing from the "dark" theme to the "light" theme, switches do not display correctly if they were previously used within the "dark" theme. This particularly happens when the switches are unchecked in the "light" theme.
Steps to Reproduce the Problem:
Set the overall page theme to "dark" (<body data-bs-theme="dark">).
Use the form-switch component within a container that has a different specific theme, for example: <div data-bs-theme="light">.
Thanks for reporting this issue @maikycourse
Indeed we spotted an issue with some use cases when data-bs-theme="light" is used within data-bs-theme="dark" mostly in cases like this one where we have the following, but not the corresponding "rollback" for light mode:
I haven't dug into this specific issue too much, but I think this can be fixed in the same batch as what's suggested in #39295; a fix in the same spirit relying on :root CSS vars.
I'll try some things and link my PR to this issue if it can be fixed simultaneously.
Prerequisites
Describe the issue
I've encountered an issue when using the form-switch component in Bootstrap. When changing from the "dark" theme to the "light" theme, switches do not display correctly if they were previously used within the "dark" theme. This particularly happens when the switches are unchecked in the "light" theme.
Steps to Reproduce the Problem:
<body data-bs-theme="dark">
).<div data-bs-theme="light">
.Reduced test cases
What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
v5.3.2
The text was updated successfully, but these errors were encountered: