How to use the css-tree.fromPlainObject function in css-tree

To help you get started, we’ve selected a few css-tree 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 peterbe / minimalcss / hack.js View on Github external
Object.keys(cleaned).forEach(url => {
    // console.log('For URL', url);
    const obj = cleaned[url]
    const cleanedAst = csstree.fromPlainObject(obj)
    const cleanedCSS = csstree.translate(cleanedAst)
    console.log(cleanedCSS)
  })
github wookaoer / page-skeleton-core / src / skeletonCore.js View on Github external
const allCleanedCSS = cleanedCSS.map((ast) => {
            const cleanedAst = fromPlainObject(ast);
            return generate(cleanedAst)
        }).join('\n');
        const finalCss = collectImportantComments(allCleanedCSS);
github marktext / marktext / src / muya / lib / utils / exportStyledHTML.js View on Github external
const cleanedStyles = styleSheets.map(ast => {
      const cleanedAST = fromPlainObject(cleaner(ast, checker))
      return generate(cleanedAST)
    })
    const finalCSS = collectImportantComments(cleanedStyles.join('\n'))
github ElemeFE / page-skeleton-webpack-plugin / src / skeleton.js View on Github external
const allCleanedCSS = cleanedCSS.map((ast) => {
      const cleanedAst = fromPlainObject(ast)
      return generate(cleanedAst)
    }).join('\n')