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

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

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

Returns a Node#raws value. If the node is missing the code style property (because the node was manually built or cloned), PostCSS will try to autodetect the code style property by looking at other nodes in the tree.

const root = postcss.parse('a { background: white }')
root.nodes[0].append({ prop: 'color', value: 'black' })
root.nodes[0].nodes[1].raws.before   //=> undefined
root.nodes[0].nodes[1].raw('before') //=> ' '

Parameters

prop: string

Name of code style property.

optional
defaultType: string

Name of default value, it can be missed if the value is the same as prop.

Returns

string

Code style value.