cssstyle 4.3.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/lib/CSSStyleDeclaration.js +545 -206
  2. package/lib/allExtraProperties.js +42 -60
  3. package/lib/allWebkitProperties.js +107 -187
  4. package/lib/generated/allProperties.js +615 -0
  5. package/lib/{implementedProperties.js → generated/implementedProperties.js} +11 -18
  6. package/lib/generated/properties.js +2574 -0
  7. package/lib/parsers.js +400 -544
  8. package/lib/properties/background.js +40 -13
  9. package/lib/properties/backgroundAttachment.js +23 -15
  10. package/lib/properties/backgroundColor.js +21 -19
  11. package/lib/properties/backgroundImage.js +19 -14
  12. package/lib/properties/backgroundPosition.js +35 -41
  13. package/lib/properties/backgroundRepeat.js +20 -20
  14. package/lib/properties/border.js +34 -25
  15. package/lib/properties/borderBottom.js +34 -11
  16. package/lib/properties/borderBottomColor.js +27 -8
  17. package/lib/properties/borderBottomStyle.js +42 -13
  18. package/lib/properties/borderBottomWidth.js +28 -8
  19. package/lib/properties/borderCollapse.js +16 -16
  20. package/lib/properties/borderColor.js +32 -18
  21. package/lib/properties/borderLeft.js +34 -11
  22. package/lib/properties/borderLeftColor.js +27 -8
  23. package/lib/properties/borderLeftStyle.js +42 -13
  24. package/lib/properties/borderLeftWidth.js +28 -8
  25. package/lib/properties/borderRight.js +34 -11
  26. package/lib/properties/borderRightColor.js +27 -8
  27. package/lib/properties/borderRightStyle.js +42 -13
  28. package/lib/properties/borderRightWidth.js +28 -8
  29. package/lib/properties/borderSpacing.js +31 -27
  30. package/lib/properties/borderStyle.js +43 -27
  31. package/lib/properties/borderTop.js +34 -11
  32. package/lib/properties/borderTopColor.js +27 -8
  33. package/lib/properties/borderTopStyle.js +42 -13
  34. package/lib/properties/borderTopWidth.js +28 -9
  35. package/lib/properties/borderWidth.js +32 -34
  36. package/lib/properties/bottom.js +23 -7
  37. package/lib/properties/clear.js +32 -8
  38. package/lib/properties/clip.js +33 -27
  39. package/lib/properties/color.js +23 -7
  40. package/lib/properties/flex.js +59 -29
  41. package/lib/properties/flexBasis.js +21 -16
  42. package/lib/properties/flexGrow.js +19 -10
  43. package/lib/properties/flexShrink.js +19 -10
  44. package/lib/properties/float.js +21 -6
  45. package/lib/properties/floodColor.js +23 -7
  46. package/lib/properties/font.js +120 -33
  47. package/lib/properties/fontFamily.js +59 -21
  48. package/lib/properties/fontSize.js +37 -28
  49. package/lib/properties/fontStyle.js +23 -9
  50. package/lib/properties/fontVariant.js +26 -8
  51. package/lib/properties/fontWeight.js +26 -23
  52. package/lib/properties/height.js +21 -14
  53. package/lib/properties/left.js +23 -7
  54. package/lib/properties/lightingColor.js +23 -7
  55. package/lib/properties/lineHeight.js +29 -16
  56. package/lib/properties/margin.js +42 -57
  57. package/lib/properties/marginBottom.js +34 -7
  58. package/lib/properties/marginLeft.js +34 -7
  59. package/lib/properties/marginRight.js +34 -7
  60. package/lib/properties/marginTop.js +34 -7
  61. package/lib/properties/opacity.js +39 -7
  62. package/lib/properties/outlineColor.js +23 -7
  63. package/lib/properties/padding.js +43 -51
  64. package/lib/properties/paddingBottom.js +36 -7
  65. package/lib/properties/paddingLeft.js +34 -7
  66. package/lib/properties/paddingRight.js +34 -7
  67. package/lib/properties/paddingTop.js +34 -7
  68. package/lib/properties/right.js +23 -7
  69. package/lib/properties/stopColor.js +23 -7
  70. package/lib/properties/top.js +23 -7
  71. package/lib/properties/webkitBorderAfterColor.js +23 -7
  72. package/lib/properties/webkitBorderBeforeColor.js +23 -7
  73. package/lib/properties/webkitBorderEndColor.js +23 -7
  74. package/lib/properties/webkitBorderStartColor.js +23 -7
  75. package/lib/properties/webkitColumnRuleColor.js +23 -7
  76. package/lib/properties/webkitTapHighlightColor.js +23 -7
  77. package/lib/properties/webkitTextEmphasisColor.js +23 -7
  78. package/lib/properties/webkitTextFillColor.js +23 -7
  79. package/lib/properties/webkitTextStrokeColor.js +23 -7
  80. package/lib/properties/width.js +21 -14
  81. package/lib/utils/camelize.js +35 -0
  82. package/lib/utils/propertyDescriptors.js +16 -0
  83. package/package.json +5 -4
  84. package/lib/allProperties.js +0 -529
  85. package/lib/constants.js +0 -6
  86. package/lib/named_colors.json +0 -152
  87. package/lib/properties/azimuth.js +0 -64
  88. package/lib/properties/cssFloat.js +0 -12
  89. package/lib/properties/textLineThroughColor.js +0 -14
  90. package/lib/properties/textOverlineColor.js +0 -14
  91. package/lib/properties/textUnderlineColor.js +0 -14
  92. package/lib/properties/webkitMatchNearestMailBlockquoteColor.js +0 -14
  93. package/lib/properties.js +0 -1672
  94. package/lib/utils/getBasicPropertyDescriptor.js +0 -14
