Skip to content

Commit

Permalink
[css-conditional-5] Add 'none'-keywords to scroll-state() features (#…
Browse files Browse the repository at this point in the history
…10874)

- Unintentionally left out in the original scroll-state() PR.
- Reference the media queries spec for boolean context evaluation
  • Loading branch information
lilles committed Sep 18, 2024
1 parent e4dc7b6 commit 420269e
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions css-conditional-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,8 @@ Container Features</h2>
A <dfn export>container feature</dfn>
queries a specific aspect of a [=query container=].

[=Container features=] use the same rules as [=media features=] when evaluating
in a [=boolean context=].

<h3 id="size-container">
Size Container Features</h3>
Expand Down Expand Up @@ -1127,7 +1129,7 @@ Sticky positioning: the '@container/stuck' feature</h4>
<pre class="descdef mq">
Name: stuck
For: @container
Value: top | right | bottom | left | block-start | inline-start | block-end | inline-end
Value: none | top | right | bottom | left | block-start | inline-start | block-end | inline-end
Type: discrete
</pre>

Expand All @@ -1152,10 +1154,10 @@ Sticky positioning: the '@container/stuck' feature</h4>
</pre>
</div>

In the boolean context, the query matches if visual shift is applied in any
direction.

<dl dfn-type=value dfn-for="@container/stuck">
<dt><dfn>none</dfn>
<dd>
The ''position/sticky'' container is not shifted in any direction.
<dt><dfn>top</dfn>
<dd>
The ''position/sticky'' container is shifted to stay inside the top edge.
Expand Down Expand Up @@ -1188,27 +1190,29 @@ Scroll snapping: the '@container/snapped' feature</h4>
<pre class="descdef mq">
Name: snapped
For: @container
Value: x | y | block | inline
Value: none | x | y | block | inline
Type: discrete
</pre>

The '@container/snapped' [=container feature=] queries whether a [=snap target=]
is snapped to its [=snap container=] in the given axis. It matches in the boolean
context if it is snapped in at least one of the directions.
is snapped to its [=snap container=] in the given axis.

<dl dfn-type=value dfn-for="@container/snapped">
<dt><dfn>none</dfn>
<dd>
The [=query container=] is not a [=snap target=].
<dt><dfn>x</dfn>
<dd>
'@container/snapped' [=container feature=] matches ''x''
if the [=query container=] is a horizontal [=snap target=] for its [=scroll container=]
if the [=query container=] is a horizontal [=snap target=] for its [=scroll container=].
<dt><dfn>y</dfn>
<dd>
'@container/snapped' [=container feature=] matches ''y''
if the [=query container=] is a vertical [=snap target=] for its [=scroll container=]
if the [=query container=] is a vertical [=snap target=] for its [=scroll container=].
<dt><dfn>block</dfn>
<dd>
'@container/snapped' [=container feature=] matches ''block''
if the [=query container=] is a [=snap target=] for its [=scroll container=]
if the [=query container=] is a [=snap target=] for its [=scroll container=].
in the block direction of the [=snap container=].
<dt><dfn>inline</dfn>
<dd>
Expand All @@ -1223,7 +1227,7 @@ Overflowing: the '@container/overflowing' feature</h4>
<pre class="descdef mq">
Name: overflowing
For: @container
Value: top | right | bottom | left | block-start | inline-start | block-end | inline-end
Value: none | top | right | bottom | left | block-start | inline-start | block-end | inline-end
Type: discrete
</pre>

Expand All @@ -1237,9 +1241,10 @@ Overflowing: the '@container/overflowing' feature</h4>
the [=query container=]. None of the values match if the container is not a
[=scroll container=].

In the boolean context, the query matches if any of the values match.

<dl dfn-type=value dfn-for="@container/overflowing">
<dt><dfn>none</dfn>
<dd>
The [=scroll container=] does not have [=scrollable overflow=] in any direction.
<dt><dfn>top</dfn>
<dd>
The [=scroll container=] has [=scrollable overflow=] past the top edge.
Expand Down

0 comments on commit 420269e

Please sign in to comment.