cssstyle 5.2.0 → 5.3.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 (88) hide show
  1. package/lib/CSSStyleDeclaration.js +250 -254
  2. package/lib/generated/allProperties.js +39 -1
  3. package/lib/generated/implementedProperties.js +2219 -80
  4. package/lib/generated/properties.js +5253 -1904
  5. package/lib/normalize.js +1417 -0
  6. package/lib/parsers.js +372 -389
  7. package/lib/properties/background.js +76 -63
  8. package/lib/properties/backgroundAttachment.js +37 -22
  9. package/lib/properties/backgroundClip.js +37 -22
  10. package/lib/properties/backgroundColor.js +35 -15
  11. package/lib/properties/backgroundImage.js +49 -19
  12. package/lib/properties/backgroundOrigin.js +37 -22
  13. package/lib/properties/backgroundPosition.js +145 -128
  14. package/lib/properties/backgroundRepeat.js +55 -48
  15. package/lib/properties/backgroundSize.js +86 -46
  16. package/lib/properties/border.js +139 -22
  17. package/lib/properties/borderBottom.js +137 -21
  18. package/lib/properties/borderBottomColor.js +41 -16
  19. package/lib/properties/borderBottomStyle.js +39 -30
  20. package/lib/properties/borderBottomWidth.js +49 -16
  21. package/lib/properties/borderCollapse.js +32 -8
  22. package/lib/properties/borderColor.js +96 -23
  23. package/lib/properties/borderLeft.js +137 -21
  24. package/lib/properties/borderLeftColor.js +41 -16
  25. package/lib/properties/borderLeftStyle.js +39 -30
  26. package/lib/properties/borderLeftWidth.js +49 -16
  27. package/lib/properties/borderRight.js +137 -21
  28. package/lib/properties/borderRightColor.js +41 -16
  29. package/lib/properties/borderRightStyle.js +39 -30
  30. package/lib/properties/borderRightWidth.js +49 -16
  31. package/lib/properties/borderSpacing.js +42 -25
  32. package/lib/properties/borderStyle.js +96 -34
  33. package/lib/properties/borderTop.js +131 -15
  34. package/lib/properties/borderTopColor.js +41 -16
  35. package/lib/properties/borderTopStyle.js +39 -30
  36. package/lib/properties/borderTopWidth.js +49 -16
  37. package/lib/properties/borderWidth.js +108 -23
  38. package/lib/properties/bottom.js +40 -12
  39. package/lib/properties/clear.js +32 -22
  40. package/lib/properties/clip.js +46 -32
  41. package/lib/properties/color.js +34 -13
  42. package/lib/properties/display.js +169 -179
  43. package/lib/properties/flex.js +137 -38
  44. package/lib/properties/flexBasis.js +43 -14
  45. package/lib/properties/flexGrow.js +42 -9
  46. package/lib/properties/flexShrink.js +42 -9
  47. package/lib/properties/float.js +32 -9
  48. package/lib/properties/floodColor.js +34 -13
  49. package/lib/properties/font.js +145 -44
  50. package/lib/properties/fontFamily.js +66 -67
  51. package/lib/properties/fontSize.js +43 -26
  52. package/lib/properties/fontStyle.js +42 -11
  53. package/lib/properties/fontVariant.js +52 -15
  54. package/lib/properties/fontWeight.js +47 -15
  55. package/lib/properties/height.js +40 -13
  56. package/lib/properties/left.js +40 -12
  57. package/lib/properties/lightingColor.js +34 -13
  58. package/lib/properties/lineHeight.js +45 -18
  59. package/lib/properties/margin.js +73 -36
  60. package/lib/properties/marginBottom.js +43 -19
  61. package/lib/properties/marginLeft.js +43 -19
  62. package/lib/properties/marginRight.js +43 -19
  63. package/lib/properties/marginTop.js +43 -19
  64. package/lib/properties/opacity.js +41 -28
  65. package/lib/properties/outlineColor.js +34 -13
  66. package/lib/properties/padding.js +71 -36
  67. package/lib/properties/paddingBottom.js +44 -21
  68. package/lib/properties/paddingLeft.js +44 -19
  69. package/lib/properties/paddingRight.js +44 -19
  70. package/lib/properties/paddingTop.js +44 -19
  71. package/lib/properties/right.js +40 -12
  72. package/lib/properties/stopColor.js +34 -13
  73. package/lib/properties/top.js +40 -12
  74. package/lib/properties/webkitBorderAfterColor.js +34 -13
  75. package/lib/properties/webkitBorderBeforeColor.js +34 -13
  76. package/lib/properties/webkitBorderEndColor.js +34 -13
  77. package/lib/properties/webkitBorderStartColor.js +34 -13
  78. package/lib/properties/webkitColumnRuleColor.js +34 -13
  79. package/lib/properties/webkitTapHighlightColor.js +34 -13
  80. package/lib/properties/webkitTextEmphasisColor.js +34 -13
  81. package/lib/properties/webkitTextFillColor.js +34 -13
  82. package/lib/properties/webkitTextStrokeColor.js +34 -13
  83. package/lib/properties/width.js +40 -13
  84. package/lib/{allWebkitProperties.js → utils/allExtraProperties.js} +42 -1
  85. package/lib/utils/propertyDescriptors.js +6 -3
  86. package/package.json +11 -10
  87. package/lib/allExtraProperties.js +0 -49
  88. package/lib/shorthandProperties.js +0 -21
