import { postcss } from "https://deno.land/x/bundler@0.6.5/deps.ts";
const { Node } = postcss;
Returns a CssSyntaxError
instance containing the original position
of the node in the source, showing line and column numbers and also
a small excerpt to facilitate debugging.
If present, an input source map will be used to get the original position of the source, even from a previous compilation step (e.g., from Sass compilation).
This method produces very useful error messages.
if (!variables[name]) {
throw decl.error(`Unknown variable ${name}`, { word: name })
// CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black
// color: $black
// a
// ^
// background: white
}
Returns
Error object to throw it.