Skip to content

Commit 0e554ab

Browse files
committed
css-syntax-patches-for-csstree: patch calc-size
1 parent ddc6c78 commit 0e554ab

3 files changed

Lines changed: 26 additions & 7 deletions

File tree

packages/css-syntax-patches-for-csstree/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changes to CSS Syntax Patches For CSSTree
22

3+
### Unreleased (patch)
4+
5+
- Patch `calc-size()` to allow the `size` keyword
6+
7+
38
### 1.0.18
49

510
_November 26, 2025_

packages/css-syntax-patches-for-csstree/dist/index.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@
546546
"calc-keyword": "e | pi | infinity | -infinity | NaN",
547547
"calc-mix()": "calc-mix( [ <calc-sum> <percentage [0,100]>? ]# )",
548548
"calc-product": "<calc-value> [ [ '*' | / ] <calc-value> ]*",
549-
"calc-size-basis": "[ <size-keyword> | <calc-size()> | any | <calc-sum> ]",
550-
"calc-size()": "calc-size( <calc-size-basis> , <calc-sum> )",
549+
"calc-size-basis": "[ <size-keyword> | <calc-size()> | <calc-sum> ]",
550+
"calc-size()": "calc-size( [ [ <calc-size-basis> , [ <calc-sum> | size ] ] | [ any , <calc-sum> ] ] )",
551551
"calc-value": "<number> | <dimension> | <percentage> | <calc-keyword> | ( <calc-sum> )",
552552
"cf-image": "[ <image> | <color> ] && <percentage [0,100]>?",
553553
"circle()": "circle( <radial-size>? [ at <position> ]? )",

packages/css-syntax-patches-for-csstree/patches/webref-over-csstree-types.json

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -737,21 +737,35 @@
737737
"comment": "",
738738
"syntax-b": "",
739739
"syntax-a": "[ <size-keyword> | <calc-size()> | any | <calc-sum> ]",
740-
"syntax-m": "[ <size-keyword> | <calc-size()> | any | <calc-sum> ]",
740+
"syntax-m": "[ <size-keyword> | <calc-size()> | <calc-sum> ]",
741741
"tests": {
742742
"passing": [],
743743
"failing": []
744744
}
745745
},
746746
"calc-size()": {
747747
"type": "added",
748-
"comment": "",
748+
"comment": "https://github.com/w3c/csswg-drafts/issues/13158",
749749
"syntax-b": "",
750750
"syntax-a": "calc-size( <calc-size-basis> , <calc-sum> )",
751-
"syntax-m": "calc-size( <calc-size-basis> , <calc-sum> )",
751+
"syntax-m": "calc-size( [ [ <calc-size-basis> , [ <calc-sum> | size ] ] | [ any , <calc-sum> ] ] )",
752752
"tests": {
753-
"passing": [],
754-
"failing": []
753+
"passing": [
754+
{
755+
"property": "height",
756+
"value": "calc-size(auto, size)"
757+
},
758+
{
759+
"property": "height",
760+
"value": "calc-size(auto, 10px)"
761+
}
762+
],
763+
"failing": [
764+
{
765+
"property": "height",
766+
"value": "calc-size(any, size)"
767+
}
768+
]
755769
}
756770
},
757771
"calc-value": {

0 commit comments

Comments
 (0)