package/lib/properties.js DELETED
@@ -1,1672 +0,0 @@
1
- 'use strict';
2
-
3
- // autogenerated - 3/9/2025
4
-
5
- /*
6
- *
7
- * https://www.w3.org/Style/CSS/all-properties.en.html
8
- */
9
-
10
- var external_dependency_parsers_0 = require("./parsers.js");
11
- var external_dependency_constants_1 = require("./constants.js");
12
- var azimuth_export_definition;
13
- azimuth_export_definition = {
14
- set: function (v) {
15
- var valueType = external_dependency_parsers_0.valueType(v);
16
- if (valueType === external_dependency_parsers_0.TYPES.ANGLE) {
17
- return this._setProperty('azimuth', external_dependency_parsers_0.parseAngle(v));
18
- }
19
- if (valueType === external_dependency_parsers_0.TYPES.KEYWORD) {
20
- var keywords = v.toLowerCase().trim().split(/\s+/);
21
- var hasBehind = false;
22
- if (keywords.length > 2) {
23
- return;
24
- }
25
- var behindIndex = keywords.indexOf('behind');
26
- hasBehind = behindIndex !== -1;
27
- if (keywords.length === 2) {
28
- if (!hasBehind) {
29
- return;
30
- }
31
- keywords.splice(behindIndex, 1);
32
- }
33
- if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') {
34
- if (hasBehind) {
35
- return;
36
- }
37
- return this._setProperty('azimuth', keywords[0]);
38
- }
39
- if (keywords[0] === 'behind') {
40
- return this._setProperty('azimuth', '180deg');
41
- }
42
- switch (keywords[0]) {
43
- case 'left-side':
44
- return this._setProperty('azimuth', '270deg');
45
- case 'far-left':
46
- return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg');
47
- case 'left':
48
- return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg');
49
- case 'center-left':
50
- return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg');
51
- case 'center':
52
- return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg');
53
- case 'center-right':
54
- return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg');
55
- case 'right':
56
- return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg');
57
- case 'far-right':
58
- return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg');
59
- case 'right-side':
60
- return this._setProperty('azimuth', '90deg');
61
- default:
62
- return;
63
- }
64
- }
65
- },
66
- get: function () {
67
- return this.getPropertyValue('azimuth');
68
- },
69
- enumerable: true,
70
- configurable: true
71
- };
72
- var backgroundColor_export_isValid, backgroundColor_export_definition;
73
- var backgroundColor_local_var_parse = function parse(v) {
74
- var parsed = external_dependency_parsers_0.parseColor(v);
75
- if (parsed !== undefined) {
76
- return parsed;
77
- }
78
- if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && v.toLowerCase() === 'inherit') {
79
- return v;
80
- }
81
- return undefined;
82
- };
83
- backgroundColor_export_isValid = function isValid(v) {
84
- return backgroundColor_local_var_parse(v) !== undefined;
85
- };
86
- backgroundColor_export_definition = {
87
- set: function (v) {
88
- var parsed = backgroundColor_local_var_parse(v);
89
- if (parsed === undefined) {
90
- return;
91
- }
92
- this._setProperty('background-color', parsed);
93
- },
94
- get: function () {
95
- return this.getPropertyValue('background-color');
96
- },
97
- enumerable: true,
98
- configurable: true
99
- };
100
- var backgroundImage_export_isValid, backgroundImage_export_definition;
101
- var backgroundImage_local_var_parse = function parse(v) {
102
- var parsed = external_dependency_parsers_0.parseImage(v);
103
- if (parsed !== undefined) {
104
- return parsed;
105
- }
106
- return undefined;
107
- };
108
- backgroundImage_export_isValid = function isValid(v) {
109
- return backgroundImage_local_var_parse(v) !== undefined;
110
- };
111
- backgroundImage_export_definition = {
112
- set: function (v) {
113
- this._setProperty('background-image', backgroundImage_local_var_parse(v));
114
- },
115
- get: function () {
116
- return this.getPropertyValue('background-image');
117
- },
118
- enumerable: true,
119
- configurable: true
120
- };
121
- var backgroundRepeat_export_isValid, backgroundRepeat_export_definition;
122
- var backgroundRepeat_local_var_parse = function parse(v) {
123
- if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) {
124
- return v;
125
- }
126
- return undefined;
127
- };
128
- backgroundRepeat_export_isValid = function isValid(v) {
129
- return backgroundRepeat_local_var_parse(v) !== undefined;
130
- };
131
- backgroundRepeat_export_definition = {
132
- set: function (v) {
133
- this._setProperty('background-repeat', backgroundRepeat_local_var_parse(v));
134
- },
135
- get: function () {
136
- return this.getPropertyValue('background-repeat');
137
- },
138
- enumerable: true,
139
- configurable: true
140
- };
141
- var backgroundAttachment_export_isValid, backgroundAttachment_export_definition;
142
- var backgroundAttachment_local_var_isValid = backgroundAttachment_export_isValid = function isValid(v) {
143
- return external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit');
144
- };
145
- backgroundAttachment_export_definition = {
146
- set: function (v) {
147
- if (!backgroundAttachment_local_var_isValid(v)) {
148
- return;
149
- }
150
- this._setProperty('background-attachment', v);
151
- },
152
- get: function () {
153
- return this.getPropertyValue('background-attachment');
154
- },
155
- enumerable: true,
156
- configurable: true
157
- };
158
- var backgroundPosition_export_isValid, backgroundPosition_export_definition;
159
- var backgroundPosition_local_var_valid_keywords = ['top', 'center', 'bottom', 'left', 'right'];
160
- var backgroundPosition_local_var_parse = function parse(v) {
161
- if (v === '' || v === null) {
162
- return undefined;
163
- }
164
- var parts = v.split(/\s+/);
165
- if (parts.length > 2 || parts.length < 1) {
166
- return undefined;
167
- }
168
- var types = [];
169
- parts.forEach(function (part, index) {
170
- types[index] = external_dependency_parsers_0.valueType(part);
171
- });
172
- if (parts.length === 1) {
173
- if (types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) {
174
- return v;
175
- }
176
- if (types[0] === external_dependency_parsers_0.TYPES.KEYWORD) {
177
- if (backgroundPosition_local_var_valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') {
178
- return v;
179
- }
180
- }
181
- return undefined;
182
- }
183
- if ((types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) && (types[1] === external_dependency_parsers_0.TYPES.LENGTH || types[1] === external_dependency_parsers_0.TYPES.PERCENT)) {
184
- return v;
185
- }
186
- if (types[0] !== external_dependency_parsers_0.TYPES.KEYWORD || types[1] !== external_dependency_parsers_0.TYPES.KEYWORD) {
187
- return undefined;
188
- }
189
- if (backgroundPosition_local_var_valid_keywords.indexOf(parts[0]) !== -1 && backgroundPosition_local_var_valid_keywords.indexOf(parts[1]) !== -1) {
190
- return v;
191
- }
192
- return undefined;
193
- };
194
- backgroundPosition_export_isValid = function isValid(v) {
195
- return backgroundPosition_local_var_parse(v) !== undefined;
196
- };
197
- backgroundPosition_export_definition = {
198
- set: function (v) {
199
- this._setProperty('background-position', backgroundPosition_local_var_parse(v));
200
- },
201
- get: function () {
202
- return this.getPropertyValue('background-position');
203
- },
204
- enumerable: true,
205
- configurable: true
206
- };
207
- var background_export_definition;
208
- var background_local_var_shorthand_for = {
209
- 'background-color': {
210
- isValid: backgroundColor_export_isValid,
211
- definition: backgroundColor_export_definition
212
- },
213
- 'background-image': {
214
- isValid: backgroundImage_export_isValid,
215
- definition: backgroundImage_export_definition
216
- },
217
- 'background-repeat': {
218
- isValid: backgroundRepeat_export_isValid,
219
- definition: backgroundRepeat_export_definition
220
- },
221
- 'background-attachment': {
222
- isValid: backgroundAttachment_export_isValid,
223
- definition: backgroundAttachment_export_definition
224
- },
225
- 'background-position': {
226
- isValid: backgroundPosition_export_isValid,
227
- definition: backgroundPosition_export_definition
228
- }
229
- };
230
- background_export_definition = {
231
- set: external_dependency_parsers_0.shorthandSetter('background', background_local_var_shorthand_for),
232
- get: external_dependency_parsers_0.shorthandGetter('background', background_local_var_shorthand_for),
233
- enumerable: true,
234
- configurable: true
235
- };
236
- var borderWidth_export_isValid, borderWidth_export_definition;
237
- // the valid border-widths:
238
- var borderWidth_local_var_widths = ['thin', 'medium', 'thick'];
239
- borderWidth_export_isValid = function parse(v) {
240
- var length = external_dependency_parsers_0.parseLength(v);
241
- if (length !== undefined) {
242
- return true;
243
- }
244
- if (typeof v !== 'string') {
245
- return false;
246
- }
247
- if (v === '') {
248
- return true;
249
- }
250
- v = v.toLowerCase();
251
- if (borderWidth_local_var_widths.indexOf(v) === -1) {
252
- return false;
253
- }
254
- return true;
255
- };
256
- var borderWidth_local_var_isValid = borderWidth_export_isValid;
257
- var borderWidth_local_var_parser = function (v) {
258
- var length = external_dependency_parsers_0.parseLength(v);
259
- if (length !== undefined) {
260
- return length;
261
- }
262
- if (borderWidth_local_var_isValid(v)) {
263
- return v.toLowerCase();
264
- }
265
- return undefined;
266
- };
267
- borderWidth_export_definition = {
268
- set: external_dependency_parsers_0.implicitSetter('border', 'width', borderWidth_local_var_isValid, borderWidth_local_var_parser),
269
- get: function () {
270
- return this.getPropertyValue('border-width');
271
- },
272
- enumerable: true,
273
- configurable: true
274
- };
275
- var borderStyle_export_isValid, borderStyle_export_definition;
276
- // the valid border-styles:
277
- var borderStyle_local_var_styles = ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset'];
278
- borderStyle_export_isValid = function parse(v) {
279
- return typeof v === 'string' && (v === '' || borderStyle_local_var_styles.indexOf(v) !== -1);
280
- };
281
- var borderStyle_local_var_isValid = borderStyle_export_isValid;
282
- var borderStyle_local_var_parser = function (v) {
283
- if (borderStyle_local_var_isValid(v)) {
284
- return v.toLowerCase();
285
- }
286
- return undefined;
287
- };
288
- borderStyle_export_definition = {
289
- set: external_dependency_parsers_0.implicitSetter('border', 'style', borderStyle_local_var_isValid, borderStyle_local_var_parser),
290
- get: function () {
291
- return this.getPropertyValue('border-style');
292
- },
293
- enumerable: true,
294
- configurable: true
295
- };
296
- var borderColor_export_isValid, borderColor_export_definition;
297
- var borderColor_local_var_parser = function (v) {
298
- var parsed = external_dependency_parsers_0.parseColor(v);
299
- if (parsed !== undefined) {
300
- return parsed;
301
- }
302
- if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && v.toLowerCase() === 'inherit') {
303
- return v;
304
- }
305
- return undefined;
306
- };
307
- borderColor_export_isValid = function parse(v) {
308
- return borderColor_local_var_parser(v) !== undefined;
309
- };
310
- var borderColor_local_var_isValid = borderColor_export_isValid;
311
- borderColor_export_definition = {
312
- set: external_dependency_parsers_0.implicitSetter('border', 'color', borderColor_local_var_isValid, borderColor_local_var_parser),
313
- get: function () {
314
- return this.getPropertyValue('border-color');
315
- },
316
- enumerable: true,
317
- configurable: true
318
- };
319
- var border_export_definition;
320
- var border_local_var_shorthand_for = {
321
- 'border-width': {
322
- isValid: borderWidth_export_isValid,
323
- definition: borderWidth_export_definition
324
- },
325
- 'border-style': {
326
- isValid: borderStyle_export_isValid,
327
- definition: borderStyle_export_definition
328
- },
329
- 'border-color': {
330
- isValid: borderColor_export_isValid,
331
- definition: borderColor_export_definition
332
- }
333
- };
334
- var border_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('border', border_local_var_shorthand_for);
335
- var border_local_var_myShorthandGetter = external_dependency_parsers_0.shorthandGetter('border', border_local_var_shorthand_for);
336
- border_export_definition = {
337
- set: function (v) {
338
- if (v.toString().toLowerCase() === 'none') {
339
- v = '';
340
- }
341
- border_local_var_myShorthandSetter.call(this, v);
342
- this.removeProperty('border-top');
343
- this.removeProperty('border-left');
344
- this.removeProperty('border-right');
345
- this.removeProperty('border-bottom');
346
- this._values['border-top'] = this._values.border;
347
- this._values['border-left'] = this._values.border;
348
- this._values['border-right'] = this._values.border;
349
- this._values['border-bottom'] = this._values.border;
350
- },
351
- get: border_local_var_myShorthandGetter,
352
- enumerable: true,
353
- configurable: true
354
- };
355
- var borderBottomWidth_export_isValid, borderBottomWidth_export_definition;
356
- var borderBottomWidth_local_var_isValid = borderBottomWidth_export_isValid = borderWidth_export_isValid;
357
- borderBottomWidth_export_definition = {
358
- set: function (v) {
359
- if (borderBottomWidth_local_var_isValid(v)) {
360
- this._setProperty('border-bottom-width', v);
361
- }
362
- },
363
- get: function () {
364
- return this.getPropertyValue('border-bottom-width');
365
- },
366
- enumerable: true,
367
- configurable: true
368
- };
369
- var borderBottomStyle_export_isValid, borderBottomStyle_export_definition;
370
- borderBottomStyle_export_isValid = borderStyle_export_isValid;
371
- borderBottomStyle_export_definition = {
372
- set: function (v) {
373
- if (borderStyle_export_isValid(v)) {
374
- if (v.toLowerCase() === 'none') {
375
- v = '';
376
- this.removeProperty('border-bottom-width');
377
- }
378
- this._setProperty('border-bottom-style', v);
379
- }
380
- },
381
- get: function () {
382
- return this.getPropertyValue('border-bottom-style');
383
- },
384
- enumerable: true,
385
- configurable: true
386
- };
387
- var borderBottomColor_export_isValid, borderBottomColor_export_definition;
388
- var borderBottomColor_local_var_isValid = borderBottomColor_export_isValid = borderColor_export_isValid;
389
- borderBottomColor_export_definition = {
390
- set: function (v) {
391
- if (borderBottomColor_local_var_isValid(v)) {
392
- this._setProperty('border-bottom-color', v);
393
- }
394
- },
395
- get: function () {
396
- return this.getPropertyValue('border-bottom-color');
397
- },
398
- enumerable: true,
399
- configurable: true
400
- };
401
- var borderBottom_export_definition;
402
- var borderBottom_local_var_shorthand_for = {
403
- 'border-bottom-width': {
404
- isValid: borderBottomWidth_export_isValid,
405
- definition: borderBottomWidth_export_definition
406
- },
407
- 'border-bottom-style': {
408
- isValid: borderBottomStyle_export_isValid,
409
- definition: borderBottomStyle_export_definition
410
- },
411
- 'border-bottom-color': {
412
- isValid: borderBottomColor_export_isValid,
413
- definition: borderBottomColor_export_definition
414
- }
415
- };
416
- borderBottom_export_definition = {
417
- set: external_dependency_parsers_0.shorthandSetter('border-bottom', borderBottom_local_var_shorthand_for),
418
- get: external_dependency_parsers_0.shorthandGetter('border-bottom', borderBottom_local_var_shorthand_for),
419
- enumerable: true,
420
- configurable: true
421
- };
422
- var borderCollapse_export_definition;
423
- var borderCollapse_local_var_parse = function parse(v) {
424
- if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) {
425
- return v;
426
- }
427
- return undefined;
428
- };
429
- borderCollapse_export_definition = {
430
- set: function (v) {
431
- this._setProperty('border-collapse', borderCollapse_local_var_parse(v));
432
- },
433
- get: function () {
434
- return this.getPropertyValue('border-collapse');
435
- },
436
- enumerable: true,
437
- configurable: true
438
- };
439
- var borderLeftWidth_export_isValid, borderLeftWidth_export_definition;
440
- var borderLeftWidth_local_var_isValid = borderLeftWidth_export_isValid = borderWidth_export_isValid;
441
- borderLeftWidth_export_definition = {
442
- set: function (v) {
443
- if (borderLeftWidth_local_var_isValid(v)) {
444
- this._setProperty('border-left-width', v);
445
- }
446
- },
447
- get: function () {
448
- return this.getPropertyValue('border-left-width');
449
- },
450
- enumerable: true,
451
- configurable: true
452
- };
453
- var borderLeftStyle_export_isValid, borderLeftStyle_export_definition;
454
- borderLeftStyle_export_isValid = borderStyle_export_isValid;
455
- borderLeftStyle_export_definition = {
456
- set: function (v) {
457
- if (borderStyle_export_isValid(v)) {
458
- if (v.toLowerCase() === 'none') {
459
- v = '';
460
- this.removeProperty('border-left-width');
461
- }
462
- this._setProperty('border-left-style', v);
463
- }
464
- },
465
- get: function () {
466
- return this.getPropertyValue('border-left-style');
467
- },
468
- enumerable: true,
469
- configurable: true
470
- };
471
- var borderLeftColor_export_isValid, borderLeftColor_export_definition;
472
- var borderLeftColor_local_var_isValid = borderLeftColor_export_isValid = borderColor_export_isValid;
473
- borderLeftColor_export_definition = {
474
- set: function (v) {
475
- if (borderLeftColor_local_var_isValid(v)) {
476
- this._setProperty('border-left-color', v);
477
- }
478
- },
479
- get: function () {
480
- return this.getPropertyValue('border-left-color');
481
- },
482
- enumerable: true,
483
- configurable: true
484
- };
485
- var borderLeft_export_definition;
486
- var borderLeft_local_var_shorthand_for = {
487
- 'border-left-width': {
488
- isValid: borderLeftWidth_export_isValid,
489
- definition: borderLeftWidth_export_definition
490
- },
491
- 'border-left-style': {
492
- isValid: borderLeftStyle_export_isValid,
493
- definition: borderLeftStyle_export_definition
494
- },
495
- 'border-left-color': {
496
- isValid: borderLeftColor_export_isValid,
497
- definition: borderLeftColor_export_definition
498
- }
499
- };
500
- borderLeft_export_definition = {
501
- set: external_dependency_parsers_0.shorthandSetter('border-left', borderLeft_local_var_shorthand_for),
502
- get: external_dependency_parsers_0.shorthandGetter('border-left', borderLeft_local_var_shorthand_for),
503
- enumerable: true,
504
- configurable: true
505
- };
506
- var borderRightWidth_export_isValid, borderRightWidth_export_definition;
507
- var borderRightWidth_local_var_isValid = borderRightWidth_export_isValid = borderWidth_export_isValid;
508
- borderRightWidth_export_definition = {
509
- set: function (v) {
510
- if (borderRightWidth_local_var_isValid(v)) {
511
- this._setProperty('border-right-width', v);
512
- }
513
- },
514
- get: function () {
515
- return this.getPropertyValue('border-right-width');
516
- },
517
- enumerable: true,
518
- configurable: true
519
- };
520
- var borderRightStyle_export_isValid, borderRightStyle_export_definition;
521
- borderRightStyle_export_isValid = borderStyle_export_isValid;
522
- borderRightStyle_export_definition = {
523
- set: function (v) {
524
- if (borderStyle_export_isValid(v)) {
525
- if (v.toLowerCase() === 'none') {
526
- v = '';
527
- this.removeProperty('border-right-width');
528
- }
529
- this._setProperty('border-right-style', v);
530
- }
531
- },
532
- get: function () {
533
- return this.getPropertyValue('border-right-style');
534
- },
535
- enumerable: true,
536
- configurable: true
537
- };
538
- var borderRightColor_export_isValid, borderRightColor_export_definition;
539
- var borderRightColor_local_var_isValid = borderRightColor_export_isValid = borderColor_export_isValid;
540
- borderRightColor_export_definition = {
541
- set: function (v) {
542
- if (borderRightColor_local_var_isValid(v)) {
543
- this._setProperty('border-right-color', v);
544
- }
545
- },
546
- get: function () {
547
- return this.getPropertyValue('border-right-color');
548
- },
549
- enumerable: true,
550
- configurable: true
551
- };
552
- var borderRight_export_definition;
553
- var borderRight_local_var_shorthand_for = {
554
- 'border-right-width': {
555
- isValid: borderRightWidth_export_isValid,
556
- definition: borderRightWidth_export_definition
557
- },
558
- 'border-right-style': {
559
- isValid: borderRightStyle_export_isValid,
560
- definition: borderRightStyle_export_definition
561
- },
562
- 'border-right-color': {
563
- isValid: borderRightColor_export_isValid,
564
- definition: borderRightColor_export_definition
565
- }
566
- };
567
- borderRight_export_definition = {
568
- set: external_dependency_parsers_0.shorthandSetter('border-right', borderRight_local_var_shorthand_for),
569
- get: external_dependency_parsers_0.shorthandGetter('border-right', borderRight_local_var_shorthand_for),
570
- enumerable: true,
571
- configurable: true
572
- };
573
- var borderSpacing_export_definition;
574
- // <length> <length>? | inherit
575
- // if one, it applies to both horizontal and verical spacing
576
- // if two, the first applies to the horizontal and the second applies to vertical spacing
577
-
578
- var borderSpacing_local_var_parse = function parse(v) {
579
- if (v === '' || v === null) {
580
- return undefined;
581
- }
582
- if (v === 0) {
583
- return '0px';
584
- }
585
- if (v.toLowerCase() === 'inherit') {
586
- return v;
587
- }
588
- var parts = v.split(/\s+/);
589
- if (parts.length !== 1 && parts.length !== 2) {
590
- return undefined;
591
- }
592
- parts.forEach(function (part) {
593
- if (external_dependency_parsers_0.valueType(part) !== external_dependency_parsers_0.TYPES.LENGTH) {
594
- return undefined;
595
- }
596
- });
597
- return v;
598
- };
599
- borderSpacing_export_definition = {
600
- set: function (v) {
601
- this._setProperty('border-spacing', borderSpacing_local_var_parse(v));
602
- },
603
- get: function () {
604
- return this.getPropertyValue('border-spacing');
605
- },
606
- enumerable: true,
607
- configurable: true
608
- };
609
- var borderTopWidth_export_isValid, borderTopWidth_export_definition;
610
- borderTopWidth_export_isValid = borderWidth_export_isValid;
611
- borderTopWidth_export_definition = {
612
- set: function (v) {
613
- if (borderWidth_export_isValid(v)) {
614
- this._setProperty('border-top-width', v);
615
- }
616
- },
617
- get: function () {
618
- return this.getPropertyValue('border-top-width');
619
- },
620
- enumerable: true,
621
- configurable: true
622
- };
623
- var borderTopStyle_export_isValid, borderTopStyle_export_definition;
624
- borderTopStyle_export_isValid = borderStyle_export_isValid;
625
- borderTopStyle_export_definition = {
626
- set: function (v) {
627
- if (borderStyle_export_isValid(v)) {
628
- if (v.toLowerCase() === 'none') {
629
- v = '';
630
- this.removeProperty('border-top-width');
631
- }
632
- this._setProperty('border-top-style', v);
633
- }
634
- },
635
- get: function () {
636
- return this.getPropertyValue('border-top-style');
637
- },
638
- enumerable: true,
639
- configurable: true
640
- };
641
- var borderTopColor_export_isValid, borderTopColor_export_definition;
642
- var borderTopColor_local_var_isValid = borderTopColor_export_isValid = borderColor_export_isValid;
643
- borderTopColor_export_definition = {
644
- set: function (v) {
645
- if (borderTopColor_local_var_isValid(v)) {
646
- this._setProperty('border-top-color', v);
647
- }
648
- },
649
- get: function () {
650
- return this.getPropertyValue('border-top-color');
651
- },
652
- enumerable: true,
653
- configurable: true
654
- };
655
- var borderTop_export_definition;
656
- var borderTop_local_var_shorthand_for = {
657
- 'border-top-width': {
658
- isValid: borderTopWidth_export_isValid,
659
- definition: borderTopWidth_export_definition
660
- },
661
- 'border-top-style': {
662
- isValid: borderTopStyle_export_isValid,
663
- definition: borderTopStyle_export_definition
664
- },
665
- 'border-top-color': {
666
- isValid: borderTopColor_export_isValid,
667
- definition: borderTopColor_export_definition
668
- }
669
- };
670
- borderTop_export_definition = {
671
- set: external_dependency_parsers_0.shorthandSetter('border-top', borderTop_local_var_shorthand_for),
672
- get: external_dependency_parsers_0.shorthandGetter('border-top', borderTop_local_var_shorthand_for),
673
- enumerable: true,
674
- configurable: true
675
- };
676
- var bottom_export_definition;
677
- bottom_export_definition = {
678
- set: function (v) {
679
- this._setProperty('bottom', external_dependency_parsers_0.parseInheritingMeasurement(v));
680
- },
681
- get: function () {
682
- return this.getPropertyValue('bottom');
683
- },
684
- enumerable: true,
685
- configurable: true
686
- };
687
- var clear_export_definition;
688
- var clear_local_var_clear_keywords = ['none', 'left', 'right', 'both', 'inherit'];
689
- clear_export_definition = {
690
- set: function (v) {
691
- this._setProperty('clear', external_dependency_parsers_0.parseKeyword(v, clear_local_var_clear_keywords));
692
- },
693
- get: function () {
694
- return this.getPropertyValue('clear');
695
- },
696
- enumerable: true,
697
- configurable: true
698
- };
699
- var clip_export_definition;
700
- var clip_local_var_shape_regex = /^rect\((.*)\)$/i;
701
- var clip_local_var_parse = function (val) {
702
- if (val === '' || val === null) {
703
- return val;
704
- }
705
- if (typeof val !== 'string') {
706
- return undefined;
707
- }
708
- val = val.toLowerCase();
709
- if (val === 'auto' || val === 'inherit') {
710
- return val;
711
- }
712
- var matches = val.match(clip_local_var_shape_regex);
713
- if (!matches) {
714
- return undefined;
715
- }
716
- var parts = matches[1].split(/\s*,\s*/);
717
- if (parts.length !== 4) {
718
- return undefined;
719
- }
720
- var valid = parts.every(function (part, index) {
721
- var measurement = external_dependency_parsers_0.parseMeasurement(part);
722
- parts[index] = measurement;
723
- return measurement !== undefined;
724
- });
725
- if (!valid) {
726
- return undefined;
727
- }
728
- parts = parts.join(', ');
729
- return val.replace(matches[1], parts);
730
- };
731
- clip_export_definition = {
732
- set: function (v) {
733
- this._setProperty('clip', clip_local_var_parse(v));
734
- },
735
- get: function () {
736
- return this.getPropertyValue('clip');
737
- },
738
- enumerable: true,
739
- configurable: true
740
- };
741
- var color_export_definition;
742
- color_export_definition = {
743
- set: function (v) {
744
- this._setProperty('color', external_dependency_parsers_0.parseColor(v));
745
- },
746
- get: function () {
747
- return this.getPropertyValue('color');
748
- },
749
- enumerable: true,
750
- configurable: true
751
- };
752
- var cssFloat_export_definition;
753
- cssFloat_export_definition = {
754
- set: function (v) {
755
- this._setProperty('float', v);
756
- },
757
- get: function () {
758
- return this.getPropertyValue('float');
759
- },
760
- enumerable: true,
761
- configurable: true
762
- };
763
- var flexGrow_export_isValid, flexGrow_export_definition;
764
- flexGrow_export_isValid = function isValid(v, positionAtFlexShorthand) {
765
- return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.first;
766
- };
767
- flexGrow_export_definition = {
768
- set: function (v) {
769
- this._setProperty('flex-grow', external_dependency_parsers_0.parseNumber(v));
770
- },
771
- get: function () {
772
- return this.getPropertyValue('flex-grow');
773
- },
774
- enumerable: true,
775
- configurable: true
776
- };
777
- var flexShrink_export_isValid, flexShrink_export_definition;
778
- flexShrink_export_isValid = function isValid(v, positionAtFlexShorthand) {
779
- return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.second;
780
- };
781
- flexShrink_export_definition = {
782
- set: function (v) {
783
- this._setProperty('flex-shrink', external_dependency_parsers_0.parseNumber(v));
784
- },
785
- get: function () {
786
- return this.getPropertyValue('flex-shrink');
787
- },
788
- enumerable: true,
789
- configurable: true
790
- };
791
- var flexBasis_export_isValid, flexBasis_export_definition;
792
- function flexBasis_local_fn_parse(v) {
793
- if (String(v).toLowerCase() === 'auto') {
794
- return 'auto';
795
- }
796
- if (String(v).toLowerCase() === 'inherit') {
797
- return 'inherit';
798
- }
799
- return external_dependency_parsers_0.parseMeasurement(v);
800
- }
801
- flexBasis_export_isValid = function isValid(v) {
802
- return flexBasis_local_fn_parse(v) !== undefined;
803
- };
804
- flexBasis_export_definition = {
805
- set: function (v) {
806
- this._setProperty('flex-basis', flexBasis_local_fn_parse(v));
807
- },
808
- get: function () {
809
- return this.getPropertyValue('flex-basis');
810
- },
811
- enumerable: true,
812
- configurable: true
813
- };
814
- var flex_export_isValid, flex_export_definition;
815
- var flex_local_var_shorthand_for = {
816
- 'flex-grow': {
817
- isValid: flexGrow_export_isValid,
818
- definition: flexGrow_export_definition
819
- },
820
- 'flex-shrink': {
821
- isValid: flexShrink_export_isValid,
822
- definition: flexShrink_export_definition
823
- },
824
- 'flex-basis': {
825
- isValid: flexBasis_export_isValid,
826
- definition: flexBasis_export_definition
827
- }
828
- };
829
- var flex_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('flex', flex_local_var_shorthand_for);
830
- flex_export_isValid = function isValid(v) {
831
- return external_dependency_parsers_0.shorthandParser(v, flex_local_var_shorthand_for) !== undefined;
832
- };
833
- flex_export_definition = {
834
- set: function (v) {
835
- var normalizedValue = String(v).trim().toLowerCase();
836
- if (normalizedValue === 'none') {
837
- flex_local_var_myShorthandSetter.call(this, '0 0 auto');
838
- return;
839
- }
840
- if (normalizedValue === 'initial') {
841
- flex_local_var_myShorthandSetter.call(this, '0 1 auto');
842
- return;
843
- }
844
- if (normalizedValue === 'auto') {
845
- this.removeProperty('flex-grow');
846
- this.removeProperty('flex-shrink');
847
- this.setProperty('flex-basis', normalizedValue);
848
- return;
849
- }
850
- flex_local_var_myShorthandSetter.call(this, v);
851
- },
852
- get: external_dependency_parsers_0.shorthandGetter('flex', flex_local_var_shorthand_for),
853
- enumerable: true,
854
- configurable: true
855
- };
856
- var float_export_definition;
857
- float_export_definition = {
858
- set: function (v) {
859
- this._setProperty('float', v);
860
- },
861
- get: function () {
862
- return this.getPropertyValue('float');
863
- },
864
- enumerable: true,
865
- configurable: true
866
- };
867
- var floodColor_export_definition;
868
- floodColor_export_definition = {
869
- set: function (v) {
870
- this._setProperty('flood-color', external_dependency_parsers_0.parseColor(v));
871
- },
872
- get: function () {
873
- return this.getPropertyValue('flood-color');
874
- },
875
- enumerable: true,
876
- configurable: true
877
- };
878
- var fontFamily_export_isValid, fontFamily_export_definition;
879
- var fontFamily_local_var_partsRegEx = /\s*,\s*/;
880
- fontFamily_export_isValid = function isValid(v) {
881
- if (v === '' || v === null) {
882
- return true;
883
- }
884
- var parts = v.split(fontFamily_local_var_partsRegEx);
885
- var len = parts.length;
886
- var i;
887
- var type;
888
- for (i = 0; i < len; i++) {
889
- type = external_dependency_parsers_0.valueType(parts[i]);
890
- if (type === external_dependency_parsers_0.TYPES.STRING || type === external_dependency_parsers_0.TYPES.KEYWORD) {
891
- return true;
892
- }
893
- }
894
- return false;
895
- };
896
- fontFamily_export_definition = {
897
- set: function (v) {
898
- this._setProperty('font-family', v);
899
- },
900
- get: function () {
901
- return this.getPropertyValue('font-family');
902
- },
903
- enumerable: true,
904
- configurable: true
905
- };
906
- var fontSize_export_isValid, fontSize_export_definition;
907
- var fontSize_local_var_absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
908
- var fontSize_local_var_relativeSizes = ['larger', 'smaller'];
909
- fontSize_export_isValid = function (v) {
910
- var type = external_dependency_parsers_0.valueType(v.toLowerCase());
911
- return type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_absoluteSizes.indexOf(v.toLowerCase()) !== -1 || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_relativeSizes.indexOf(v.toLowerCase()) !== -1;
912
- };
913
- function fontSize_local_fn_parse(v) {
914
- const valueAsString = String(v).toLowerCase();
915
- const optionalArguments = fontSize_local_var_absoluteSizes.concat(fontSize_local_var_relativeSizes);
916
- const isOptionalArgument = optionalArguments.some(stringValue => stringValue.toLowerCase() === valueAsString);
917
- return isOptionalArgument ? valueAsString : external_dependency_parsers_0.parseMeasurement(v);
918
- }
919
- fontSize_export_definition = {
920
- set: function (v) {
921
- this._setProperty('font-size', fontSize_local_fn_parse(v));
922
- },
923
- get: function () {
924
- return this.getPropertyValue('font-size');
925
- },
926
- enumerable: true,
927
- configurable: true
928
- };
929
- var fontStyle_export_isValid, fontStyle_export_definition;
930
- var fontStyle_local_var_valid_styles = ['normal', 'italic', 'oblique', 'inherit'];
931
- fontStyle_export_isValid = function (v) {
932
- return fontStyle_local_var_valid_styles.indexOf(v.toLowerCase()) !== -1;
933
- };
934
- fontStyle_export_definition = {
935
- set: function (v) {
936
- this._setProperty('font-style', v);
937
- },
938
- get: function () {
939
- return this.getPropertyValue('font-style');
940
- },
941
- enumerable: true,
942
- configurable: true
943
- };
944
- var fontVariant_export_isValid, fontVariant_export_definition;
945
- var fontVariant_local_var_valid_variants = ['normal', 'small-caps', 'inherit'];
946
- fontVariant_export_isValid = function isValid(v) {
947
- return fontVariant_local_var_valid_variants.indexOf(v.toLowerCase()) !== -1;
948
- };
949
- fontVariant_export_definition = {
950
- set: function (v) {
951
- this._setProperty('font-variant', v);
952
- },
953
- get: function () {
954
- return this.getPropertyValue('font-variant');
955
- },
956
- enumerable: true,
957
- configurable: true
958
- };
959
- var fontWeight_export_isValid, fontWeight_export_definition;
960
- var fontWeight_local_var_valid_weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit'];
961
- fontWeight_export_isValid = function isValid(v) {
962
- return fontWeight_local_var_valid_weights.indexOf(v.toLowerCase()) !== -1;
963
- };
964
- fontWeight_export_definition = {
965
- set: function (v) {
966
- this._setProperty('font-weight', v);
967
- },
968
- get: function () {
969
- return this.getPropertyValue('font-weight');
970
- },
971
- enumerable: true,
972
- configurable: true
973
- };
974
- var lineHeight_export_isValid, lineHeight_export_definition;
975
- lineHeight_export_isValid = function isValid(v) {
976
- var type = external_dependency_parsers_0.valueType(v);
977
- return type === external_dependency_parsers_0.TYPES.KEYWORD && v.toLowerCase() === 'normal' || v.toLowerCase() === 'inherit' || type === external_dependency_parsers_0.TYPES.NUMBER || type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT;
978
- };
979
- lineHeight_export_definition = {
980
- set: function (v) {
981
- this._setProperty('line-height', v);
982
- },
983
- get: function () {
984
- return this.getPropertyValue('line-height');
985
- },
986
- enumerable: true,
987
- configurable: true
988
- };
989
- var font_export_definition;
990
- var font_local_var_shorthand_for = {
991
- 'font-family': {
992
- isValid: fontFamily_export_isValid,
993
- definition: fontFamily_export_definition
994
- },
995
- 'font-size': {
996
- isValid: fontSize_export_isValid,
997
- definition: fontSize_export_definition
998
- },
999
- 'font-style': {
1000
- isValid: fontStyle_export_isValid,
1001
- definition: fontStyle_export_definition
1002
- },
1003
- 'font-variant': {
1004
- isValid: fontVariant_export_isValid,
1005
- definition: fontVariant_export_definition
1006
- },
1007
- 'font-weight': {
1008
- isValid: fontWeight_export_isValid,
1009
- definition: fontWeight_export_definition
1010
- },
1011
- 'line-height': {
1012
- isValid: lineHeight_export_isValid,
1013
- definition: lineHeight_export_definition
1014
- }
1015
- };
1016
- var font_local_var_static_fonts = ['caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar', 'inherit'];
1017
- var font_local_var_setter = external_dependency_parsers_0.shorthandSetter('font', font_local_var_shorthand_for);
1018
- font_export_definition = {
1019
- set: function (v) {
1020
- var short = external_dependency_parsers_0.shorthandParser(v, font_local_var_shorthand_for);
1021
- if (short !== undefined) {
1022
- return font_local_var_setter.call(this, v);
1023
- }
1024
- if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && font_local_var_static_fonts.indexOf(v.toLowerCase()) !== -1) {
1025
- this._setProperty('font', v);
1026
- }
1027
- },
1028
- get: external_dependency_parsers_0.shorthandGetter('font', font_local_var_shorthand_for),
1029
- enumerable: true,
1030
- configurable: true
1031
- };
1032
- var height_export_definition;
1033
- function height_local_fn_parse(v) {
1034
- if (String(v).toLowerCase() === 'auto') {
1035
- return 'auto';
1036
- }
1037
- if (String(v).toLowerCase() === 'inherit') {
1038
- return 'inherit';
1039
- }
1040
- return external_dependency_parsers_0.parseMeasurement(v);
1041
- }
1042
- height_export_definition = {
1043
- set: function (v) {
1044
- this._setProperty('height', height_local_fn_parse(v));
1045
- },
1046
- get: function () {
1047
- return this.getPropertyValue('height');
1048
- },
1049
- enumerable: true,
1050
- configurable: true
1051
- };
1052
- var left_export_definition;
1053
- left_export_definition = {
1054
- set: function (v) {
1055
- this._setProperty('left', external_dependency_parsers_0.parseInheritingMeasurement(v));
1056
- },
1057
- get: function () {
1058
- return this.getPropertyValue('left');
1059
- },
1060
- enumerable: true,
1061
- configurable: true
1062
- };
1063
- var lightingColor_export_definition;
1064
- lightingColor_export_definition = {
1065
- set: function (v) {
1066
- this._setProperty('lighting-color', external_dependency_parsers_0.parseColor(v));
1067
- },
1068
- get: function () {
1069
- return this.getPropertyValue('lighting-color');
1070
- },
1071
- enumerable: true,
1072
- configurable: true
1073
- };
1074
- var margin_export_definition, margin_export_isValid, margin_export_parser;
1075
- var margin_local_var_TYPES = external_dependency_parsers_0.TYPES;
1076
- var margin_local_var_isValid = function (v) {
1077
- if (v.toLowerCase() === 'auto') {
1078
- return true;
1079
- }
1080
- var type = external_dependency_parsers_0.valueType(v);
1081
- return type === margin_local_var_TYPES.NULL_OR_EMPTY_STR || type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.CALC || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0);
1082
- };
1083
- var margin_local_var_parser = function (v) {
1084
- var V = v.toLowerCase();
1085
- if (V === 'auto') {
1086
- return V;
1087
- }
1088
- return external_dependency_parsers_0.parseMeasurement(v);
1089
- };
1090
- var margin_local_var_mySetter = external_dependency_parsers_0.implicitSetter('margin', '', margin_local_var_isValid, margin_local_var_parser);
1091
- var margin_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('margin', '', function () {
1092
- return true;
1093
- }, function (v) {
1094
- return v;
1095
- });
1096
- margin_export_definition = {
1097
- set: function (v) {
1098
- if (typeof v === 'number') {
1099
- v = String(v);
1100
- }
1101
- if (v === null) {
1102
- v = '';
1103
- }
1104
- if (typeof v !== 'string') {
1105
- return;
1106
- }
1107
- var V = v.toLowerCase();
1108
- switch (V) {
1109
- case 'inherit':
1110
- case 'initial':
1111
- case 'unset':
1112
- case '':
1113
- margin_local_var_myGlobal.call(this, V);
1114
- break;
1115
- default:
1116
- margin_local_var_mySetter.call(this, v);
1117
- break;
1118
- }
1119
- },
1120
- get: function () {
1121
- return this.getPropertyValue('margin');
1122
- },
1123
- enumerable: true,
1124
- configurable: true
1125
- };
1126
- margin_export_isValid = margin_local_var_isValid;
1127
- margin_export_parser = margin_local_var_parser;
1128
- var marginBottom_export_definition;
1129
- marginBottom_export_definition = {
1130
- set: external_dependency_parsers_0.subImplicitSetter('margin', 'bottom', {
1131
- definition: margin_export_definition,
1132
- isValid: margin_export_isValid,
1133
- parser: margin_export_parser
1134
- }.isValid, {
1135
- definition: margin_export_definition,
1136
- isValid: margin_export_isValid,
1137
- parser: margin_export_parser
1138
- }.parser),
1139
- get: function () {
1140
- return this.getPropertyValue('margin-bottom');
1141
- },
1142
- enumerable: true,
1143
- configurable: true
1144
- };
1145
- var marginLeft_export_definition;
1146
- marginLeft_export_definition = {
1147
- set: external_dependency_parsers_0.subImplicitSetter('margin', 'left', {
1148
- definition: margin_export_definition,
1149
- isValid: margin_export_isValid,
1150
- parser: margin_export_parser
1151
- }.isValid, {
1152
- definition: margin_export_definition,
1153
- isValid: margin_export_isValid,
1154
- parser: margin_export_parser
1155
- }.parser),
1156
- get: function () {
1157
- return this.getPropertyValue('margin-left');
1158
- },
1159
- enumerable: true,
1160
- configurable: true
1161
- };
1162
- var marginRight_export_definition;
1163
- marginRight_export_definition = {
1164
- set: external_dependency_parsers_0.subImplicitSetter('margin', 'right', {
1165
- definition: margin_export_definition,
1166
- isValid: margin_export_isValid,
1167
- parser: margin_export_parser
1168
- }.isValid, {
1169
- definition: margin_export_definition,
1170
- isValid: margin_export_isValid,
1171
- parser: margin_export_parser
1172
- }.parser),
1173
- get: function () {
1174
- return this.getPropertyValue('margin-right');
1175
- },
1176
- enumerable: true,
1177
- configurable: true
1178
- };
1179
- var marginTop_export_definition;
1180
- marginTop_export_definition = {
1181
- set: external_dependency_parsers_0.subImplicitSetter('margin', 'top', {
1182
- definition: margin_export_definition,
1183
- isValid: margin_export_isValid,
1184
- parser: margin_export_parser
1185
- }.isValid, {
1186
- definition: margin_export_definition,
1187
- isValid: margin_export_isValid,
1188
- parser: margin_export_parser
1189
- }.parser),
1190
- get: function () {
1191
- return this.getPropertyValue('margin-top');
1192
- },
1193
- enumerable: true,
1194
- configurable: true
1195
- };
1196
- var opacity_export_definition;
1197
- opacity_export_definition = {
1198
- set: function (v) {
1199
- this._setProperty('opacity', external_dependency_parsers_0.parseNumber(v));
1200
- },
1201
- get: function () {
1202
- return this.getPropertyValue('opacity');
1203
- },
1204
- enumerable: true,
1205
- configurable: true
1206
- };
1207
- var outlineColor_export_definition;
1208
- outlineColor_export_definition = {
1209
- set: function (v) {
1210
- this._setProperty('outline-color', external_dependency_parsers_0.parseColor(v));
1211
- },
1212
- get: function () {
1213
- return this.getPropertyValue('outline-color');
1214
- },
1215
- enumerable: true,
1216
- configurable: true
1217
- };
1218
- var padding_export_definition, padding_export_isValid, padding_export_parser;
1219
- var padding_local_var_TYPES = external_dependency_parsers_0.TYPES;
1220
- var padding_local_var_isValid = function (v) {
1221
- var type = external_dependency_parsers_0.valueType(v);
1222
- return type === padding_local_var_TYPES.NULL_OR_EMPTY_STR || type === padding_local_var_TYPES.LENGTH || type === padding_local_var_TYPES.PERCENT || type === padding_local_var_TYPES.CALC || type === padding_local_var_TYPES.INTEGER && (v === '0' || v === 0);
1223
- };
1224
- var padding_local_var_parser = function (v) {
1225
- return external_dependency_parsers_0.parseMeasurement(v);
1226
- };
1227
- var padding_local_var_mySetter = external_dependency_parsers_0.implicitSetter('padding', '', padding_local_var_isValid, padding_local_var_parser);
1228
- var padding_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('padding', '', function () {
1229
- return true;
1230
- }, function (v) {
1231
- return v;
1232
- });
1233
- padding_export_definition = {
1234
- set: function (v) {
1235
- if (typeof v === 'number') {
1236
- v = String(v);
1237
- }
1238
- if (v === null) {
1239
- v = '';
1240
- }
1241
- if (typeof v !== 'string') {
1242
- return;
1243
- }
1244
- var V = v.toLowerCase();
1245
- switch (V) {
1246
- case 'inherit':
1247
- case 'initial':
1248
- case 'unset':
1249
- case '':
1250
- padding_local_var_myGlobal.call(this, V);
1251
- break;
1252
- default:
1253
- padding_local_var_mySetter.call(this, v);
1254
- break;
1255
- }
1256
- },
1257
- get: function () {
1258
- return this.getPropertyValue('padding');
1259
- },
1260
- enumerable: true,
1261
- configurable: true
1262
- };
1263
- padding_export_isValid = padding_local_var_isValid;
1264
- padding_export_parser = padding_local_var_parser;
1265
- var paddingBottom_export_definition;
1266
- paddingBottom_export_definition = {
1267
- set: external_dependency_parsers_0.subImplicitSetter('padding', 'bottom', {
1268
- definition: padding_export_definition,
1269
- isValid: padding_export_isValid,
1270
- parser: padding_export_parser
1271
- }.isValid, {
1272
- definition: padding_export_definition,
1273
- isValid: padding_export_isValid,
1274
- parser: padding_export_parser
1275
- }.parser),
1276
- get: function () {
1277
- return this.getPropertyValue('padding-bottom');
1278
- },
1279
- enumerable: true,
1280
- configurable: true
1281
- };
1282
- var paddingLeft_export_definition;
1283
- paddingLeft_export_definition = {
1284
- set: external_dependency_parsers_0.subImplicitSetter('padding', 'left', {
1285
- definition: padding_export_definition,
1286
- isValid: padding_export_isValid,
1287
- parser: padding_export_parser
1288
- }.isValid, {
1289
- definition: padding_export_definition,
1290
- isValid: padding_export_isValid,
1291
- parser: padding_export_parser
1292
- }.parser),
1293
- get: function () {
1294
- return this.getPropertyValue('padding-left');
1295
- },
1296
- enumerable: true,
1297
- configurable: true
1298
- };
1299
- var paddingRight_export_definition;
1300
- paddingRight_export_definition = {
1301
- set: external_dependency_parsers_0.subImplicitSetter('padding', 'right', {
1302
- definition: padding_export_definition,
1303
- isValid: padding_export_isValid,
1304
- parser: padding_export_parser
1305
- }.isValid, {
1306
- definition: padding_export_definition,
1307
- isValid: padding_export_isValid,
1308
- parser: padding_export_parser
1309
- }.parser),
1310
- get: function () {
1311
- return this.getPropertyValue('padding-right');
1312
- },
1313
- enumerable: true,
1314
- configurable: true
1315
- };
1316
- var paddingTop_export_definition;
1317
- paddingTop_export_definition = {
1318
- set: external_dependency_parsers_0.subImplicitSetter('padding', 'top', {
1319
- definition: padding_export_definition,
1320
- isValid: padding_export_isValid,
1321
- parser: padding_export_parser
1322
- }.isValid, {
1323
- definition: padding_export_definition,
1324
- isValid: padding_export_isValid,
1325
- parser: padding_export_parser
1326
- }.parser),
1327
- get: function () {
1328
- return this.getPropertyValue('padding-top');
1329
- },
1330
- enumerable: true,
1331
- configurable: true
1332
- };
1333
- var right_export_definition;
1334
- right_export_definition = {
1335
- set: function (v) {
1336
- this._setProperty('right', external_dependency_parsers_0.parseInheritingMeasurement(v));
1337
- },
1338
- get: function () {
1339
- return this.getPropertyValue('right');
1340
- },
1341
- enumerable: true,
1342
- configurable: true
1343
- };
1344
- var stopColor_export_definition;
1345
- stopColor_export_definition = {
1346
- set: function (v) {
1347
- this._setProperty('stop-color', external_dependency_parsers_0.parseColor(v));
1348
- },
1349
- get: function () {
1350
- return this.getPropertyValue('stop-color');
1351
- },
1352
- enumerable: true,
1353
- configurable: true
1354
- };
1355
- var textLineThroughColor_export_definition;
1356
- textLineThroughColor_export_definition = {
1357
- set: function (v) {
1358
- this._setProperty('text-line-through-color', external_dependency_parsers_0.parseColor(v));
1359
- },
1360
- get: function () {
1361
- return this.getPropertyValue('text-line-through-color');
1362
- },
1363
- enumerable: true,
1364
- configurable: true
1365
- };
1366
- var textOverlineColor_export_definition;
1367
- textOverlineColor_export_definition = {
1368
- set: function (v) {
1369
- this._setProperty('text-overline-color', external_dependency_parsers_0.parseColor(v));
1370
- },
1371
- get: function () {
1372
- return this.getPropertyValue('text-overline-color');
1373
- },
1374
- enumerable: true,
1375
- configurable: true
1376
- };
1377
- var textUnderlineColor_export_definition;
1378
- textUnderlineColor_export_definition = {
1379
- set: function (v) {
1380
- this._setProperty('text-underline-color', external_dependency_parsers_0.parseColor(v));
1381
- },
1382
- get: function () {
1383
- return this.getPropertyValue('text-underline-color');
1384
- },
1385
- enumerable: true,
1386
- configurable: true
1387
- };
1388
- var top_export_definition;
1389
- top_export_definition = {
1390
- set: function (v) {
1391
- this._setProperty('top', external_dependency_parsers_0.parseInheritingMeasurement(v));
1392
- },
1393
- get: function () {
1394
- return this.getPropertyValue('top');
1395
- },
1396
- enumerable: true,
1397
- configurable: true
1398
- };
1399
- var webkitBorderAfterColor_export_definition;
1400
- webkitBorderAfterColor_export_definition = {
1401
- set: function (v) {
1402
- this._setProperty('-webkit-border-after-color', external_dependency_parsers_0.parseColor(v));
1403
- },
1404
- get: function () {
1405
- return this.getPropertyValue('-webkit-border-after-color');
1406
- },
1407
- enumerable: true,
1408
- configurable: true
1409
- };
1410
- var webkitBorderBeforeColor_export_definition;
1411
- webkitBorderBeforeColor_export_definition = {
1412
- set: function (v) {
1413
- this._setProperty('-webkit-border-before-color', external_dependency_parsers_0.parseColor(v));
1414
- },
1415
- get: function () {
1416
- return this.getPropertyValue('-webkit-border-before-color');
1417
- },
1418
- enumerable: true,
1419
- configurable: true
1420
- };
1421
- var webkitBorderEndColor_export_definition;
1422
- webkitBorderEndColor_export_definition = {
1423
- set: function (v) {
1424
- this._setProperty('-webkit-border-end-color', external_dependency_parsers_0.parseColor(v));
1425
- },
1426
- get: function () {
1427
- return this.getPropertyValue('-webkit-border-end-color');
1428
- },
1429
- enumerable: true,
1430
- configurable: true
1431
- };
1432
- var webkitBorderStartColor_export_definition;
1433
- webkitBorderStartColor_export_definition = {
1434
- set: function (v) {
1435
- this._setProperty('-webkit-border-start-color', external_dependency_parsers_0.parseColor(v));
1436
- },
1437
- get: function () {
1438
- return this.getPropertyValue('-webkit-border-start-color');
1439
- },
1440
- enumerable: true,
1441
- configurable: true
1442
- };
1443
- var webkitColumnRuleColor_export_definition;
1444
- webkitColumnRuleColor_export_definition = {
1445
- set: function (v) {
1446
- this._setProperty('-webkit-column-rule-color', external_dependency_parsers_0.parseColor(v));
1447
- },
1448
- get: function () {
1449
- return this.getPropertyValue('-webkit-column-rule-color');
1450
- },
1451
- enumerable: true,
1452
- configurable: true
1453
- };
1454
- var webkitMatchNearestMailBlockquoteColor_export_definition;
1455
- webkitMatchNearestMailBlockquoteColor_export_definition = {
1456
- set: function (v) {
1457
- this._setProperty('-webkit-match-nearest-mail-blockquote-color', external_dependency_parsers_0.parseColor(v));
1458
- },
1459
- get: function () {
1460
- return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color');
1461
- },
1462
- enumerable: true,
1463
- configurable: true
1464
- };
1465
- var webkitTapHighlightColor_export_definition;
1466
- webkitTapHighlightColor_export_definition = {
1467
- set: function (v) {
1468
- this._setProperty('-webkit-tap-highlight-color', external_dependency_parsers_0.parseColor(v));
1469
- },
1470
- get: function () {
1471
- return this.getPropertyValue('-webkit-tap-highlight-color');
1472
- },
1473
- enumerable: true,
1474
- configurable: true
1475
- };
1476
- var webkitTextEmphasisColor_export_definition;
1477
- webkitTextEmphasisColor_export_definition = {
1478
- set: function (v) {
1479
- this._setProperty('-webkit-text-emphasis-color', external_dependency_parsers_0.parseColor(v));
1480
- },
1481
- get: function () {
1482
- return this.getPropertyValue('-webkit-text-emphasis-color');
1483
- },
1484
- enumerable: true,
1485
- configurable: true
1486
- };
1487
- var webkitTextFillColor_export_definition;
1488
- webkitTextFillColor_export_definition = {
1489
- set: function (v) {
1490
- this._setProperty('-webkit-text-fill-color', external_dependency_parsers_0.parseColor(v));
1491
- },
1492
- get: function () {
1493
- return this.getPropertyValue('-webkit-text-fill-color');
1494
- },
1495
- enumerable: true,
1496
- configurable: true
1497
- };
1498
- var webkitTextStrokeColor_export_definition;
1499
- webkitTextStrokeColor_export_definition = {
1500
- set: function (v) {
1501
- this._setProperty('-webkit-text-stroke-color', external_dependency_parsers_0.parseColor(v));
1502
- },
1503
- get: function () {
1504
- return this.getPropertyValue('-webkit-text-stroke-color');
1505
- },
1506
- enumerable: true,
1507
- configurable: true
1508
- };
1509
- var width_export_definition;
1510
- function width_local_fn_parse(v) {
1511
- if (String(v).toLowerCase() === 'auto') {
1512
- return 'auto';
1513
- }
1514
- if (String(v).toLowerCase() === 'inherit') {
1515
- return 'inherit';
1516
- }
1517
- return external_dependency_parsers_0.parseMeasurement(v);
1518
- }
1519
- width_export_definition = {
1520
- set: function (v) {
1521
- this._setProperty('width', width_local_fn_parse(v));
1522
- },
1523
- get: function () {
1524
- return this.getPropertyValue('width');
1525
- },
1526
- enumerable: true,
1527
- configurable: true
1528
- };
1529
- module.exports = function (prototype) {
1530
- Object.defineProperties(prototype, {
1531
- azimuth: azimuth_export_definition,
1532
- backgroundColor: backgroundColor_export_definition,
1533
- "background-color": backgroundColor_export_definition,
1534
- backgroundImage: backgroundImage_export_definition,
1535
- "background-image": backgroundImage_export_definition,
1536
- backgroundRepeat: backgroundRepeat_export_definition,
1537
- "background-repeat": backgroundRepeat_export_definition,
1538
- backgroundAttachment: backgroundAttachment_export_definition,
1539
- "background-attachment": backgroundAttachment_export_definition,
1540
- backgroundPosition: backgroundPosition_export_definition,
1541
- "background-position": backgroundPosition_export_definition,
1542
- background: background_export_definition,
1543
- borderWidth: borderWidth_export_definition,
1544
- "border-width": borderWidth_export_definition,
1545
- borderStyle: borderStyle_export_definition,
1546
- "border-style": borderStyle_export_definition,
1547
- borderColor: borderColor_export_definition,
1548
- "border-color": borderColor_export_definition,
1549
- border: border_export_definition,
1550
- borderBottomWidth: borderBottomWidth_export_definition,
1551
- "border-bottom-width": borderBottomWidth_export_definition,
1552
- borderBottomStyle: borderBottomStyle_export_definition,
1553
- "border-bottom-style": borderBottomStyle_export_definition,
1554
- borderBottomColor: borderBottomColor_export_definition,
1555
- "border-bottom-color": borderBottomColor_export_definition,
1556
- borderBottom: borderBottom_export_definition,
1557
- "border-bottom": borderBottom_export_definition,
1558
- borderCollapse: borderCollapse_export_definition,
1559
- "border-collapse": borderCollapse_export_definition,
1560
- borderLeftWidth: borderLeftWidth_export_definition,
1561
- "border-left-width": borderLeftWidth_export_definition,
1562
- borderLeftStyle: borderLeftStyle_export_definition,
1563
- "border-left-style": borderLeftStyle_export_definition,
1564
- borderLeftColor: borderLeftColor_export_definition,
1565
- "border-left-color": borderLeftColor_export_definition,
1566
- borderLeft: borderLeft_export_definition,
1567
- "border-left": borderLeft_export_definition,
1568
- borderRightWidth: borderRightWidth_export_definition,
1569
- "border-right-width": borderRightWidth_export_definition,
1570
- borderRightStyle: borderRightStyle_export_definition,
1571
- "border-right-style": borderRightStyle_export_definition,
1572
- borderRightColor: borderRightColor_export_definition,
1573
- "border-right-color": borderRightColor_export_definition,
1574
- borderRight: borderRight_export_definition,
1575
- "border-right": borderRight_export_definition,
1576
- borderSpacing: borderSpacing_export_definition,
1577
- "border-spacing": borderSpacing_export_definition,
1578
- borderTopWidth: borderTopWidth_export_definition,
1579
- "border-top-width": borderTopWidth_export_definition,
1580
- borderTopStyle: borderTopStyle_export_definition,
1581
- "border-top-style": borderTopStyle_export_definition,
1582
- borderTopColor: borderTopColor_export_definition,
1583
- "border-top-color": borderTopColor_export_definition,
1584
- borderTop: borderTop_export_definition,
1585
- "border-top": borderTop_export_definition,
1586
- bottom: bottom_export_definition,
1587
- clear: clear_export_definition,
1588
- clip: clip_export_definition,
1589
- color: color_export_definition,
1590
- cssFloat: cssFloat_export_definition,
1591
- "css-float": cssFloat_export_definition,
1592
- flexGrow: flexGrow_export_definition,
1593
- "flex-grow": flexGrow_export_definition,
1594
- flexShrink: flexShrink_export_definition,
1595
- "flex-shrink": flexShrink_export_definition,
1596
- flexBasis: flexBasis_export_definition,
1597
- "flex-basis": flexBasis_export_definition,
1598
- flex: flex_export_definition,
1599
- float: float_export_definition,
1600
- floodColor: floodColor_export_definition,
1601
- "flood-color": floodColor_export_definition,
1602
- fontFamily: fontFamily_export_definition,
1603
- "font-family": fontFamily_export_definition,
1604
- fontSize: fontSize_export_definition,
1605
- "font-size": fontSize_export_definition,
1606
- fontStyle: fontStyle_export_definition,
1607
- "font-style": fontStyle_export_definition,
1608
- fontVariant: fontVariant_export_definition,
1609
- "font-variant": fontVariant_export_definition,
1610
- fontWeight: fontWeight_export_definition,
1611
- "font-weight": fontWeight_export_definition,
1612
- lineHeight: lineHeight_export_definition,
1613
- "line-height": lineHeight_export_definition,
1614
- font: font_export_definition,
1615
- height: height_export_definition,
1616
- left: left_export_definition,
1617
- lightingColor: lightingColor_export_definition,
1618
- "lighting-color": lightingColor_export_definition,
1619
- margin: margin_export_definition,
1620
- marginBottom: marginBottom_export_definition,
1621
- "margin-bottom": marginBottom_export_definition,
1622
- marginLeft: marginLeft_export_definition,
1623
- "margin-left": marginLeft_export_definition,
1624
- marginRight: marginRight_export_definition,
1625
- "margin-right": marginRight_export_definition,
1626
- marginTop: marginTop_export_definition,
1627
- "margin-top": marginTop_export_definition,
1628
- opacity: opacity_export_definition,
1629
- outlineColor: outlineColor_export_definition,
1630
- "outline-color": outlineColor_export_definition,
1631
- padding: padding_export_definition,
1632
- paddingBottom: paddingBottom_export_definition,
1633
- "padding-bottom": paddingBottom_export_definition,
1634
- paddingLeft: paddingLeft_export_definition,
1635
- "padding-left": paddingLeft_export_definition,
1636
- paddingRight: paddingRight_export_definition,
1637
- "padding-right": paddingRight_export_definition,
1638
- paddingTop: paddingTop_export_definition,
1639
- "padding-top": paddingTop_export_definition,
1640
- right: right_export_definition,
1641
- stopColor: stopColor_export_definition,
1642
- "stop-color": stopColor_export_definition,
1643
- textLineThroughColor: textLineThroughColor_export_definition,
1644
- "text-line-through-color": textLineThroughColor_export_definition,
1645
- textOverlineColor: textOverlineColor_export_definition,
1646
- "text-overline-color": textOverlineColor_export_definition,
1647
- textUnderlineColor: textUnderlineColor_export_definition,
1648
- "text-underline-color": textUnderlineColor_export_definition,
1649
- top: top_export_definition,
1650
- webkitBorderAfterColor: webkitBorderAfterColor_export_definition,
1651
- "webkit-border-after-color": webkitBorderAfterColor_export_definition,
1652
- webkitBorderBeforeColor: webkitBorderBeforeColor_export_definition,
1653
- "webkit-border-before-color": webkitBorderBeforeColor_export_definition,
1654
- webkitBorderEndColor: webkitBorderEndColor_export_definition,
1655
- "webkit-border-end-color": webkitBorderEndColor_export_definition,
1656
- webkitBorderStartColor: webkitBorderStartColor_export_definition,
1657
- "webkit-border-start-color": webkitBorderStartColor_export_definition,
1658
- webkitColumnRuleColor: webkitColumnRuleColor_export_definition,
1659
- "webkit-column-rule-color": webkitColumnRuleColor_export_definition,
1660
- webkitMatchNearestMailBlockquoteColor: webkitMatchNearestMailBlockquoteColor_export_definition,
1661
- "webkit-match-nearest-mail-blockquote-color": webkitMatchNearestMailBlockquoteColor_export_definition,
1662
- webkitTapHighlightColor: webkitTapHighlightColor_export_definition,
1663
- "webkit-tap-highlight-color": webkitTapHighlightColor_export_definition,
1664
- webkitTextEmphasisColor: webkitTextEmphasisColor_export_definition,
1665
- "webkit-text-emphasis-color": webkitTextEmphasisColor_export_definition,
1666
- webkitTextFillColor: webkitTextFillColor_export_definition,
1667
- "webkit-text-fill-color": webkitTextFillColor_export_definition,
1668
- webkitTextStrokeColor: webkitTextStrokeColor_export_definition,
1669
- "webkit-text-stroke-color": webkitTextStrokeColor_export_definition,
1670
- width: width_export_definition
1671
- });
1672
- };