0

I'm adding bootstrap to an existing project. For the time being I only want bootstrap for the tabs. If I include the entire bootstrap CSS file, though, it breaks half the CSS on my page.

Is it possible to just include the tabs css or possible just scope bootstrap to that specific element?

Siguza
  • 21,155
  • 6
  • 52
  • 89
  • may be No..it will affect to the whole page where you apply.. – sheshadri May 04 '15 at 14:59
  • This question might be of help: http://stackoverflow.com/questions/13966259/how-to-namespace-twitter-bootstrap-so-styles-dont-conflict – Nanne May 04 '15 at 15:00
  • Looks like that's the way to go but it'll still apply other styles I don't want. For example fonts. Really I just want the tab structure. –  May 04 '15 at 15:09

1 Answers1

1

Edit: I was being stupid. Bootstrap has a page where you can customize the components that should get included. You should use http://getbootstrap.com/customize/. What you need is probably this: http://getbootstrap.com/customize/?id=a0f9abe70f737ce00b5f

Old answer below.


Yes, you can compile your own stylesheet using SASS.

  1. Copy _bootstrap.scss and the bootstrap directory from this GitHub repository dir
  2. Comment out everything you don't need in _bootstrap.scss. Be careful, some SCSS files depend on other files.
  3. Compile _bootstrap.scss to CSS and use that in your project.

Alternatively, find a non-minified bootstrap CSS file, and copy all CSS selectors that you use in your project's templates to your project's CSS file.

Blaise
  • 13,139
  • 9
  • 69
  • 97