setDeclarationValue.cjs 549 B

123456789101112131415161718192021222324
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. /** @typedef {import('postcss').Declaration} Declaration */
  5. /**
  6. * @param {Declaration} decl
  7. * @param {string} value
  8. * @returns {Declaration} The declaration that was passed in.
  9. */
  10. function setDeclarationValue(decl, value) {
  11. const raws = decl.raws;
  12. if (raws.value) {
  13. raws.value.raw = value;
  14. } else {
  15. decl.value = value;
  16. }
  17. return decl;
  18. }
  19. module.exports = setDeclarationValue;