Make all rules in a CSS file apply only to descendants of id -


I have a CSS with a group of rules I have found that these rules conflict with other parts of my application Are there. The solution is to create rules that descend only a specific ID (directly or not):

   

But with all the rules (dozens of them!) With the # theisone selector in the CSS file, it will be very ugly before! Is there a better way?

I use to help with such things I also use a piece of software Is said to be.

If you find out how it works, let's take your example.

less (and before compiling)

  #thisOne {p {Color: red; }}  

You can add to the rule according to your needs i.e.:

  #thisOne {width: 300px; Margin-left: 50px; H1 {font-weight: lighter; color blue; } P {color: red; }}  

You can do a lot more than this. Check it out. I have become a convert


Comments