I'm wondering what's the best way to namespacing bootstrap 3 CSS classes using a prefix.
This question isn't just about namespacing bootstrap so it applies only in a specific container (see here: How to namespace Twitter Bootstrap so styles don't conflict), but to litterally change all generated CSS classes using a predefined prefix.
I started to add the prefix pl-
in the LESS files almost everywhere, but I must be missing some things because I break some part of the styling. So I'm looking for a smarter solution...
For instance, the .alert
class in alerts.less
must become .pl-alert
.
The point of doing this is that I'm writing a plugin which can be used by other people (included in their website) and I must avoid that they override my styles by mistake (they probably have a .alert
class which would be merged with mine and making a mess), so I want to avoid that by using a specific prefix.