Skip to content

J-Kallunki/css-in-to-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@j-kallunki/css-in-to-js

travis build codecov coverage version downloads MIT License

Convert any CSS-string to Styled-format object or CSS-in-JS object with CSS-declarations as strings.

Usage

yarn add @j-kallunki/css-in-to-js
OR
npm install --save @j-kallunki/css-in-to-js
import { cssToJs } from '@j-kallunki/css-in-to-js';
const cssObject = cssToJs(cssString);

Settings

cssToString

If you wan't to get CSS-declarations in CSS-string format use:

const cssObject = cssToJs(cssString, { cssToString: true })

Tools

minifyCss()

Minify CSS-string

Acknowledgements

Uses PostCSS for parsing the CSS.

About

CSS to CSS-in-JS and Styled converter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •