Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
method default.prototype.raw
import { default } from "https://deno.land/x/postcss@8.4.16/lib/node.js";

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.