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

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

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

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.