Skip to content

Instantly share code, notes, and snippets.

@SystemZ
Created January 21, 2016 11:45
Show Gist options
  • Save SystemZ/b98aabf23233642e15f8 to your computer and use it in GitHub Desktop.
Save SystemZ/b98aabf23233642e15f8 to your computer and use it in GitHub Desktop.
Prefix bootstrap to prevent conflicts in wordpress plugin
https://formden.com/blog/isolate-bootstrap
sudo npm install less -g
prefix.less
.superbootstart {
@import (less) 'bootstrap.css';
@import (less) 'bootstrap-theme.css'; /* optional */
}
lessc prefix.less superbootstart.css
superbootstart.css
replace:
.superbootstart body
and
.superbootstart html
to
.superbootstart
then use it like this
<div class="superbootstart">
<div class="btn btn-primary">Test button</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment