jc

json-css

Utility to convert Cascading Style Sheets (CSS) to JSON objects and vice versa.

Showing:

Popularity

Downloads/wk

1K

GitHub Stars

4

Maintenance

Last Commit

4yrs ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

0.9KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

JSON-CSS | CSS-JSON

Utility to convert Cascading Style Sheets (CSS) to JSON objects and vice versa.

npm version

TRY HERE

  • Yet to support media queries
  • Yet to support Files

Import:

  • Installing with NPM

      npm install json-css --save
      
    
  • Import in es6

      import JsonCSS from 'json-css';
      
    
  • Import through require in es5

      var JsonCSS = require('json-css');
      
    

Usage

  • to JSON with CSS as input type string

      JsonCSS.toJSON(`
          h1 {
              color: #F1F1F1;
          }
      `);
      
    
  • to CSS with JSON as input type object

      JsonCSS.toCSS({
          h1: {
              color: "#F1F1F1"
          }
      });
    

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100