You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
385 B
21 lines
385 B
|
2 years ago
|
'use strict';
|
||
|
|
|
||
|
|
/** @typedef {import('postcss').Declaration} Declaration */
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @param {Declaration} decl
|
||
|
|
* @param {string} value
|
||
|
|
* @returns {Declaration} The declaration that was passed in.
|
||
|
|
*/
|
||
|
|
module.exports = function setDeclarationValue(decl, value) {
|
||
|
|
const raws = decl.raws;
|
||
|
|
|
||
|
|
if (raws.value) {
|
||
|
|
raws.value.raw = value;
|
||
|
|
} else {
|
||
|
|
decl.value = value;
|
||
|
|
}
|
||
|
|
|
||
|
|
return decl;
|
||
|
|
};
|