@stylistic/stylelint-plugin
Version:
A collection of stylistic/formatting Stylelint rules
11 lines (9 loc) • 316 B
JavaScript
/**
* Gets the value of a CSS declaration.
* @param {import('postcss').Declaration} decl - The CSS declaration node.
* @returns {string} The declaration value, including raw whitespace.
*/
export function getDeclarationValue (decl) {
let raws = decl.raws
return (raws.value && raws.value.raw) || decl.value
}