Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/bundler/deps.ts>postcss.Node#clone

A Bundler with the web in mind.
Go to Latest
method postcss.Node.prototype.clone
Re-export
import { postcss } from "https://deno.land/x/bundler@0.6.5/deps.ts";
const { Node } = postcss;

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.