Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
[Standup][SF] 3/28/2012

Interesting

A project is moving from their initial layouts to Bootstrap. They have quite a few class name conflicts in their css, so in order to isolate the new Bootstrap styles to specific elements, they added the Bootstrap styles to their own (in SASS) under a .bootstrap namespace, and are nesting any new elements under divs with a class of .bootstrap, and now everything is pretty again.

Nesting in this way (rather than namespacing all of the preexisting css) ensures that no Bootstrap styling leaks into pre-existing elements, but means that occasionally a pre-Bootstrap style will leak into the new namespaced elements due to higher selector specificity.

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *