@@ -1306,40 +1306,67 @@ Display Modes: the ''display-mode'' media feature </h3>
13061306 Type : discrete
13071307 </pre>
13081308
1309- The 'display-mode' media feature represents the [=display mode=] of the current [=browsing context=] .
1310- Child browsing contexts reflect the [=display mode=] of their [=top-level browsing context=] .
1309+ The '@media/display-mode' media feature describes the mode in which the current [=browsing context=] is
1310+ currently being presented to the end user. In child browsing contexts, the [=display mode=] must
1311+ match that of the [=top-level browsing context=] .
1312+
1313+ This feature is primarily used to determine which [=display mode=] the user agent has applied to
1314+ an [=application context=] . As such, the values of this feature correspond to the [=display
1315+ mode|display modes=] defined in [[APPMANIFEST]] . However, it can also be used in non-application
1316+ contexts to determine whether the viewport is in fullscreen mode.
13111317
1312- The values of this feature correspond to the [=display mode|display modes=] defined in
1313- [[APPMANIFEST]] :
13141318
13151319 <dl dfn-type=value dfn-for="@media/display-mode">
13161320 <dt> <dfn>fullscreen</dfn>
13171321 <dd>
1318- The [=display mode/fullscreen=] display mode.
1322+ The browsing context is displayed with browser UI elements hidden and takes up the entirety of
1323+ the available display area. The fullscreen context may have been caused by the [=display
1324+ mode/fullscreen=] display mode in the [=application manifest=] , by the {{requestFullscreen()}}
1325+ method of the [[FULLSCREEN|Fullscreen API]] , or through some other means (such as the user
1326+ manually activating fullscreen mode using the user agent's built-in controls).
1327+
1328+ Corresponds to the [=display mode/fullscreen=] display mode.
13191329
13201330 <dt> <dfn>standalone</dfn>
13211331 <dd>
1322- The [=display mode/standalone=] display mode.
1332+ The [=display mode/standalone=] display mode is in use .
13231333
13241334 <dt> <dfn>minimal-ui</dfn>
13251335 <dd>
1326- The [=display mode/minimal-ui=] display mode.
1336+ The [=display mode/minimal-ui=] display mode is in use .
13271337
13281338 <dt> <dfn>browser</dfn>
13291339 <dd>
1330- The [=display mode/browser=] display mode.
1340+ The browsing context is displayed using the platform-specific convention for opening
1341+ hyperlinks in the user agent (e.g., in a browser tab or web browser window with controls such
1342+ as an address bar). This should be used for non-[=application context|application contexts=]
1343+ that are not fullscreen.
1344+
1345+ Corresponds to the [=display mode/browser=] display mode.
13311346 </dl>
13321347
1333- This media feature reflects the actual [=display mode=] that is being used on the current browsing
1334- context, not necessarily the one that was requested in the web app manifest (if any).
1348+ <div class="example">
1349+ For example, the [=application manifest=] can request the [=display mode/standalone=] [=display
1350+ mode=] as follows:
1351+ <pre class="lang-json">
1352+ {
1353+ "display": "standalone"
1354+ }
1355+ </pre>
1356+
1357+ This media query can be used to determine whether the user agent has actually applied the
1358+ [=display mode/standalone=] mode:
13351359
1336- Note: When a page is being displayed in a normal web browser, 'display-mode' will always have a
1337- value of ''browser'' . Only pages appearing in the context of an [=installed web application=] will
1338- have a different 'display-mode' , reflecting the way in which the application window is being
1339- presented to the end user.
1360+ <pre class="lang-css"> @media (display-mode: standalone) { … }</pre>
1361+
1362+ The user agent could set '@media/display-mode' to any of the other values, depending on the
1363+ actual mode currently in use. When used outside of an [=application context=] , the
1364+ '@media/display-mode' will always be ''display-mode/browser'' or ''display-mode/fullscreen'' .
1365+ </div>
13401366
13411367 <details class="note">
1342- <summary> The [=display mode/fullscreen=] [=display mode=] is distinct from the [[FULLSCREEN|Fullscreen API]] .</summary>
1368+ <summary> The [=display mode/fullscreen=] [=display mode=] is distinct from the
1369+ [[FULLSCREEN|Fullscreen API]] .</summary>
13431370
13441371 The ''fullscreen'' value for [=display-mode=] is not directly related
13451372 to the CSS '':fullscreen'' pseudo-class.
@@ -1363,18 +1390,17 @@ Display Modes: the ''display-mode'' media feature </h3>
13631390
13641391 <pre class="lang-css">
13651392 /* applies when the viewport is fullscreen */
1366- @media (display-mode: fullscreen) {
1367- ...
1368- }
1393+ @media (display-mode: fullscreen) { … }
13691394
13701395 /* applies when an element is fullscreen */
1371- #game:fullscreen {
1372- ...
1373- }
1396+ #game:fullscreen { … }
13741397 </pre>
13751398 </div>
13761399 </details>
13771400
1401+ Note: Additional values for this media feature may be added in the future to
1402+ match new [=display mode|display modes=] added to [[APPMANIFEST]] .
1403+
13781404<!--
13791405████████ ████ ██████ ████████ ███████ ██ ██ ███ ██ ████ ████████ ██ ██
13801406██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
0 commit comments