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

Returns the previous child of the node’s parent. Returns undefined if the current node is the first child.

const annotation = decl.prev()
if (annotation.type === 'comment') {
  readAnnotation(annotation.text)
}

Returns

ChildNode | undefined

Previous node.