UNPKG

738 BJavaScriptView Raw
1import { __decorate } from "tslib";
2import { singleton } from 'mana-syringe';
3import { parseColor, mergeColors } from '../parser';
4import { CSSKeywordValue, CSSRGB } from '../cssom';
5/**
6 * opacity
7 */
8
9var CSSPropertyColor =
10/** @class */
11function () {
12 function CSSPropertyColor() {
13 this.parser = parseColor;
14 this.mixer = mergeColors;
15 }
16
17 CSSPropertyColor.prototype.calculator = function (name, oldParsed, parsed, object, registry) {
18 if (parsed instanceof CSSKeywordValue) {
19 // 'unset' 'none'
20 return new CSSRGB(0, 0, 0, 0, parsed.value === 'none');
21 }
22
23 return parsed;
24 };
25
26 CSSPropertyColor = __decorate([singleton()], CSSPropertyColor);
27 return CSSPropertyColor;
28}();
29
30export { CSSPropertyColor };
\No newline at end of file