I would suggest manually adding both themes into a CSS Scope using the >
operator which is explained very well in this post.
For example, for bootstrap button class:
.light > // This is the Scope
.btn {
...
}
}
This way, you can use the following syntaxes:
<div class="light">
<a href="#" class="btn btn-primary">Light Themed Link</a>
</div>
<div class="dark">
<a href="#" class="btn btn-primary">Dark Themed Link</a>
</div>
Since > means Direct Child, it only affects the childs inside the marked Scope Element. This means that you don't have to repeat class"light"
or class="dark"
in every element you want to stylize. Instead you select a Scope, it may be body, or a div, or even a span, and then you use bootstrap classes as usual.
You can do this manually but I'd suggest you using LESS
which already comes integrated with latest bootstrap source code or SASS
which you can find here.
Maybe there is a better option, but this is the only I can think about right now.