npm

Need private packages and team management tools?Check out npm Orgs. »

fela-plugin-friendly-pseudo-class

10.6.1 • Public • Published

fela-plugin-friendly-pseudo-class

npm version npm downloads Bundlephobia

Writing 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.

Installation

yarn add fela-plugin-friendly-pseudo-class

You may alternatively use npm i --save fela-plugin-friendly-pseudo-class.

Usage

Make sure to read the documentation on how to use plugins.

import { createRenderer } from 'fela'
import friendlyPseudoClass from 'fela-plugin-friendly-pseudo-class'
 
const renderer = createRenderer({
  plugins: [ friendlyPseudoClass() ]
})

Example

Input

{
  onHover: {
    color: 'red'
  }
}

Output

{
  ':hover': {
    color: 'red'
  }
}

License

Fela is licensed under the MIT License.
Documentation is licensed under Creative Common License.
Created with ♥ by @rofrischmann and all the great contributors.

install

npm i fela-plugin-friendly-pseudo-class

Downloadsweekly downloads

1,411

version

10.6.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability