@pakastin/prefix
v1.2.1
Published
CSS auto-prefix
Downloads
6
Readme
prefix
CSS auto-prefix in < 0.5 KB (before GZIP)
install
npm install @pakastin/prefix
usage
import prefix from '@pakastin/prefix';
const TRANSFORM = prefix('transform');
const TRANSITION = prefix('transition');
const translate = (x, y) => `translate(${x}px, ${y}px)`;
const el = document.createElement('p');
el.style[TRANSITION] = `${TRANSFORM} .2s`;
el.style[TRANSFORM] = translate(100, 0);
oldskool
<script src="https://pakastin.github.io/prefix/prefix.min.js"></script>
<script>prefix(...)</script>