Fela plugin to support javascript-friendly pseudo class syntax
npm install fela-plugin-friendly-pseudo-classWriting CSS pseudo classes within a plain JavaScript object sadly is sometimes painful as the default syntax is not really JavaScript-friendly.
This plugins provides support for JavaScript-friendly pseudo class syntax with an on-prefix. e.g.
``sh`
yarn add fela-plugin-friendly-pseudo-class
You may alternatively use npm i --save fela-plugin-friendly-pseudo-class.
Make sure to read the documentation on how to use plugins.
`javascript
import { createRenderer } from 'fela'
import friendlyPseudoClass from 'fela-plugin-friendly-pseudo-class'
const renderer = createRenderer({
plugins: [friendlyPseudoClass()],
})
`
#### Input
`javascript`
{
onHover: {
color: 'red'
}
}
#### Output
`javascript``
{
':hover': {
color: 'red'
}
}
Fela is licensed under the MIT License.
Documentation is licensed under Creative Commons License.
Created with ♥ by @robinweser and all the great contributors.