From fa5896bafe0a28adf7c14be7bde4f09f92aa1ce4 Mon Sep 17 00:00:00 2001 From: Francois Daoust Date: Sat, 2 Nov 2024 11:03:10 +0100 Subject: [PATCH 1/2] Add patch for ed/css/css-values-5.json Amend syntax of `if()`, drop value of `` --- ed/csspatches/css-values-5.json.patch | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 ed/csspatches/css-values-5.json.patch diff --git a/ed/csspatches/css-values-5.json.patch b/ed/csspatches/css-values-5.json.patch new file mode 100644 index 000000000000..5ccaad82e0b8 --- /dev/null +++ b/ed/csspatches/css-values-5.json.patch @@ -0,0 +1,41 @@ +From 7c701a918b3d08e85a6cfa70a531d019882378dc Mon Sep 17 00:00:00 2001 +From: Francois Daoust +Date: Sat, 2 Nov 2024 10:59:54 +0100 +Subject: [PATCH] Amend syntax of `if()`, drop value of `` + +For `if()`, parsing fails on `;?`. That seems like a bug in the CSS parser, +reported in: +https://github.com/csstree/csstree/issues/303 + +For ``, the problem is that the spec extends the Value Definition +Syntax with a new construct that is not yet supported by the CSS parser. Not +much that can be done in the meantime except dropping the value. Need to +support the new construct raised in: +https://github.com/csstree/csstree/issues/304 +--- + ed/css/css-values-5.json | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/ed/css/css-values-5.json b/ed/css/css-values-5.json +index 8aa66d177..7b6b54fb7 100644 +--- a/ed/css/css-values-5.json ++++ b/ed/css/css-values-5.json +@@ -462,13 +462,12 @@ + "name": "", + "href": "https://drafts.csswg.org/css-values-5/#typedef-if", + "type": "type", +- "value": "if( [ : ? ; ]* : ? ;? )" ++ "value": "if( [ : ? ; ]* : ? ';'? )" + }, + { + "name": "", + "href": "https://drafts.csswg.org/css-values-5/#typedef-if-condition", +- "type": "type", +- "value": " ]> | else" ++ "type": "type" + }, + { + "name": "", +-- +2.37.1.windows.1 + From 40b055e1e29c371acfb1de62671bb1eb00b9d3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Daoust?= Date: Mon, 4 Nov 2024 13:38:31 +0100 Subject: [PATCH 2/2] Update css-values-5.json.patch Link to internal issue for CSSTree update --- ed/csspatches/css-values-5.json.patch | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ed/csspatches/css-values-5.json.patch b/ed/csspatches/css-values-5.json.patch index 5ccaad82e0b8..31edb7bac020 100644 --- a/ed/csspatches/css-values-5.json.patch +++ b/ed/csspatches/css-values-5.json.patch @@ -3,15 +3,16 @@ From: Francois Daoust Date: Sat, 2 Nov 2024 10:59:54 +0100 Subject: [PATCH] Amend syntax of `if()`, drop value of `` -For `if()`, parsing fails on `;?`. That seems like a bug in the CSS parser, -reported in: -https://github.com/csstree/csstree/issues/303 +For `if()`, parsing fails on `;?`. For ``, the problem is that the spec extends the Value Definition -Syntax with a new construct that is not yet supported by the CSS parser. Not -much that can be done in the meantime except dropping the value. Need to -support the new construct raised in: -https://github.com/csstree/csstree/issues/304 +Syntax with a new construct that is not yet supported by the CSS parser. + +Both problems have been fixed in CSSTree already, but a new version still needs +to be released. See tracking issue in: +https://github.com/w3c/webref/issues/1378 + + --- ed/css/css-values-5.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)