Say you are loading a Foundation/Bootstrap library for a widet and don't want them affecting the rest of the page. This Grunt plugin will prefix all selectors in input CSS file with your custom one.
Quick start
Example Gruntfile.coffee
:
= gruntinitConfig pkg: gruntfilereadJSON "package.json" sandbox_css: foundation: files: 'build/foundation.sandboxed.css': 'src/foundation.css' options: # E.g.: .row -> .foundation .row prefix: '.foundation' # Selectors where we do not prefix. blacklist: 'html''body' gruntloadNpmTasks'grunt-sandbox-css' gruntregisterTask'default' 'sandbox_css'