UNPKG

736 BJavaScriptView Raw
1import { __decorate } from "tslib";
2import { singleton } from 'mana-syringe';
3import { CSSKeywordValue } from '../cssom';
4
5var CSSPropertyText =
6/** @class */
7function () {
8 function CSSPropertyText() {}
9
10 CSSPropertyText.prototype.calculator = function (name, oldParsed, parsed, object) {
11 if (parsed instanceof CSSKeywordValue) {
12 if (parsed.value === 'unset') {
13 return '';
14 } else {
15 return parsed.value;
16 }
17 }
18
19 return parsed;
20 };
21
22 CSSPropertyText.prototype.postProcessor = function (object) {
23 object.nodeValue = "".concat(object.parsedStyle.text) || '';
24 };
25
26 CSSPropertyText = __decorate([singleton()], CSSPropertyText);
27 return CSSPropertyText;
28}();
29
30export { CSSPropertyText };
\No newline at end of file