How to properly Introduce themes like dark and light themes In Bootstrap 5. Should it be done by css/scss or js or with both of them. Should we overwrite classes with a css file like dark.css? Should we switch classes like bg-dark, bg-light etc with js? I tried this answer, but I think there is a way that meet all needs. The other question is if we want more than two themes other than dark/white what should we do then?
CodePudding user response:
Implementing dark mode for bootstrap is a long task as there are multiple variables that need to be changed.The simplier aproach will be using var() with .dark/.light in root, but still there are functions of bootstrap that needs a color to function properly.