Sort css values no matter the unit. Originally written by @jxnblk.
npm i -S css-unit-sort
const cssUnitSort = require('css-unit-sort')
cssUnitSort([
'2rem', 'inherit', 'small', '12px', '20px', '60px', '1.5em'
]) // => ['60px', '2rem', '1.5em', '20px', 'inherit', 'small', '12px']
MIT
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Crafted with <3 by John Otander (@4lpine).
This package was initially generated with yeoman and the p generator.