twbs / bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

Home Page:https://getbootstrap.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Docs] Colour modes for individual elements

lonix1 opened this issue · comments

I wanted a light theme with some dark elements, so I applied data-bs-theme="dark" to those elements.

However that didn't change anything. So I also added either class="text-bg-dark" or class="bg-dark text-light", which worked - but I knew that was a hack.

Only after looking at the source for that "blue example" did I realise that one must do this:

<div data-bs-theme="dark" class="text-body bg-body">
  ...
</div>

That should probably be in the docs, it is fundamental.