1 | import { __decorate } from "tslib";
|
2 | import { singleton } from 'mana-syringe';
|
3 | import { parseColor, mergeColors } from '../parser';
|
4 | import { CSSKeywordValue, CSSRGB } from '../cssom';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | var CSSPropertyColor =
|
10 |
|
11 | function () {
|
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 |
|
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 |
|
30 | export { CSSPropertyColor }; |
\ | No newline at end of file |