Bootstrap: Dark theme for Bootstrap v5

Created on 25 Jun 2020  路  5Comments  路  Source: twbs/bootstrap

Nowadays, dark theme is very important and is beneficial to your vision (quoted from rxoptical.com)

Dark mode can reduce eye strain in low-light conditions. 100% contrast (white on a black background) can be harder to read and cause more eye strain. It can be harder to read long chunks of text with a light-on-dark theme

So I was thinking, why not have an option for dark theme? I know this is possible already with just changing the variables file or using Bootswatch, but other frameworks support an actual dark theme option. It could be as easy as adding darktheme="true" to the tag, etc. I would love to see this supported in Bootstrap 5.

feature

Most helpful comment

copy of #27514

All 5 comments

copy of #27514

yeah, pretty nice feature it would be, also a button class along with it for toggling will be nice.

You can already use bg-dark + text-light BTW

Duplicate of #27514.

It would be nice if you just can add the dark-mode class on the body tag.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tiendq picture tiendq  路  3Comments

ziyi2 picture ziyi2  路  3Comments

eddywashere picture eddywashere  路  3Comments

knownasilya picture knownasilya  路  3Comments

cvrebert picture cvrebert  路  3Comments