12.0.3 • Published 4 years ago

@fela-next/fela-plugin-important v12.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

fela-plugin-important

Adds !important to every declaration value except animations item and keyframes. This helps to force specificity over third-party libraries. Animation items and keyframes with !important disrupt functionality of animations. More about.

Installation

yarn add fela-plugin-important

You may alternatively use npm i --save fela-plugin-important.

Usage

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

import { createRenderer } from '@fela-next/fela'
import important from '@fela-next/fela-plugin-important'

const renderer = createRenderer({
  plugins: [ important() ]
})

Example

Input

{
  width: '25px',
  display: [ '-webkit-flex', 'flex' ],
  fontWeight: 'normal'
}

Output

{
  width: '25px!important',
  display: [ '-webkit-flex!important', 'flex!important' ],
  fontWeight: 'normal!important'
}

License

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

12.0.3

4 years ago

12.0.2

4 years ago

12.0.1

4 years ago