A simple utility to automatically add vendor prefixes to CSS properties in JavaScript styling solutions.
npm install autoprefixer-css-js
Import the autoprefix_with_styles
function and use it to add prefixes to your style objects.
import auto_prefix_with_styles from 'css-in-js-autoprefixer';
const userStyles = {
transition: 'all 0.3s ease',
userSelect: 'none',
boxSizing: 'border-box',
};
const prefixedStyles = autoprefix_with_styles(userStyles);
- Supports common CSS properties that require vendor prefixes.
- Easy to use with any CSS-in-JS library.
Contributions are welcome! Please feel free to submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.