cssstyle 5.3.2 → 5.3.4

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.
@@ -391,7 +391,7 @@ Object.defineProperties(CSSStyleDeclaration.prototype, {
391
391
  return;
392
392
  }
393
393
  let originalText = "";
394
- if (typeof this._onChange === "function") {
394
+ if (typeof this._onChange === "function" && !this._setInProgress) {
395
395
  originalText = this.cssText;
396
396
  }
397
397
  if (this._values.has(property)) {
@@ -414,8 +414,8 @@ Object.defineProperties(CSSStyleDeclaration.prototype, {
414
414
  this._values.set(property, val);
415
415
  if (
416
416
  typeof this._onChange === "function" &&
417
- this.cssText !== originalText &&
418
- !this._setInProgress
417
+ !this._setInProgress &&
418
+ this.cssText !== originalText
419
419
  ) {
420
420
  this._onChange(this.cssText);
421
421
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // autogenerated - 2025-10-31
2
+ // autogenerated - 2025-12-08
3
3
 
4
4
  module.exports = new Map([
5
5
  [
@@ -449,15 +449,15 @@ module.exports = new Map([
449
449
  "border",
450
450
  {
451
451
  "name": "border",
452
- "href": "https://drafts.csswg.org/css-backgrounds-3/#propdef-border",
452
+ "href": "https://drafts.csswg.org/css-borders-4/#propdef-border",
453
453
  "value": "<line-width> || <line-style> || <color>",
454
- "initial": "See individual properties",
455
- "appliesTo": "all elements except ruby base containers and ruby annotation containers",
456
- "inherited": "no",
457
- "percentages": "N/A",
454
+ "initial": "see individual properties",
455
+ "appliesTo": "see individual properties",
456
+ "inherited": "see individual properties",
457
+ "percentages": "see individual properties",
458
458
  "computedValue": "see individual properties",
459
- "canonicalOrder": "per grammar",
460
459
  "animationType": "see individual properties",
460
+ "canonicalOrder": "per grammar",
461
461
  "styleDeclaration": [
462
462
  "border"
463
463
  ]
@@ -761,15 +761,87 @@ module.exports = new Map([
761
761
  "border-style",
762
762
  {
763
763
  "name": "border-style",
764
- "href": "https://drafts.csswg.org/css-backgrounds-3/#propdef-border-style",
765
- "value": "<line-style>{1,4}",
764
+ "href": "https://drafts.csswg.org/css-borders-4/#propdef-border-style",
765
+ "value": "<'border-top-style'>{1,4}",
766
766
  "initial": "see individual properties",
767
- "appliesTo": "all elements except ruby base containers and ruby annotation containers",
768
- "inherited": "no",
769
- "percentages": "N/A",
767
+ "appliesTo": "see individual properties",
768
+ "inherited": "see individual properties",
769
+ "percentages": "see individual properties",
770
770
  "computedValue": "see individual properties",
771
- "canonicalOrder": "per grammar",
772
771
  "animationType": "see individual properties",
772
+ "canonicalOrder": "per grammar",
773
+ "values": [
774
+ {
775
+ "name": "none",
776
+ "prose": "No border. Color and width are ignored (i.e., the border has width 0). Note this means that the initial value of border-image-width will also resolve to zero.",
777
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-style-none",
778
+ "type": "value",
779
+ "value": "none"
780
+ },
781
+ {
782
+ "name": "hidden",
783
+ "prose": "Same as none, but has different behavior in the border conflict resolution rules for border-collapsed tables [CSS2].",
784
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-style-hidden",
785
+ "type": "value",
786
+ "value": "hidden"
787
+ },
788
+ {
789
+ "name": "dotted",
790
+ "prose": "A series of round dots.",
791
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-style-dotted",
792
+ "type": "value",
793
+ "value": "dotted"
794
+ },
795
+ {
796
+ "name": "dashed",
797
+ "prose": "A series of square-ended dashes.",
798
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-style-dashed",
799
+ "type": "value",
800
+ "value": "dashed"
801
+ },
802
+ {
803
+ "name": "solid",
804
+ "prose": "A single line segment.",
805
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-style-solid",
806
+ "type": "value",
807
+ "value": "solid"
808
+ },
809
+ {
810
+ "name": "double",
811
+ "prose": "Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal border-width.)",
812
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-style-double",
813
+ "type": "value",
814
+ "value": "double"
815
+ },
816
+ {
817
+ "name": "groove",
818
+ "prose": "Looks as if it were carved in the canvas. (This is typically achieved by creating a “shadow” from two colors that are slightly lighter and darker than the specified border-color.)",
819
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-style-groove",
820
+ "type": "value",
821
+ "value": "groove"
822
+ },
823
+ {
824
+ "name": "ridge",
825
+ "prose": "Looks as if it were coming out of the canvas.",
826
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-style-ridge",
827
+ "type": "value",
828
+ "value": "ridge"
829
+ },
830
+ {
831
+ "name": "inset",
832
+ "prose": "Looks as if the content on the inside of the border is sunken into the canvas. Treated as ridge in the collapsing border model. [CSS2]",
833
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-style-inset",
834
+ "type": "value",
835
+ "value": "inset"
836
+ },
837
+ {
838
+ "name": "outset",
839
+ "prose": "Looks as if the content on the inside of the border is raised out of the canvas. Treated as groove in the collapsing border model. [CSS2]",
840
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-style-outset",
841
+ "type": "value",
842
+ "value": "outset"
843
+ }
844
+ ],
773
845
  "styleDeclaration": [
774
846
  "border-style",
775
847
  "borderStyle"
@@ -859,15 +931,38 @@ module.exports = new Map([
859
931
  "border-width",
860
932
  {
861
933
  "name": "border-width",
862
- "href": "https://drafts.csswg.org/css-backgrounds-3/#propdef-border-width",
863
- "value": "<line-width>{1,4}",
934
+ "href": "https://drafts.csswg.org/css-borders-4/#propdef-border-width",
935
+ "value": "<'border-top-width'>{1,4}",
864
936
  "initial": "see individual properties",
865
- "appliesTo": "all elements except ruby base containers and ruby annotation containers",
866
- "inherited": "no",
937
+ "appliesTo": "see individual properties",
938
+ "inherited": "see individual properties",
867
939
  "percentages": "see individual properties",
868
940
  "computedValue": "see individual properties",
869
- "canonicalOrder": "per grammar",
870
941
  "animationType": "see individual properties",
942
+ "canonicalOrder": "per grammar",
943
+ "values": [
944
+ {
945
+ "name": "thin",
946
+ "prose": "Negative values are invalid. The thin, medium, and thick keywords are equivalent to 1px, 3px, and 5px, respectively.",
947
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-width-thin",
948
+ "type": "value",
949
+ "value": "thin"
950
+ },
951
+ {
952
+ "name": "medium",
953
+ "prose": "Negative values are invalid. The thin, medium, and thick keywords are equivalent to 1px, 3px, and 5px, respectively.",
954
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-width-medium",
955
+ "type": "value",
956
+ "value": "medium"
957
+ },
958
+ {
959
+ "name": "thick",
960
+ "prose": "Negative values are invalid. The thin, medium, and thick keywords are equivalent to 1px, 3px, and 5px, respectively.",
961
+ "href": "https://drafts.csswg.org/css-borders-4/#valdef-line-width-thick",
962
+ "type": "value",
963
+ "value": "thick"
964
+ }
965
+ ],
871
966
  "styleDeclaration": [
872
967
  "border-width",
873
968
  "borderWidth"
@@ -1943,7 +2038,7 @@ module.exports = new Map([
1943
2038
  {
1944
2039
  "name": "outline-color",
1945
2040
  "href": "https://drafts.csswg.org/css-ui-4/#propdef-outline-color",
1946
- "value": "auto | <color> | <image-1D>",
2041
+ "value": "auto | <'border-top-color'>",
1947
2042
  "initial": "auto",
1948
2043
  "appliesTo": "all elements",
1949
2044
  "inherited": "no",
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // autogenerated - 2025-10-31
2
+ // autogenerated - 2025-12-08
3
3
  // https://www.w3.org/Style/CSS/all-properties.en.html
4
4
 
5
5
  var external_dependency_parsers_0 = require("../parsers.js");
@@ -2432,7 +2432,7 @@ borderTop_export_parse = function parse(v, opt = {}) {
2432
2432
  if (parsedValues.has("border-top-color")) {
2433
2433
  return;
2434
2434
  }
2435
- const parsedValue = external_dependency_parsers_0.parseColor(`#${itemValue}`);
2435
+ const parsedValue = external_dependency_parsers_0.parseColor(value);
2436
2436
  if (!parsedValue) {
2437
2437
  return;
2438
2438
  }
@@ -2593,7 +2593,7 @@ borderRight_export_parse = function parse(v, opt = {}) {
2593
2593
  if (parsedValues.has("border-right-color")) {
2594
2594
  return;
2595
2595
  }
2596
- const parsedValue = external_dependency_parsers_0.parseColor(`#${itemValue}`);
2596
+ const parsedValue = external_dependency_parsers_0.parseColor(value);
2597
2597
  if (!parsedValue) {
2598
2598
  return;
2599
2599
  }
@@ -2754,7 +2754,7 @@ borderBottom_export_parse = function parse(v, opt = {}) {
2754
2754
  if (parsedValues.has("border-bottom-color")) {
2755
2755
  return;
2756
2756
  }
2757
- const parsedValue = external_dependency_parsers_0.parseColor(`#${itemValue}`);
2757
+ const parsedValue = external_dependency_parsers_0.parseColor(value);
2758
2758
  if (!parsedValue) {
2759
2759
  return;
2760
2760
  }
@@ -2915,7 +2915,7 @@ borderLeft_export_parse = function parse(v, opt = {}) {
2915
2915
  if (parsedValues.has("border-left-color")) {
2916
2916
  return;
2917
2917
  }
2918
- const parsedValue = external_dependency_parsers_0.parseColor(`#${itemValue}`);
2918
+ const parsedValue = external_dependency_parsers_0.parseColor(value);
2919
2919
  if (!parsedValue) {
2920
2920
  return;
2921
2921
  }
@@ -3099,7 +3099,7 @@ border_export_parse = function parse(v, opt = {}) {
3099
3099
  if (parsedValues.has("border-color")) {
3100
3100
  return;
3101
3101
  }
3102
- const parsedValue = external_dependency_parsers_0.parseColor(`#${itemValue}`);
3102
+ const parsedValue = external_dependency_parsers_0.parseColor(value);
3103
3103
  if (!parsedValue) {
3104
3104
  return;
3105
3105
  }
@@ -84,7 +84,7 @@ module.exports.parse = function parse(v, opt = {}) {
84
84
  if (parsedValues.has("border-color")) {
85
85
  return;
86
86
  }
87
- const parsedValue = parsers.parseColor(`#${itemValue}`);
87
+ const parsedValue = parsers.parseColor(value);
88
88
  if (!parsedValue) {
89
89
  return;
90
90
  }
@@ -74,7 +74,7 @@ module.exports.parse = function parse(v, opt = {}) {
74
74
  if (parsedValues.has("border-bottom-color")) {
75
75
  return;
76
76
  }
77
- const parsedValue = parsers.parseColor(`#${itemValue}`);
77
+ const parsedValue = parsers.parseColor(value);
78
78
  if (!parsedValue) {
79
79
  return;
80
80
  }
@@ -74,7 +74,7 @@ module.exports.parse = function parse(v, opt = {}) {
74
74
  if (parsedValues.has("border-left-color")) {
75
75
  return;
76
76
  }
77
- const parsedValue = parsers.parseColor(`#${itemValue}`);
77
+ const parsedValue = parsers.parseColor(value);
78
78
  if (!parsedValue) {
79
79
  return;
80
80
  }
@@ -74,7 +74,7 @@ module.exports.parse = function parse(v, opt = {}) {
74
74
  if (parsedValues.has("border-right-color")) {
75
75
  return;
76
76
  }
77
- const parsedValue = parsers.parseColor(`#${itemValue}`);
77
+ const parsedValue = parsers.parseColor(value);
78
78
  if (!parsedValue) {
79
79
  return;
80
80
  }
@@ -74,7 +74,7 @@ module.exports.parse = function parse(v, opt = {}) {
74
74
  if (parsedValues.has("border-top-color")) {
75
75
  return;
76
76
  }
77
- const parsedValue = parsers.parseColor(`#${itemValue}`);
77
+ const parsedValue = parsers.parseColor(value);
78
78
  if (!parsedValue) {
79
79
  return;
80
80
  }
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "CSSStyleDeclaration",
7
7
  "StyleSheet"
8
8
  ],
9
- "version": "5.3.2",
9
+ "version": "5.3.4",
10
10
  "homepage": "https://github.com/jsdom/cssstyle",
11
11
  "maintainers": [
12
12
  {
@@ -37,24 +37,27 @@
37
37
  ],
38
38
  "main": "./lib/CSSStyleDeclaration.js",
39
39
  "dependencies": {
40
- "@asamuzakjp/css-color": "^4.0.3",
41
- "@csstools/css-syntax-patches-for-csstree": "^1.0.14",
40
+ "@asamuzakjp/css-color": "^4.1.0",
41
+ "@csstools/css-syntax-patches-for-csstree": "1.0.14",
42
42
  "css-tree": "^3.1.0"
43
43
  },
44
+ "//dependenciesComments": {
45
+ "@csstools/css-syntax-patches-for-csstree": "pinned at 1.0.14 for now due to https://github.com/jsdom/cssstyle/issues/256"
46
+ },
44
47
  "devDependencies": {
45
- "@babel/generator": "^7.28.0",
46
- "@babel/parser": "^7.28.0",
47
- "@babel/traverse": "^7.28.0",
48
- "@babel/types": "^7.28.2",
48
+ "@babel/generator": "^7.28.5",
49
+ "@babel/parser": "^7.28.5",
50
+ "@babel/traverse": "^7.28.5",
51
+ "@babel/types": "^7.28.5",
49
52
  "@domenic/eslint-config": "^4.0.1",
50
53
  "@webref/css": "^6.23.6",
51
- "eslint": "^9.32.0",
54
+ "eslint": "^9.39.1",
52
55
  "eslint-config-prettier": "^10.1.8",
53
- "eslint-plugin-prettier": "^5.5.3",
54
- "globals": "^16.3.0",
56
+ "eslint-plugin-prettier": "^5.5.4",
57
+ "globals": "^16.5.0",
55
58
  "npm-run-all": "^4.1.5",
56
- "prettier": "^3.6.2",
57
- "resolve": "^1.22.10"
59
+ "prettier": "^3.7.4",
60
+ "resolve": "^1.22.11"
58
61
  },
59
62
  "scripts": {
60
63
  "download": "node ./scripts/downloadLatestProperties.mjs",