Skip to main content
The Deno 2 Release Candidate is here
Learn more
Latest
method Node.prototype.clone
Re-export
import { Node } from "https://deno.land/x/postcss@8.4.16/lib/postcss.d.ts";

Returns an exact clone of the node.

The resulting cloned node and its (cloned) children will retain code style properties.

decl.raws.before    //=> "\n  "
const cloned = decl.clone({ prop: '-moz-' + decl.prop })
cloned.raws.before  //=> "\n  "
cloned.toString()   //=> -moz-transform: scale(0)

Parameters

optional
overrides: object

New properties to override in the clone.

Returns

this

Clone of the node.