createPrefixer(data, staticFallback)

Creates a custom Prefixer class with your custom browser support range. It should be used together with generateData provided by inline-style-prefixer/generator to generate the required data.

Arguments

  1. data (Object): An object containing the prefixMap and plugins list
    - (generated with inline-style-prefixer/generator - check how to generate your own)
  2. staticFallback (Function): A static prefixer which is used as a fallback
    - (It should be generated using the inline-style-prefixer/generator together with the static createPrefixer)

Returns

(class): Returns a custom Prefixer class.

Example

import createPrefixer from 'inline-style-prefixer/dynamic/createPrefixer'

import dynamicData from './generatedData'
import staticFallback from './staticFallback'

export default createPrefixer(
  dynamicData,
  staticFallback
)

which can the be used e.g.

import Prefixer from './customPrefixer'

const prefixer = new Prefixer({
  userAgent: '',
  keepUnprefixed: false
})

const prefixed = prefixer.prefix({
  transition: '300ms all linear',
  flex: 1
})

results matching ""

    No results matching ""