fela-plugin-pseudo-prefixer
v12.2.1
Published
Fela plugin to add prefixes to pseudo elements and classes
Downloads
17,818
Maintainers
Readme
fela-plugin-pseudo-prefixer
Adds prefixes to pseudo elements and classes.
Installation
yarn add fela-plugin-pseudo-prefixer
You may alternatively use npm i --save fela-plugin-pseudo-prefixer
.
Usage
Make sure to read the documentation on how to use plugins.
import { createRenderer } from 'fela'
import pseudoPrefixer from 'fela-plugin-pseudo-prefixer'
const renderer = createRenderer({
plugins: [ pseudoPrefixer(':fullscreen', [
':-webkit-full-screen',
':-moz-full-screen',
':-ms-fullscreen',
':full-screen',
':fullscreen',
])
})
Example
Input
{
color: 'red',
':fullscreen': {
color: 'green'
}
}
Output
{
color: 'red',
':-webkit-full-screen': {
color: 'green',
},
':-moz-full-screen': {
color: 'green',
},
':-ms-fullscreen': {
color: 'green',
},
':full-screen': {
color: 'green',
},
':fullscreen': {
color: 'green',
},
}
License
Fela is licensed under the MIT License. Documentation is licensed under Creative Common License. Created with ♥ by @robinweser and all the great contributors.