Prefixing all selectors for twitter bootstrap in less

To avoid the problems mentioned in periklis’s answer: create your own prefixed-bootstrap.less that re-compiles the compiled bootstrap.css in :

.bootstrap {
  @import (less) 'dist/css/bootstrap.css';
  @import (less) 'dist/css/bootstrap-theme.css'; /* optional */
}

No need for sed commands then. The observations mentioned in Lars Nielsen’s answer are of course still valid.

Leave a Comment