Skip to content

Commit 6fde89c

Browse files
authored
Add viewport segment media queries (#6234)
1 parent b0c5ad6 commit 6fde89c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

mediaqueries-5/Overview.bs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,46 @@ Inline-Axis Overflow: the '@media/overflow-inline' feature</h3>
12521252
and the very concept doesn't seem to make much sense,
12531253
so there is intentionally no ''paged'' value for '@media/overflow-inline'.
12541254

1255+
<h3 id='mf-horizontal-viewport-segments'>
1256+
Horizontal Viewport Segments: the '@media/horizontal-viewport-segments' feature</h3>
1257+
1258+
<pre class="descdef mq">
1259+
Name: horizontal-viewport-segments
1260+
Value: <<integer>>
1261+
For: @media
1262+
Type: range
1263+
</pre>
1264+
1265+
The '@media/horizontal-viewport-segments' media feature describes the number of logical segments of
1266+
the viewport in the horizontal direction.
1267+
1268+
The '@media/horizontal-viewport-segments' media feature is <a>false in the negative range</a>.
1269+
1270+
When the viewport is split by one or more hardware features (such as a fold or a hinge between
1271+
separate displays) that act as a logical divider, segments are the regions of the viewport that
1272+
can be treated as logically distinct by the page.
1273+
1274+
<h3 id='mf-vertical-viewport-segments'>
1275+
Vertical Viewport Segments: the '@media/vertical-viewport-segments' feature</h3>
1276+
1277+
<pre class="descdef mq">
1278+
Name: vertical-viewport-segments
1279+
Value: <<integer>>
1280+
For: @media
1281+
Type: range
1282+
</pre>
1283+
1284+
The '@media/vertical-viewport-segments' media feature describes the number of logical segments of
1285+
the viewport in the vertical direction.
1286+
1287+
The '@media/vertical-viewport-segments' media feature is <a>false in the negative range</a>.
1288+
1289+
<div class='example'>
1290+
This media query detects a viewport that has exactly two segments that are side-by-side.
1291+
1292+
<pre>@media (horizontal-viewport-segments: 2) and (vertical-viewport-segments: 1) { … }</pre>
1293+
</div>
1294+
12551295
<!--
12561296
████████ ████ ██████ ████████ ███████ ██ ██ ███ ██ ████ ████████ ██ ██
12571297
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██

0 commit comments

Comments
 (0)