I have built a HTML5 tool that used to be on a stand alone page. A client wants to include it in their page, but is concerned about CSS conflicts.
I would like to put my tool in a wrapper div with a class of say 'customtool' and then preface every CSS selector with .customtool I have a number of stylesheets and the total number of selectors is high. I am aware of the risk of human error with a manually amending the selectors.
Obviously I cannot simply target '.' or '#' as it would not work for a selector like .wrapper .content.customclass #div
In this instance I would like
.customtool .wrapper .content.customclass #div
but replacing '.' with '.customtool .' and '#' with '.customtool #' would give .customtool .wrapper .customtool .content.customtool. customclass .customtool #div
How would you go about making an automated procedure to a add the selector in front of every rule?