Shortcut to fix conflicting stylesheets

I’m using some third party code that has their own stylesheets. Many of its CSS definitions are conflicting with my navigation elements. To fix it, I wrapped their code in a <div id=“theirCode”> and did this to their stylesheet:


#theirCode .theirStyle1 { ... }
#theirCode #theirStyle2 { ... }
#theirCode table { ... }

But they have nearly thousands of these definitions. Is there a shortcut to do something similar to this?:


#theirCode {
   .theirStyle1 {...}
   #theirStyle2 {...}
   table {...}
}