How to use the free-style.stringHash function in free-style

To help you get started, we’ve selected a few free-style 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 FractalBlocks / Fractal.js / lib / utils / style.js View on Github external
function createStyle(styles, name, scope = '') {
  let namespace = ''
  return {
    Style: FreeStyle.create(s => `_${namespace}__${FreeStyle.stringHash(s)}`),
    container: createModuleStylesContainer(styles, name, scope),
    setNamespace: ns => namespace = ns,
  }
}

free-style

Make CSS easier and more maintainable by using JavaScript

MIT
Latest version published 11 months ago

Package Health Score

64 / 100
Full package analysis