Properties for the new node.
New at-rule node.
Creates a new Comment
node.
Properties for the new node.
New comment node
Creates a new Declaration
node.
Properties for the new node.
New declaration node.
Creates a new Document
node.
Properties for the new node.
New document node.
Rehydrate a JSON AST (from Node#toJSON
) back into the AST classes.
const json = root.toJSON()
// save to file, send by network, etc
const root2 = postcss.fromJSON(json)
Rehydrate a JSON AST (from Node#toJSON
) back into the AST classes.
const json = root.toJSON()
// save to file, send by network, etc
const root2 = postcss.fromJSON(json)
Parses source css and returns a new Root
or Document
node,
which contains the source CSS nodes.
// Simple CSS concatenation with source map support
const root1 = postcss.parse(css1, { from: file1 })
const root2 = postcss.parse(css2, { from: file2 })
root1.append(root2).toResult().css
Creates a new
AtRule
node.