Conversation
|
This solution doesn't address if an intermediate parent element has It seems like |
|
My first feedback is the same as @voltaek regarding intermediate <html data-bs-theme="dark">
<div data-bs-theme="light">
<div class="carousel">...</div>
</div>
</html>Going to try to think about another approach but I don't think about something else right now 🤔 |
|
We might just need to remove the nesting for v5 and revisit in v6. I know there was an issue or PR that tried to address this in the past from a contributor—it basically quadrupled the number of selectors. Can't find the link now though. |
If we don't find a proper solution in v5, I'm down to remove the nesting in v5 and try to tackle it entirely in v6. IMO I'd say that this limitation would be better identified by the users in terms of communication if we do it like this. |
|
Removing the docs section in #38192. |
Something we've overlooked is how to properly nest light mode inside a parent dark mode. I ran into this while updating the examples to better support color modes. Basically, if you have the root set to dark mode and you want something like our carousel to appear in light mode, doing the following won't work:
This is because we have no selector for
[data-bs-theme="dark"] .carousel { ... }in our codebase. We only have.carousel { ... }. As such, this PR suggests a potential solution we could use across the carousel component and other components: use a:not()selector in the selector.The same changes might need to be applied to accordions, dropdowns, close button, navbars, form checks, and form selects (all places we call the color mode mixin right now).
Thoughts?