This approach is now deprecated. Instead, have a look at my CSS Modules Example.
PostCSS Local Scope Example
A small working example of postcss-local-scope.
This project is most notably using the following tools:
Run the example
$ npm install
$ npm start & open http://localhost:8080