How do I limit Bootstrap to just the scope of a div? I need to nest the Bootstrap stylesheet inside an ExtJS app for especific divs and both are clashing since they need the
Expanding on @Andrew Homeyer answer:
I got scoped styling of boostrap working in my Reactjs app by doing the following:
Bootstrap uses Grunt for its build system, with convenient methods for working with the framework. It's how we compile our code, run tests, and more.
Installing Grunt: To install Grunt, you must first download and install node.js (which includes npm). npm stands for node packaged modules and is a way to manage development dependencies through node.js.
Then, from the command line: Install grunt-cli globally with
npm install -g grunt-cli. Navigate to the root /bootstrap/ directory, then runnpm install. npm will look at the package.json file and automatically install the necessary local dependencies listed there. When completed, you'll be able to run the various Grunt commands provided from the command line.
less/bootstrap.less from the downloaded source to the following:.bootstrap-scope {...pasted all @imports here...}
grunt dist and copied the new dist folder into my projectimport './styling/bootstrap/css/bootstrap.min.css';.Similar discussion here