CSS mirroring tool ✨
in the world of UI, locale-aware design in something hard to do. but Lox makes this easy by reflecting CSS values.
Not published yet!
npm i loxcss
const loxcss = require('loxcss');
const css = `body{
margin-left: 5px
}`;
loxcss(css)
/*
the result is:
body{
margin-right: 5px
}
and that's amazing ✨
*/
Lox comes with a CLI tool inside.
Usage: cli [options] <target>
Options:
-v, --version output the version number
-o, --output <filename> specify the output file
-S, --nostream disable output streaming
-h, --help output usage information
loxcss test.css
# result will be saved to test.lox.css
if you turn on this option, CLI will use fs.writeFile
instead of fs.createWriteStream
:
loxcss test.css --nostream
loxcss test.css -o transformed
# result will be saved to transformed.css
Lox can transform these CSS properties:
- Anything containing
-left
or-right
(likepadding-right
) direction
text-align
margin
andpadding
(top right bottom left
)float
right
left
border-radius
if 4 values are assigned (0px 1px 2px 3px
)
If you found any issues on this, just report it.