JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9528
  • Score
    100M100P100Q119957F
  • License MIT

Transform a string of css rules into a style object

Package Exports

  • css-to-style

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (css-to-style) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

css-to-style

Transform a string of css rules into a style object.

Usage

import toStyle from 'css-to-style';

toStyle('font-size: 2em; color: #f00; margin-top: 4px');
// returns { fontSize: '2em', color: '#f00', marginTop: '4px' }