How to use the icss-utils.replaceValueSymbols function in icss-utils

To help you get started, we’ve selected a few icss-utils 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 makuga01 / dnsFookup / FE / node_modules / postcss-modules-values / src / index.js View on Github external
const addDefinition = atRule => {
      let matches;
      while ((matches = matchValueDefinition.exec(atRule.params))) {
        let [, /*match*/ key, value] = matches;
        // Add to the definitions, knowing that values can refer to each other
        definitions[key] = ICSSUtils.replaceValueSymbols(value, definitions);
        atRule.remove();
      }
    };
github css-modules / postcss-icss-values / src / index.js View on Github external
const addExports = (node, name, value) => {
    if (isForbidden(name)) {
      result.warn(`Dot and hash symbols are not allowed in value "${name}"`, {
        node
      });
    }
    if (valuesExports[name]) {
      result.warn(`"${name}" value already declared`, { node });
    }
    valuesExports[name] = replaceValueSymbols(value, valuesExports);
  };
github kaliberjs / build / library / postcss-plugins / postcss-import-export-parser.js View on Github external
Object.entries(icssExports).forEach(([key, rawValue]) => {
      const value = replaceValueSymbols(rawValue, importedValues)
      result.messages.push({
        plugin,
        type: 'export',
        item: { key, value },
      })
    })
  }
github css-modules / postcss-icss-values / src / index.js View on Github external
Object.keys(icssExports).forEach(key => {
    icssExports[key] = replaceValueSymbols(icssExports[key], scopedAliases);
  });

icss-utils

ICSS utils for postcss ast

ISC
Latest version published 4 years ago

Package Health Score

71 / 100
Full package analysis