I am looking for a way to automatically prefix all css selectors with a class. For example, css files contains :
.someclass1{...}
.someclass2 button span{...}
And output would look like this :
.prefixclass .someclass1{...}
.prefixclass .someclass2{...}
Looked at LESS and SASS, both do not seem to be doing this :
.prefixclass{
@import 'file.css'
}
Reason for this is because I want to import user-side css styles in a wysiwyg editor I have made, and it needs the CSS to be applied only to inner editor area, not the whole page.
I would like something that I can input a file to it in command line mode, or even in PHP.