How to use the styletron-core.assignDecl function in styletron-core

To help you get started, we’ve selected a few styletron-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github styletron / styletron / packages / styletron-client / src / index.js View on Github external
hydrateCacheFromCssString(css, media) {
    let decl;
    // {
    //  1: className,
    //  2: pseudo,
    //  3: block,
    // }
    while ((decl = DECL_REGEX.exec(css))) {
      super.incrementVirtualCount();
      StyletronCore.assignDecl(
        this.cache,
        {
          block: decl[3],
          pseudo: decl[2],
          media,
        },
        decl[1]
      );
    }
  }

styletron-core

Universal, high-performance JavaScript styles

MIT
Latest version published 7 years ago

Package Health Score

53 / 100
Full package analysis

Popular styletron-core functions

Similar packages