pakastin / prefix

CSS auto-prefix in < 0.5 KB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

js-semistandard-style npm Twitter Follow

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>

License

MIT

About

CSS auto-prefix in < 0.5 KB

License:MIT License


Languages

Language:JavaScript 100.0%