import { postcss } from "https://deno.land/x/bundler@0.6.5/deps.ts";
const { Warning } = postcss;
Represents a plugin’s warning. It can be created using Node#warn
.
if (decl.important) {
decl.warn(result, 'Avoid !important', { word: '!important' })
}
Constructors
new
Warning(text: string, opts?: WarningOptions)Properties
node: Node
Contains the CSS node that caused the warning.
warning.node.toString() //=> 'color: white !important'
The name of the plugin that created this warning.
When you call Node#warn
it will fill this property automatically.
warning.plugin //=> 'postcss-important'