semantic-ui-fixer is a simple postcss plugin that converts Sementic UI attribute selectors into multiple class selectors.
Before:
/* ... */
.ui.cards > .card [class*="left aligned bottom"] { a: 1 }
/* ... */After:
/* ... */
.ui.cards > .card .left.aligned.bottom { a: 1 }
/* ... */- Download this repo
- In the repo dir, type
sudo npm install, thensudo npm link - In your project dir, type
sudo npm link semantic-ui-fixer - In your gulpfile.js,
// this requires postcss plugin. => `sudo npm install gulp-postcss --save-dev` first
var postcss = require("gulp-postcss");
var suf = require("semantic-ui-fixer");
// in your build pipeline,
// ....
.pipe(postcss([suf]))
// ....// in your build pipeline,
// ....
.pipe(postcss([suf({sep: "__"})]))
// ....Before:
/* ... */
.ui.cards > .card [class*="left aligned bottom"] { a: 1 }
/* ... */After:
/* ... */
.ui.cards > .card .left__aligned__bottom { a: 1 }
/* ... */