Skip to content

shahidullahkhankhattak/css-vars-ponyfill-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

Css Vars Ponyfill React

N|Solid

Build Status

npm module to remove problems of css vars in un supported browsers e.g Internet explorer 9+

Installation

run following command:

> npm install css-vars-ponyfill-react --save

Usage

in your main index.js or app.js file use

import { CssVarsPonyfill } from 'css-vars-ponyfill-react'

and call the function anywhere in your index.js or app.js code

CssVarsPonyfill()

and if you add external stylesheets as well (mostly required in prod builds) just use it as:

CssVarsPonyfill({
    externalStyleSheets: true
})

in case anything goes wrong, you can get the error message with the following callback function.

CssVarsPonyfill({
    externalStyleSheets: true,
    onError: (error) => {
        // your logic here
    }
})

About

This package is used to provide css variables ponyfill for internet explorer. As IE doesn't support css variables. This easy to use library can fix it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published