https://github.com/pakastin/prefix
CSS auto-prefix in < 0.5 KB
https://github.com/pakastin/prefix
css javascript prefix
Last synced: about 1 year ago
JSON representation
CSS auto-prefix in < 0.5 KB
- Host: GitHub
- URL: https://github.com/pakastin/prefix
- Owner: pakastin
- License: mit
- Created: 2017-01-07T12:13:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-04-28T18:46:33.000Z (about 4 years ago)
- Last Synced: 2025-02-28T14:47:35.639Z (over 1 year ago)
- Topics: css, javascript, prefix
- Language: JavaScript
- Homepage:
- Size: 51.8 KB
- Stars: 20
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/Flet/semistandard)
[](https://www.npmjs.com/package/@pakastin/prefix)
[](https://twitter.com/pakastin)
# prefix
CSS auto-prefix in < 0.5 KB (before GZIP)
## install
npm install @pakastin/prefix
## usage
```js
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
```html
prefix(...)
```
## License
[MIT](https://github.com/pakastin/prefix/blob/master/LICENSE)