JSPM

stylesheet-helpers

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

Utilities to make it easier to work with CSS stylesheets.

Package Exports

  • stylesheet-helpers
  • stylesheet-helpers/src

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 (stylesheet-helpers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

stylesheet-helpers - Utilities to make it easier to work with CSS stylesheets.

  • create([document]) -> { styleSheetElement, styleSheet } - Creates and returns a new stylesheet.
  • updateProperties(document: <Document>, styleSheet: <StyleSheet>, className: <string>, properties: <field: value>) - Updates the properties of the given styleSheet based on the given className and properties.
  • findExistingRule(document: <Document>, styleSheet: <StyleSheet>, className: <string>) -> <CssRule|null> - Returns a rule from the given styleSheet based on the given className if it's found.

License

MIT.