This is the main content.
Open itchyny opened 1 year ago
Hi @itchyny, can you tell us which theme has this problem and share a screenshot if possible?
I'm using cosmo theme.
This is the main content.
I recommend adding a class like .bg-body-tertiary
or the attribute data-bs-theme="dark"
to the navbar itself as described here in the docs:
https://getbootstrap.com/docs/5.3/components/navbar/#color-schemes
As shown above, color mode styles are controlled by the data-bs-theme attribute. This attribute can be applied to the element, or to any other element or Bootstrap component. If applied to the
<html>
element, it will apply to everything. If applied to a component or element, it will be scoped to that specific component or element. https://getbootstrap.com/docs/5.3/customize/color-modes/
I think the attribute of html element should be respected as well. What do you reccomend to implement theme toggle switch?
Another reference of Bootstrap support for color modes: https://github.com/twbs/bootstrap/blob/v5.3.0/site/content/docs/5.3/customize/color-modes.md.
This is caused by the upstream bug so explained here https://github.com/twbs/bootstrap/pull/38807#issuecomment-1615801140.
When the
data-bs-theme=dark
attribute is added to thehtml
tag, the hover color of navbar remains dark color and the links are invisible. This is likely caused by.navbar[data-bs-theme=dark]
, where it should be[data-bs-theme=dark] .navbar
.