import { Warning } from "https://deno.land/x/postcss@8.4.16/lib/postcss.js";
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
Column for inclusive start position in the input file with this warning’s source.
warning.column //=> 6
Column for exclusive end position in the input file with this warning’s source.
warning.endColumn //=> 4
Line for exclusive end position in the input file with this warning’s source.
warning.endLine //=> 6
Line for inclusive start position in the input file with this warning’s source.
warning.line //=> 5
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'