@@ -1588,6 +1588,63 @@ Scrollable: the '@container/scrollable' feature</h4>
15881588 The [=scroll container=] has [=scrollable overflow=] in its inline direction.
15891589 </dl>
15901590
1591+ <h4 id="direction">
1592+ Direction: the '@container/direction' feature</h4>
1593+
1594+ <pre class="descdef mq">
1595+ Name : direction
1596+ For : @container
1597+ Value : none | top | right | bottom | left | block-start | inline-start | block-end | inline-end | x | y | block | inline
1598+ Type : discrete
1599+ </pre>
1600+
1601+ For a [=query container=] that is a [=scroll container=] ,
1602+ the '@container/direction' [=container feature=] queries the direction of its most recent [=relative scroll=] .
1603+ The logical values map to physical based on the direction and writing-mode of the [=query container=] .
1604+ None of the values match if the container is not a [=scroll container=] .
1605+
1606+ <dl dfn-type=value dfn-for="@container/direction">
1607+ <dt> <dfn>none</dfn>
1608+ <dd>
1609+ The [=query container=] has not had a [=relative scroll=] yet.
1610+ <dt> <dfn>top</dfn>
1611+ <dd>
1612+ The most recent [=relative scroll=] was upwards.
1613+ <dt> <dfn>right</dfn>
1614+ <dd>
1615+ The most recent [=relative scroll=] was to the right.
1616+ <dt> <dfn>bottom</dfn>
1617+ <dd>
1618+ The most recent [=relative scroll=] was downwards.
1619+ <dt> <dfn>left</dfn>
1620+ <dd>
1621+ The most recent [=relative scroll=] was to the left.
1622+ <dt> <dfn>block-start</dfn>
1623+ <dd>
1624+ The most recent [=relative scroll=] was towards the [=block-start=] direction.
1625+ <dt> <dfn>inline-start</dfn>
1626+ <dd>
1627+ The most recent [=relative scroll=] was towards the [=inline-start=] direction.
1628+ <dt> <dfn>block-end</dfn>
1629+ <dd>
1630+ The most recent [=relative scroll=] was towards the [=block-end=] direction.
1631+ <dt> <dfn>inline-end</dfn>
1632+ <dd>
1633+ The most recent [=relative scroll=] was towards the [=inline-end=] direction.
1634+ <dt> <dfn>x</dfn>
1635+ <dd>
1636+ The most recent [=relative scroll=] was in the horizontal direction.
1637+ <dt> <dfn>y</dfn>
1638+ <dd>
1639+ The most recent [=relative scroll=] was in the vertical direction.
1640+ <dt> <dfn>block</dfn>
1641+ <dd>
1642+ The most recent [=relative scroll=] was in the block direction.
1643+ <dt> <dfn>inline</dfn>
1644+ <dd>
1645+ The most recent [=relative scroll=] was in the inline direction.
1646+ </dl>
1647+
15911648
15921649<h2 id="container-lengths">
15931650Container Relative Lengths: the ''cqw'', ''cqh'', ''cqi'', ''cqb'', ''cqmin'', ''cqmax'' units</h2>
0 commit comments