0

I have developed a WordPress plugin and now want to change its layout using bootstrap CSS and js. I've had problems with CSS naming before and want to make sure that I avoid namespace conflicts before integrating bootstrap. How can this be done without renaming the whole bootstrap CSS names?

Thanks

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880

1 Answers1

0

You mentioned this is a plugin, but without knowing if it is personal or commercial, I will assume it will be used in different templates with different styles. Without eyes on your project, my only suggestion would be to namespace your plugin style. This is easy since bootstrap is compiled from LESS, and LESS supports namespaces. Just use something similar to the following and recompile the bootstrap LESS for your plugin.

Rather than explain these two answers seem to address the issue at hand:

Prefixing all selectors for twitter bootstrap in less

wrap a .less css definitions in a namespace

Community
  • 1
  • 1