Skip to content

Commit 26a0716

Browse files
authored
css-syntax-patches-for-csstree: patch overflow-* (#1725)
1 parent 828ba22 commit 26a0716

File tree

6 files changed

+119
-4
lines changed

6 files changed

+119
-4
lines changed

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 `overflow-*` to include `<-non-standard-overflow>`
6+
7+
38
### 1.0.19
49

510
_November 26, 2025_

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@
339339
"outline-color": "auto | <'border-top-color'>",
340340
"outline-style": "auto | none | dotted | dashed | solid | double | groove | ridge | inset | outset",
341341
"overflow": "<'overflow-block'>{1,2} | <-non-standard-overflow>",
342+
"overflow-block": "| <-non-standard-overflow>",
342343
"overflow-clip-margin-block": "<visual-box> || <length [0,∞]>",
343344
"overflow-clip-margin-block-end": "<visual-box> || <length [0,∞]>",
344345
"overflow-clip-margin-block-start": "<visual-box> || <length [0,∞]>",
@@ -349,6 +350,9 @@
349350
"overflow-clip-margin-left": "<visual-box> || <length [0,∞]>",
350351
"overflow-clip-margin-right": "<visual-box> || <length [0,∞]>",
351352
"overflow-clip-margin-top": "<visual-box> || <length [0,∞]>",
353+
"overflow-inline": "| <-non-standard-overflow>",
354+
"overflow-x": "| <-non-standard-overflow>",
355+
"overflow-y": "| <-non-standard-overflow>",
352356
"padding": "<'padding-top'>{1,4}",
353357
"padding-block": "<'padding-top'>{1,2}",
354358
"padding-block-end": "<'padding-top'>",

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

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4027,6 +4027,24 @@
40274027
"failing": []
40284028
}
40294029
},
4030+
"overflow-block": {
4031+
"type": "modified",
4032+
"comment": "",
4033+
"syntax-b": "visible | hidden | clip | scroll | auto",
4034+
"syntax-a": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>",
4035+
"syntax-m": "| <-non-standard-overflow>",
4036+
"tests": {
4037+
"passing": [
4038+
{
4039+
"value": "visible"
4040+
},
4041+
{
4042+
"value": "overlay"
4043+
}
4044+
],
4045+
"failing": []
4046+
}
4047+
},
40304048
"overflow-clip-margin-block": {
40314049
"type": "added",
40324050
"comment": "",
@@ -4137,6 +4155,60 @@
41374155
"failing": []
41384156
}
41394157
},
4158+
"overflow-inline": {
4159+
"type": "modified",
4160+
"comment": "",
4161+
"syntax-b": "visible | hidden | clip | scroll | auto",
4162+
"syntax-a": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>",
4163+
"syntax-m": "| <-non-standard-overflow>",
4164+
"tests": {
4165+
"passing": [
4166+
{
4167+
"value": "visible"
4168+
},
4169+
{
4170+
"value": "overlay"
4171+
}
4172+
],
4173+
"failing": []
4174+
}
4175+
},
4176+
"overflow-x": {
4177+
"type": "modified",
4178+
"comment": "",
4179+
"syntax-b": "visible | hidden | clip | scroll | auto",
4180+
"syntax-a": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>",
4181+
"syntax-m": "| <-non-standard-overflow>",
4182+
"tests": {
4183+
"passing": [
4184+
{
4185+
"value": "visible"
4186+
},
4187+
{
4188+
"value": "overlay"
4189+
}
4190+
],
4191+
"failing": []
4192+
}
4193+
},
4194+
"overflow-y": {
4195+
"type": "modified",
4196+
"comment": "",
4197+
"syntax-b": "visible | hidden | clip | scroll | auto",
4198+
"syntax-a": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>",
4199+
"syntax-m": "| <-non-standard-overflow>",
4200+
"tests": {
4201+
"passing": [
4202+
{
4203+
"value": "visible"
4204+
},
4205+
{
4206+
"value": "overlay"
4207+
}
4208+
],
4209+
"failing": []
4210+
}
4211+
},
41404212
"padding": {
41414213
"type": "modified",
41424214
"comment": "",

packages/css-syntax-patches-for-csstree/raw-data/webref-over-csstree-properties.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,6 +1751,12 @@
17511751
"syntax-a": "<'overflow-block'>{1,2}",
17521752
"comment": ""
17531753
},
1754+
"overflow-block": {
1755+
"type": "modified",
1756+
"syntax-b": "visible | hidden | clip | scroll | auto",
1757+
"syntax-a": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>",
1758+
"comment": ""
1759+
},
17541760
"overflow-clip-margin-block": {
17551761
"type": "added",
17561762
"syntax-b": "",
@@ -1811,6 +1817,24 @@
18111817
"syntax-a": "<visual-box> || <length [0,∞]>",
18121818
"comment": ""
18131819
},
1820+
"overflow-inline": {
1821+
"type": "modified",
1822+
"syntax-b": "visible | hidden | clip | scroll | auto",
1823+
"syntax-a": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>",
1824+
"comment": ""
1825+
},
1826+
"overflow-x": {
1827+
"type": "modified",
1828+
"syntax-b": "visible | hidden | clip | scroll | auto",
1829+
"syntax-a": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>",
1830+
"comment": ""
1831+
},
1832+
"overflow-y": {
1833+
"type": "modified",
1834+
"syntax-b": "visible | hidden | clip | scroll | auto",
1835+
"syntax-a": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>",
1836+
"comment": ""
1837+
},
18141838
"padding": {
18151839
"type": "modified",
18161840
"syntax-b": "[ <length> | <percentage> ]{1,4}",

packages/css-syntax-patches-for-csstree/raw-data/webref-properties.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,7 @@
16501650
"syntax": "auto | none"
16511651
},
16521652
"overflow-block": {
1653-
"syntax": "visible | hidden | clip | scroll | auto"
1653+
"syntax": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>"
16541654
},
16551655
"overflow-clip-box": {
16561656
"syntax": "padding-box | content-box"
@@ -1689,7 +1689,7 @@
16891689
"syntax": "<visual-box> || <length [0,∞]>"
16901690
},
16911691
"overflow-inline": {
1692-
"syntax": "visible | hidden | clip | scroll | auto"
1692+
"syntax": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>"
16931693
},
16941694
"-webkit-overflow-scrolling": {
16951695
"syntax": "auto | touch"
@@ -1701,10 +1701,10 @@
17011701
"syntax": "normal | break-word | anywhere"
17021702
},
17031703
"overflow-x": {
1704-
"syntax": "visible | hidden | clip | scroll | auto"
1704+
"syntax": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>"
17051705
},
17061706
"overflow-y": {
1707-
"syntax": "visible | hidden | clip | scroll | auto"
1707+
"syntax": "visible | hidden | clip | scroll | auto | <-non-standard-overflow>"
17081708
},
17091709
"overlay": {
17101710
"syntax": "none | auto"

packages/css-syntax-patches-for-csstree/scripts/generate-webref-sets.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,16 @@ export async function generate_webref_sets() {
112112
property.syntax = 'rect( <top> , <right> , <bottom> , <left> ) | rect( <top> <right> <bottom> <left> ) | auto';
113113
}
114114

115+
// https://github.com/csstree/csstree/pull/354
116+
if ((
117+
property.name === 'overflow-x' ||
118+
property.name === 'overflow-y' ||
119+
property.name === 'overflow-inline' ||
120+
property.name === 'overflow-block'
121+
) && property.syntax === 'visible | hidden | clip | scroll | auto') {
122+
property.syntax = '| <-non-standard-overflow>';
123+
}
124+
115125
if (!property.syntax) {
116126
continue;
117127
}

0 commit comments

Comments
 (0)