source: imaps-frontend/node_modules/html2canvas/dist/lib/css/property-descriptors/text-shadow.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 5 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.6 KB
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.textShadow = void 0;
4var parser_1 = require("../syntax/parser");
5var length_percentage_1 = require("../types/length-percentage");
6var color_1 = require("../types/color");
7var length_1 = require("../types/length");
8exports.textShadow = {
9 name: 'text-shadow',
10 initialValue: 'none',
11 type: 1 /* LIST */,
12 prefix: false,
13 parse: function (context, tokens) {
14 if (tokens.length === 1 && parser_1.isIdentWithValue(tokens[0], 'none')) {
15 return [];
16 }
17 return parser_1.parseFunctionArgs(tokens).map(function (values) {
18 var shadow = {
19 color: color_1.COLORS.TRANSPARENT,
20 offsetX: length_percentage_1.ZERO_LENGTH,
21 offsetY: length_percentage_1.ZERO_LENGTH,
22 blur: length_percentage_1.ZERO_LENGTH
23 };
24 var c = 0;
25 for (var i = 0; i < values.length; i++) {
26 var token = values[i];
27 if (length_1.isLength(token)) {
28 if (c === 0) {
29 shadow.offsetX = token;
30 }
31 else if (c === 1) {
32 shadow.offsetY = token;
33 }
34 else {
35 shadow.blur = token;
36 }
37 c++;
38 }
39 else {
40 shadow.color = color_1.color.parse(context, token);
41 }
42 }
43 return shadow;
44 });
45 }
46};
47//# sourceMappingURL=text-shadow.js.map
Note: See TracBrowser for help on using the repository browser.