@@ -2,34 +2,67 @@
2
2
 
3
3
  const parsers = require("../parsers");
4
4
 
5
- module.exports.parse = function parse(v) {
6
- const keywords = ["thin", "medium", "thick"];
7
- const key = parsers.parseKeyword(v, keywords);
8
- if (key) {
9
- return key;
10
- }
11
- return parsers.parseLength(v, true);
12
- };
5
+ const property = "border-left-width";
6
+ const lineShorthand = "border-width";
7
+ const positionShorthand = "border-left";
8
+ const shorthand = "border";
13
9
 
14
- module.exports.isValid = function isValid(v) {
10
+ module.exports.parse = function parse(v, opt = {}) {
11
+ const { globalObject } = opt;
15
12
  if (v === "") {
16
- return true;
13
+ return v;
14
+ }
15
+ const value = parsers.parsePropertyValue(property, v, {
16
+ globalObject,
17
+ inArray: true
18
+ });
19
+ if (Array.isArray(value) && value.length === 1) {
20
+ const [{ isNumber, name, type, value: itemValue }] = value;
21
+ switch (type) {
22
+ case "Calc": {
23
+ if (isNumber) {
24
+ return;
25
+ }
26
+ return `${name}(${itemValue})`;
27
+ }
28
+ case "GlobalKeyword":
29
+ case "Identifier": {
30
+ return name;
31
+ }
32
+ default: {
33
+ return parsers.parseLength(value, {
34
+ min: 0
35
+ });
36
+ }
37
+ }
38
+ } else if (typeof value === "string") {
39
+ return value;
17
40
  }
18
- return typeof module.exports.parse(v) === "string";
19
41
  };
20
42
 
21
43
  module.exports.definition = {
22
44
  set(v) {
23
45
  v = parsers.prepareValue(v, this._global);
24
46
  if (parsers.hasVarFunc(v)) {
25
- this._setProperty("border", "");
26
- this._setProperty("border-left", "");
27
- this._setProperty("border-width", "");
47
+ this._borderSetter(property, v, "");
48
+ } else {
49
+ const val = module.exports.parse(v, {
50
+ globalObject: this._global
51
+ });
52
+ if (typeof val === "string") {
53
+ const shorthandPriority = this._priorities.get(shorthand);
54
+ const linePriority = this._priorities.get(lineShorthand);
55
+ const positionPriority = this._priorities.get(positionShorthand);
56
+ let priority = this._priorities.get(property) ?? "";
57
+ if ((shorthandPriority || linePriority || positionPriority) && priority) {
58
+ priority = "";
59
+ }
60
+ this._borderSetter(property, val, priority);
61
+ }
28
62
  }
29
- this._setProperty("border-left-width", module.exports.parse(v));
30
63
  },
31
64
  get() {
32
- return this.getPropertyValue("border-left-width");
65
+ return this.getPropertyValue(property);
33
66
  },
34
67
  enumerable: true,
35
68
  configurable: true
@@ -1,39 +1,155 @@
1
1
  "use strict";
2
2
 
3
3
  const parsers = require("../parsers");
4
- const borderTopWidth = require("./borderTopWidth");
5
- const borderTopStyle = require("./borderTopStyle");
6
- const borderTopColor = require("./borderTopColor");
4
+ const borderRightWidth = require("./borderRightWidth");
5
+ const borderRightStyle = require("./borderRightStyle");
6
+ const borderRightColor = require("./borderRightColor");
7
+
8
+ const property = "border-right";
9
+ const shorthand = "border";
10
+
11
+ module.exports.initialValues = new Map([
12
+ ["border-right-width", "medium"],
13
+ ["border-right-style", "none"],
14
+ ["border-right-color", "currentcolor"]
15
+ ]);
7
16
 
8
17
  module.exports.shorthandFor = new Map([
9
- ["border-right-width", borderTopWidth],
10
- ["border-right-style", borderTopStyle],
11
- ["border-right-color", borderTopColor]
18
+ ["border-right-width", borderRightWidth],
19
+ ["border-right-style", borderRightStyle],
20
+ ["border-right-color", borderRightColor]
12
21
  ]);
13
22
 
23
+ module.exports.parse = function parse(v, opt = {}) {
24
+ const { globalObject } = opt;
25
+ if (v === "") {
26
+ return v;
27
+ }
28
+ const values = parsers.splitValue(v);
29
+ const parsedValues = new Map();
30
+ for (const val of values) {
31
+ const value = parsers.parsePropertyValue(property, val, {
32
+ globalObject,
33
+ inArray: true
34
+ });
35
+ if (Array.isArray(value) && value.length === 1) {
36
+ const [{ isNumber, name, type, value: itemValue }] = value;
37
+ switch (type) {
38
+ case "Calc": {
39
+ if (isNumber || parsedValues.has("border-right-width")) {
40
+ return;
41
+ }
42
+ parsedValues.set("border-right-width", `${name}(${itemValue})`);
43
+ break;
44
+ }
45
+ case "Dimension":
46
+ case "Number": {
47
+ if (parsedValues.has("border-right-width")) {
48
+ return;
49
+ }
50
+ const parsedValue = parsers.parseLength(value, {
51
+ min: 0
52
+ });
53
+ if (!parsedValue) {
54
+ return;
55
+ }
56
+ parsedValues.set("border-right-width", parsedValue);
57
+ break;
58
+ }
59
+ case "Function": {
60
+ if (parsedValues.has("border-right-color")) {
61
+ return;
62
+ }
63
+ const parsedValue = parsers.parseColor(value);
64
+ if (!parsedValue) {
65
+ return;
66
+ }
67
+ parsedValues.set("border-right-color", parsedValue);
68
+ break;
69
+ }
70
+ case "GlobalKeyword": {
71
+ return name;
72
+ }
73
+ case "Hash": {
74
+ if (parsedValues.has("border-right-color")) {
75
+ return;
76
+ }
77
+ const parsedValue = parsers.parseColor(`#${itemValue}`);
78
+ if (!parsedValue) {
79
+ return;
80
+ }
81
+ parsedValues.set("border-right-color", parsedValue);
82
+ break;
83
+ }
84
+ case "Identifier": {
85
+ if (parsers.isValidPropertyValue("border-right-width", name)) {
86
+ if (parsedValues.has("border-right-width")) {
87
+ return;
88
+ }
89
+ parsedValues.set("border-right-width", name);
90
+ break;
91
+ } else if (parsers.isValidPropertyValue("border-right-style", name)) {
92
+ if (parsedValues.has("border-right-style")) {
93
+ return;
94
+ }
95
+ parsedValues.set("border-right-style", name);
96
+ break;
97
+ } else if (parsers.isValidPropertyValue("border-right-color", name)) {
98
+ if (parsedValues.has("border-right-color")) {
99
+ return;
100
+ }
101
+ parsedValues.set("border-right-color", name);
102
+ break;
103
+ }
104
+ return;
105
+ }
106
+ default: {
107
+ return;
108
+ }
109
+ }
110
+ } else {
111
+ return;
112
+ }
113
+ }
114
+ if (parsedValues.size) {
115
+ const keys = module.exports.shorthandFor.keys();
116
+ const obj = {
117
+ "border-right-width": "medium"
118
+ };
119
+ for (const key of keys) {
120
+ if (parsedValues.has(key)) {
121
+ const parsedValue = parsedValues.get(key);
122
+ if (parsedValue !== module.exports.initialValues.get(key)) {
123
+ obj[key] = parsedValues.get(key);
124
+ if (obj["border-right-width"] && obj["border-right-width"] === "medium") {
125
+ delete obj["border-right-width"];
126
+ }
127
+ }
128
+ }
129
+ }
130
+ return obj;
131
+ }
132
+ };
133
+
14
134
  module.exports.definition = {
15
135
  set(v) {
16
136
  v = parsers.prepareValue(v, this._global);
17
137
  if (parsers.hasVarFunc(v)) {
18
- for (const [key] of module.exports.shorthandFor) {
19
- this._setProperty(key, "");
20
- }
21
- this._setProperty("border", "");
22
- this._setProperty("border-right", v);
138
+ this._borderSetter(property, v, "");
23
139
  } else {
24
- this._shorthandSetter("border-right", v, module.exports.shorthandFor);
140
+ const val = module.exports.parse(v, {
141
+ globalObject: this._global
142
+ });
143
+ if (val || typeof val === "string") {
144
+ const shorthandPriority = this._priorities.get(shorthand);
145
+ const prior = this._priorities.get(property) ?? "";
146
+ const priority = shorthandPriority && prior ? "" : prior;
147
+ this._borderSetter(property, val, priority);
148
+ }
25
149
  }
26
150
  },
27
151
  get() {
28
- let val = this.getPropertyValue("border-right");
29
- if (parsers.hasVarFunc(val)) {
30
- return val;
31
- }
32
- val = this._shorthandGetter("border-right", module.exports.shorthandFor);
33
- if (parsers.hasVarFunc(val)) {
34
- return "";
35
- }
36
- return val;
152
+ return this.getPropertyValue(property);
37
153
  },
38
154
  enumerable: true,
39
155
  configurable: true
@@ -2,33 +2,58 @@
2
2
 
3
3
  const parsers = require("../parsers");
4
4
 
5
- module.exports.parse = function parse(v) {
6
- const val = parsers.parseColor(v);
7
- if (val) {
8
- return val;
9
- }
10
- return parsers.parseKeyword(v);
11
- };
5
+ const property = "border-right-color";
6
+ const lineShorthand = "border-color";
7
+ const positionShorthand = "border-right";
8
+ const shorthand = "border";
12
9
 
13
- module.exports.isValid = function isValid(v) {
14
- if (v === "" || typeof parsers.parseKeyword(v) === "string") {
15
- return true;
10
+ module.exports.parse = function parse(v, opt = {}) {
11
+ const { globalObject } = opt;
12
+ if (v === "") {
13
+ return v;
14
+ }
15
+ const value = parsers.parsePropertyValue(property, v, {
16
+ globalObject,
17
+ inArray: true
18
+ });
19
+ if (Array.isArray(value) && value.length === 1) {
20
+ const [{ name, type }] = value;
21
+ switch (type) {
22
+ case "GlobalKeyword": {
23
+ return name;
24
+ }
25
+ default: {
26
+ return parsers.parseColor(value);
27
+ }
28
+ }
29
+ } else if (typeof value === "string") {
30
+ return value;
16
31
  }
17
- return parsers.isValidColor(v);
18
32
  };
19
33
 
20
34
  module.exports.definition = {
21
35
  set(v) {
22
36
  v = parsers.prepareValue(v, this._global);
23
37
  if (parsers.hasVarFunc(v)) {
24
- this._setProperty("border", "");
25
- this._setProperty("border-right", "");
26
- this._setProperty("border-color", "");
38
+ this._borderSetter(property, v, "");
39
+ } else {
40
+ const val = module.exports.parse(v, {
41
+ globalObject: this._global
42
+ });
43
+ if (typeof val === "string") {
44
+ const shorthandPriority = this._priorities.get(shorthand);
45
+ const linePriority = this._priorities.get(lineShorthand);
46
+ const positionPriority = this._priorities.get(positionShorthand);
47
+ let priority = this._priorities.get(property) ?? "";
48
+ if ((shorthandPriority || linePriority || positionPriority) && priority) {
49
+ priority = "";
50
+ }
51
+ this._borderSetter(property, val, priority);
52
+ }
27
53
  }
28
- this._setProperty("border-right-color", module.exports.parse(v));
29
54
  },
30
55
  get() {
31
- return this.getPropertyValue("border-right-color");
56
+ return this.getPropertyValue(property);
32
57
  },
33
58
  enumerable: true,
34
59
  configurable: true
@@ -2,48 +2,57 @@
2
2
 
3
3
  const parsers = require("../parsers");
4
4
 
5
- module.exports.parse = function parse(v) {
6
- const keywords = [
7
- "none",
8
- "hidden",
9
- "dotted",
10
- "dashed",
11
- "solid",
12
- "double",
13
- "groove",
14
- "ridge",
15
- "inset",
16
- "outset"
17
- ];
18
- return parsers.parseKeyword(v, keywords);
19
- };
5
+ const property = "border-right-style";
6
+ const lineShorthand = "border-style";
7
+ const positionShorthand = "border-right";
8
+ const shorthand = "border";
20
9
 
21
- module.exports.isValid = function isValid(v) {
10
+ module.exports.parse = function parse(v, opt = {}) {
11
+ const { globalObject } = opt;
22
12
  if (v === "") {
23
- return true;
13
+ return v;
14
+ }
15
+ const value = parsers.parsePropertyValue(property, v, {
16
+ globalObject,
17
+ inArray: true
18
+ });
19
+ if (Array.isArray(value) && value.length === 1) {
20
+ const [{ name, type }] = value;
21
+ switch (type) {
22
+ case "GlobalKeyword":
23
+ case "Identifier": {
24
+ return name;
25
+ }
26
+ default:
27
+ }
28
+ } else if (typeof value === "string") {
29
+ return value;
24
30
  }
25
- return typeof module.exports.parse(v) === "string";
26
31
  };
27
32
 
28
33
  module.exports.definition = {
29
34
  set(v) {
30
35
  v = parsers.prepareValue(v, this._global);
31
- const val = module.exports.parse(v);
32
- if (val === "none" || val === "hidden") {
33
- this._setProperty("border-right-style", "");
34
- this._setProperty("border-right-color", "");
35
- this._setProperty("border-right-width", "");
36
- return;
37
- }
38
36
  if (parsers.hasVarFunc(v)) {
39
- this._setProperty("border", "");
40
- this._setProperty("border-right", "");
41
- this._setProperty("border-style", "");
37
+ this._borderSetter(property, v, "");
38
+ } else {
39
+ const val = module.exports.parse(v, {
40
+ globalObject: this._global
41
+ });
42
+ if (typeof val === "string") {
43
+ const shorthandPriority = this._priorities.get(shorthand);
44
+ const linePriority = this._priorities.get(lineShorthand);
45
+ const positionPriority = this._priorities.get(positionShorthand);
46
+ let priority = this._priorities.get(property) ?? "";
47
+ if ((shorthandPriority || linePriority || positionPriority) && priority) {
48
+ priority = "";
49
+ }
50
+ this._borderSetter(property, val, priority);
51
+ }
42
52
  }
43
- this._setProperty("border-right-style", val);
44
53
  },
45
54
  get() {
46
- return this.getPropertyValue("border-right-style");
55
+ return this.getPropertyValue(property);
47
56
  },
48
57
  enumerable: true,
49
58
  configurable: true
@@ -2,34 +2,67 @@
2
2
 
3
3
  const parsers = require("../parsers");
4
4
 
5
- module.exports.parse = function parse(v) {
6
- const keywords = ["thin", "medium", "thick"];
7
- const key = parsers.parseKeyword(v, keywords);
8
- if (key) {
9
- return key;
10
- }
11
- return parsers.parseLength(v, true);
12
- };
5
+ const property = "border-right-width";
6
+ const lineShorthand = "border-width";
7
+ const positionShorthand = "border-right";
8
+ const shorthand = "border";
13
9
 
14
- module.exports.isValid = function isValid(v) {
10
+ module.exports.parse = function parse(v, opt = {}) {
11
+ const { globalObject } = opt;
15
12
  if (v === "") {
16
- return true;
13
+ return v;
14
+ }
15
+ const value = parsers.parsePropertyValue(property, v, {
16
+ globalObject,
17
+ inArray: true
18
+ });
19
+ if (Array.isArray(value) && value.length === 1) {
20
+ const [{ isNumber, name, type, value: itemValue }] = value;
21
+ switch (type) {
22
+ case "Calc": {
23
+ if (isNumber) {
24
+ return;
25
+ }
26
+ return `${name}(${itemValue})`;
27
+ }
28
+ case "GlobalKeyword":
29
+ case "Identifier": {
30
+ return name;
31
+ }
32
+ default: {
33
+ return parsers.parseLength(value, {
34
+ min: 0
35
+ });
36
+ }
37
+ }
38
+ } else if (typeof value === "string") {
39
+ return value;
17
40
  }
18
- return typeof module.exports.parse(v) === "string";
19
41
  };
20
42
 
21
43
  module.exports.definition = {
22
44
  set(v) {
23
45
  v = parsers.prepareValue(v, this._global);
24
46
  if (parsers.hasVarFunc(v)) {
25
- this._setProperty("border", "");
26
- this._setProperty("border-right", "");
27
- this._setProperty("border-width", "");
47
+ this._borderSetter(property, v, "");
48
+ } else {
49
+ const val = module.exports.parse(v, {
50
+ globalObject: this._global
51
+ });
52
+ if (typeof val === "string") {
53
+ const shorthandPriority = this._priorities.get(shorthand);
54
+ const linePriority = this._priorities.get(lineShorthand);
55
+ const positionPriority = this._priorities.get(positionShorthand);
56
+ let priority = this._priorities.get(property) ?? "";
57
+ if ((shorthandPriority || linePriority || positionPriority) && priority) {
58
+ priority = "";
59
+ }
60
+ this._borderSetter(property, val, priority);
61
+ }
28
62
  }
29
- this._setProperty("border-right-width", module.exports.parse(v));
30
63
  },
31
64
  get() {
32
- return this.getPropertyValue("border-right-width");
65
+ return this.getPropertyValue(property);
33
66
  },
34
67
  enumerable: true,
35
68
  configurable: true
@@ -2,43 +2,60 @@
2
2
 
3
3
  const parsers = require("../parsers");
4
4
 
5
- module.exports.parse = function parse(v) {
5
+ const property = "border-spacing";
6
+
7
+ module.exports.parse = function parse(v, opt = {}) {
8
+ const { globalObject } = opt;
6
9
  if (v === "") {
7
10
  return v;
8
11
  }
9
- const key = parsers.parseKeyword(v);
10
- if (key) {
11
- return key;
12
- }
13
- const parts = parsers.splitValue(v);
14
- if (!parts.length || parts.length > 2) {
15
- return;
16
- }
17
- const val = [];
18
- for (const part of parts) {
19
- const dim = parsers.parseLength(part);
20
- if (!dim) {
21
- return;
12
+ const value = parsers.parsePropertyValue(property, v, {
13
+ globalObject,
14
+ inArray: true
15
+ });
16
+ if (Array.isArray(value) && value.length) {
17
+ switch (value.length) {
18
+ case 1: {
19
+ const [part1] = value;
20
+ const val1 = parsers.parseLength([part1]);
21
+ if (val1) {
22
+ return val1;
23
+ }
24
+ break;
25
+ }
26
+ case 2: {
27
+ const [part1, part2] = value;
28
+ const val1 = parsers.parseLength([part1]);
29
+ const val2 = parsers.parseLength([part2]);
30
+ if (val1 && val2) {
31
+ return `${val1} ${val2}`;
32
+ }
33
+ break;
34
+ }
35
+ default:
22
36
  }
23
- val.push(dim);
24
- }
25
- return val.join(" ");
26
- };
27
-
28
- module.exports.isValid = function isValid(v) {
29
- if (v === "") {
30
- return true;
37
+ } else if (typeof value === "string") {
38
+ return value;
31
39
  }
32
- return typeof module.exports.parse(v) === "string";
33
40
  };
34
41
 
35
42
  module.exports.definition = {
36
43
  set(v) {
37
44
  v = parsers.prepareValue(v, this._global);
38
- this._setProperty("border-spacing", module.exports.parse(v));
45
+ if (parsers.hasVarFunc(v)) {
46
+ this._setProperty(property, v);
47
+ } else {
48
+ const val = module.exports.parse(v, {
49
+ globalObject: this._global
50
+ });
51
+ if (typeof val === "string") {
52
+ const priority = this._priorities.get(property) ?? "";
53
+ this._setProperty(property, val, priority);
54
+ }
55
+ }
39
56
  },
40
57
  get() {
41
- return this.getPropertyValue("border-spacing");
58
+ return this.getPropertyValue(property);
42
59
  },
43
60
  enumerable: true,
44
61
  configurable: true