Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
method default.prototype.showSourceCode
import { default } from "https://deno.land/x/postcss@8.4.16/lib/css-syntax-error.d.ts";

Returns a few lines of CSS source that caused the error.

If the CSS has an input source map without sourceContent, this method will return an empty string.

error.showSourceCode() //=> "  4 | }
                       //      5 | a {
                       //    > 6 |   bad
                       //        |   ^
                       //      7 | }
                       //      8 | b {"

Parameters

optional
color: boolean

Whether arrow will be colored red by terminal color codes. By default, PostCSS will detect color support by process.stdout.isTTY and Deno.env.get("NODE_DISABLE_COLORS").

Returns

string

Few lines of CSS source that caused the error.