Skip to content

Commit 420269e

Browse files
authored
[css-conditional-5] Add 'none'-keywords to scroll-state() features (w3c#10874)
- Unintentionally left out in the original scroll-state() PR. - Reference the media queries spec for boolean context evaluation
1 parent e4dc7b6 commit 420269e

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

css-conditional-5/Overview.bs

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,8 @@ Container Features</h2>
868868
A <dfn export>container feature</dfn>
869869
queries a specific aspect of a [=query container=].
870870

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

872874
<h3 id="size-container">
873875
Size Container Features</h3>
@@ -1127,7 +1129,7 @@ Sticky positioning: the '@container/stuck' feature</h4>
11271129
<pre class="descdef mq">
11281130
Name: stuck
11291131
For: @container
1130-
Value: top | right | bottom | left | block-start | inline-start | block-end | inline-end
1132+
Value: none | top | right | bottom | left | block-start | inline-start | block-end | inline-end
11311133
Type: discrete
11321134
</pre>
11331135

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

1155-
In the boolean context, the query matches if visual shift is applied in any
1156-
direction.
1157-
11581157
<dl dfn-type=value dfn-for="@container/stuck">
1158+
<dt><dfn>none</dfn>
1159+
<dd>
1160+
The ''position/sticky'' container is not shifted in any direction.
11591161
<dt><dfn>top</dfn>
11601162
<dd>
11611163
The ''position/sticky'' container is shifted to stay inside the top edge.
@@ -1188,27 +1190,29 @@ Scroll snapping: the '@container/snapped' feature</h4>
11881190
<pre class="descdef mq">
11891191
Name: snapped
11901192
For: @container
1191-
Value: x | y | block | inline
1193+
Value: none | x | y | block | inline
11921194
Type: discrete
11931195
</pre>
11941196

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

11991200
<dl dfn-type=value dfn-for="@container/snapped">
1201+
<dt><dfn>none</dfn>
1202+
<dd>
1203+
The [=query container=] is not a [=snap target=].
12001204
<dt><dfn>x</dfn>
12011205
<dd>
12021206
'@container/snapped' [=container feature=] matches ''x''
1203-
if the [=query container=] is a horizontal [=snap target=] for its [=scroll container=]
1207+
if the [=query container=] is a horizontal [=snap target=] for its [=scroll container=].
12041208
<dt><dfn>y</dfn>
12051209
<dd>
12061210
'@container/snapped' [=container feature=] matches ''y''
1207-
if the [=query container=] is a vertical [=snap target=] for its [=scroll container=]
1211+
if the [=query container=] is a vertical [=snap target=] for its [=scroll container=].
12081212
<dt><dfn>block</dfn>
12091213
<dd>
12101214
'@container/snapped' [=container feature=] matches ''block''
1211-
if the [=query container=] is a [=snap target=] for its [=scroll container=]
1215+
if the [=query container=] is a [=snap target=] for its [=scroll container=].
12121216
in the block direction of the [=snap container=].
12131217
<dt><dfn>inline</dfn>
12141218
<dd>
@@ -1223,7 +1227,7 @@ Overflowing: the '@container/overflowing' feature</h4>
12231227
<pre class="descdef mq">
12241228
Name: overflowing
12251229
For: @container
1226-
Value: top | right | bottom | left | block-start | inline-start | block-end | inline-end
1230+
Value: none | top | right | bottom | left | block-start | inline-start | block-end | inline-end
12271231
Type: discrete
12281232
</pre>
12291233

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

1240-
In the boolean context, the query matches if any of the values match.
1241-
12421244
<dl dfn-type=value dfn-for="@container/overflowing">
1245+
<dt><dfn>none</dfn>
1246+
<dd>
1247+
The [=scroll container=] does not have [=scrollable overflow=] in any direction.
12431248
<dt><dfn>top</dfn>
12441249
<dd>
12451250
The [=scroll container=] has [=scrollable overflow=] past the top edge.

0 commit comments

Comments
 (0)