From 0e554ab600274a93155b5e2801f66aaf8cd073e8 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Wed, 26 Nov 2025 13:29:59 +0100 Subject: [PATCH] css-syntax-patches-for-csstree: patch calc-size --- .../CHANGELOG.md | 5 ++++ .../dist/index.json | 4 ++-- .../patches/webref-over-csstree-types.json | 24 +++++++++++++++---- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/packages/css-syntax-patches-for-csstree/CHANGELOG.md b/packages/css-syntax-patches-for-csstree/CHANGELOG.md index 24cca8ae46..5bd9c744be 100644 --- a/packages/css-syntax-patches-for-csstree/CHANGELOG.md +++ b/packages/css-syntax-patches-for-csstree/CHANGELOG.md @@ -1,5 +1,10 @@ # Changes to CSS Syntax Patches For CSSTree +### Unreleased (patch) + +- Patch `calc-size()` to allow the `size` keyword + + ### 1.0.18 _November 26, 2025_ diff --git a/packages/css-syntax-patches-for-csstree/dist/index.json b/packages/css-syntax-patches-for-csstree/dist/index.json index d9210ade06..82f478eb0d 100644 --- a/packages/css-syntax-patches-for-csstree/dist/index.json +++ b/packages/css-syntax-patches-for-csstree/dist/index.json @@ -546,8 +546,8 @@ "calc-keyword": "e | pi | infinity | -infinity | NaN", "calc-mix()": "calc-mix( [ ? ]# )", "calc-product": " [ [ '*' | / ] ]*", - "calc-size-basis": "[ | | any | ]", - "calc-size()": "calc-size( , )", + "calc-size-basis": "[ | | ]", + "calc-size()": "calc-size( [ [ , [ | size ] ] | [ any , ] ] )", "calc-value": " | | | | ( )", "cf-image": "[ | ] && ?", "circle()": "circle( ? [ at ]? )", diff --git a/packages/css-syntax-patches-for-csstree/patches/webref-over-csstree-types.json b/packages/css-syntax-patches-for-csstree/patches/webref-over-csstree-types.json index 795b1db465..700e1d8a05 100644 --- a/packages/css-syntax-patches-for-csstree/patches/webref-over-csstree-types.json +++ b/packages/css-syntax-patches-for-csstree/patches/webref-over-csstree-types.json @@ -737,7 +737,7 @@ "comment": "", "syntax-b": "", "syntax-a": "[ | | any | ]", - "syntax-m": "[ | | any | ]", + "syntax-m": "[ | | ]", "tests": { "passing": [], "failing": [] @@ -745,13 +745,27 @@ }, "calc-size()": { "type": "added", - "comment": "", + "comment": "https://github.com/w3c/csswg-drafts/issues/13158", "syntax-b": "", "syntax-a": "calc-size( , )", - "syntax-m": "calc-size( , )", + "syntax-m": "calc-size( [ [ , [ | size ] ] | [ any , ] ] )", "tests": { - "passing": [], - "failing": [] + "passing": [ + { + "property": "height", + "value": "calc-size(auto, size)" + }, + { + "property": "height", + "value": "calc-size(auto, 10px)" + } + ], + "failing": [ + { + "property": "height", + "value": "calc-size(any, size)" + } + ] } }, "calc-value": {