From 943787fc4b0f63bf0f4387752d9d4f5a7c1d018c Mon Sep 17 00:00:00 2001 From: Munira Tursunova Date: Wed, 27 Aug 2025 15:50:21 +0200 Subject: [PATCH 1/7] [css-conditional-5] Define direction feature for scroll-state() queries --- css-conditional-5/Overview.bs | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/css-conditional-5/Overview.bs b/css-conditional-5/Overview.bs index 1e18523f3c8..5e047bab08c 100644 --- a/css-conditional-5/Overview.bs +++ b/css-conditional-5/Overview.bs @@ -1587,6 +1587,62 @@ Scrollable: the '@container/scrollable' feature The [=scroll container=] has [=scrollable overflow=] in its inline direction. +

+Direction: the '@container/direction' feature

+ +
+		Name: direction
+		For: @container
+		Value: none | top | right | bottom | left | block-start | inline-start | block-end | inline-end | x | y | block | inline
+		Type: discrete
+	
+ + The '@container/direction' [=container feature=] queries the most recent scroll direction of a [=scroll container=] based on [=relative scroll=]. + The logical values map to physical based on the direction and writing-mode of the [=query container=]. + None of the values match if the container is not a [=scroll container=]. + +
+
none +
+ There has been no [=relative scroll=]. +
top +
+ The most recent [=relative scroll=] was upwards. +
right +
+ The most recent [=relative scroll=] was to the right. +
bottom +
+ The most recent [=relative scroll=] was downwards. +
left +
+ The most recent [=relative scroll=] was to the left. +
block-start +
+ The most recent [=relative scroll=] was against the block flow direction. +
inline-start +
+ The most recent [=relative scroll=] was against the inline flow direction. +
block-end +
+ The most recent [=relative scroll=] was in the block flow direction. +
inline-end +
+ The most recent [=relative scroll=] was in the inline flow direction. +
x +
+ The most recent [=relative scroll=] was in the horizontal direction. +
y +
+ The most recent [=relative scroll=] was in the vertical direction. +
block +
+ The most recent [=relative scroll=] was in the block direction. +
inline +
+ The most recent [=relative scroll=] was in the inline direction. +
+

Container Relative Lengths: the ''cqw'', ''cqh'', ''cqi'', ''cqb'', ''cqmin'', ''cqmax'' units

From 466b750919091da6d3684a702da8e7e2a71c322f Mon Sep 17 00:00:00 2001 From: "Tab Atkins Jr." Date: Tue, 2 Sep 2025 14:53:47 -0700 Subject: [PATCH 2/7] Update css-conditional-5/Overview.bs --- css-conditional-5/Overview.bs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/css-conditional-5/Overview.bs b/css-conditional-5/Overview.bs index 5e047bab08c..ed9c8de9316 100644 --- a/css-conditional-5/Overview.bs +++ b/css-conditional-5/Overview.bs @@ -1597,7 +1597,8 @@ Direction: the '@container/direction' feature Type: discrete - The '@container/direction' [=container feature=] queries the most recent scroll direction of a [=scroll container=] based on [=relative scroll=]. + For a [=query container=] that is a [=scroll container=], + the '@container/direction' [=container feature=] queries the direction of its most recent [=relative scroll=]. The logical values map to physical based on the direction and writing-mode of the [=query container=]. None of the values match if the container is not a [=scroll container=]. From 06a84dffb6f8f929ed527b68a5bf673613a7bd75 Mon Sep 17 00:00:00 2001 From: "Tab Atkins Jr." Date: Tue, 2 Sep 2025 14:53:55 -0700 Subject: [PATCH 3/7] Update css-conditional-5/Overview.bs --- css-conditional-5/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-conditional-5/Overview.bs b/css-conditional-5/Overview.bs index ed9c8de9316..327955d6e52 100644 --- a/css-conditional-5/Overview.bs +++ b/css-conditional-5/Overview.bs @@ -1620,7 +1620,7 @@ Direction: the '@container/direction' feature The most recent [=relative scroll=] was to the left.
block-start
- The most recent [=relative scroll=] was against the block flow direction. + The most recent [=relative scroll=] was towards the [=block-start=] direction.
inline-start
The most recent [=relative scroll=] was against the inline flow direction. From bc6f2566965181a71d6fdd6d1af4f03b9320850b Mon Sep 17 00:00:00 2001 From: "Tab Atkins Jr." Date: Tue, 2 Sep 2025 14:54:02 -0700 Subject: [PATCH 4/7] Update css-conditional-5/Overview.bs --- css-conditional-5/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-conditional-5/Overview.bs b/css-conditional-5/Overview.bs index 327955d6e52..5de15b6f866 100644 --- a/css-conditional-5/Overview.bs +++ b/css-conditional-5/Overview.bs @@ -1623,7 +1623,7 @@ Direction: the '@container/direction' feature The most recent [=relative scroll=] was towards the [=block-start=] direction.
inline-start
- The most recent [=relative scroll=] was against the inline flow direction. + The most recent [=relative scroll=] was towards the [=inline-start=] direction.
block-end
The most recent [=relative scroll=] was in the block flow direction. From 604892fc485b3a25bf38f4768806a4f927efd76f Mon Sep 17 00:00:00 2001 From: "Tab Atkins Jr." Date: Tue, 2 Sep 2025 14:54:10 -0700 Subject: [PATCH 5/7] Update css-conditional-5/Overview.bs --- css-conditional-5/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-conditional-5/Overview.bs b/css-conditional-5/Overview.bs index 5de15b6f866..8918efccab3 100644 --- a/css-conditional-5/Overview.bs +++ b/css-conditional-5/Overview.bs @@ -1626,7 +1626,7 @@ Direction: the '@container/direction' feature The most recent [=relative scroll=] was towards the [=inline-start=] direction.
block-end
- The most recent [=relative scroll=] was in the block flow direction. + The most recent [=relative scroll=] was towards the [=block-end=] direction.
inline-end
The most recent [=relative scroll=] was in the inline flow direction. From 21971b704bea6413e975ae21e479dbe281974583 Mon Sep 17 00:00:00 2001 From: "Tab Atkins Jr." Date: Tue, 2 Sep 2025 14:54:16 -0700 Subject: [PATCH 6/7] Update css-conditional-5/Overview.bs --- css-conditional-5/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-conditional-5/Overview.bs b/css-conditional-5/Overview.bs index 8918efccab3..8d0613fc622 100644 --- a/css-conditional-5/Overview.bs +++ b/css-conditional-5/Overview.bs @@ -1629,7 +1629,7 @@ Direction: the '@container/direction' feature The most recent [=relative scroll=] was towards the [=block-end=] direction.
inline-end
- The most recent [=relative scroll=] was in the inline flow direction. + The most recent [=relative scroll=] was towards the [=inline-end=] direction.
x
The most recent [=relative scroll=] was in the horizontal direction. From dae97489c0b35718a943ebff4c64a876639a20f2 Mon Sep 17 00:00:00 2001 From: "Tab Atkins Jr." Date: Tue, 2 Sep 2025 14:54:24 -0700 Subject: [PATCH 7/7] Update css-conditional-5/Overview.bs --- css-conditional-5/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-conditional-5/Overview.bs b/css-conditional-5/Overview.bs index 8d0613fc622..4dfec1fd2fb 100644 --- a/css-conditional-5/Overview.bs +++ b/css-conditional-5/Overview.bs @@ -1605,7 +1605,7 @@ Direction: the '@container/direction' feature
none
- There has been no [=relative scroll=]. + The [=query container=] has not had a [=relative scroll=] yet.
top
The most recent [=relative scroll=] was upwards.