@@ -1306,94 +1306,54 @@ Display Modes: the ''display-mode'' media feature </h3>
1306
1306
Type : discrete
1307
1307
</pre>
1308
1308
1309
- The 'display-mode' media feature represents the [=display mode=] of the web application .
1309
+ The 'display-mode' media feature represents the [=display mode=] of the current [=browsing context=] .
1310
1310
Child browsing contexts reflect the [=display mode=] of their [=top-level browsing context=] .
1311
1311
1312
- A <dfn export>display mode</dfn> represents
1313
- how the web application is being presented within the context of an OS (e.g., in fullscreen, etc.).
1314
- Display modes correspond to user interface (UI) metaphors
1315
- and functionality in use on a given platform.
1316
- The UI conventions of the display modes are purely advisory
1317
- and implementers are free to interpret them how they best see fit.
1312
+ The values of this feature correspond to the [=display mode|display modes=] defined in
1313
+ [[APPMANIFEST]] . However, this media feature reflects the actual display mode that is being used
1314
+ on the current browsing context, not necessarily the one that was requested in the web app
1315
+ manifest (if any).
1318
1316
1319
- This specification defines the following [=display modes=] :
1320
- <dl dfn-for="display mode" export>
1321
- <dt> <dfn>fullscreen</dfn>
1322
- <dd>
1323
- The web application is displayed with browser UI elements hidden
1324
- and takes up the entirety of the available display area.
1325
-
1326
- <dt> <dfn>standalone</dfn>
1327
- <dd>
1328
- The web application is displayed to look and feel like a standalone native application.
1329
- This can include the application having a different window,
1330
- its own icon in the application launcher, etc.
1331
- In this mode,
1332
- the user agent excludes standard browser UI elements
1333
- such as an URL bar,
1334
- but standard system UI elements,
1335
- such as window decorations, a system status bar, and/or a system back button,
1336
- remain available.
1337
-
1338
- <dt> <dfn>minimal-ui</dfn>
1339
- <dd>
1340
- This mode is similar to [=display mode/standalone=] ,
1341
- but provides the end-user with some means to access
1342
- a minimal set of UI elements for controlling navigation
1343
- (i.e., back, forward, reload, and perhaps some way of viewing the document's address).
1344
- A user agent may include other platform specific UI elements,
1345
- such as "share" and "print" buttons
1346
- or whatever is customary on the platform and user agent.
1347
-
1348
- <dt> <dfn>browser</dfn>
1349
- <dd>
1350
- The web application is displayed using the platform-specific convention
1351
- for opening hyperlinks in the user agent
1352
- (e.g., in a browser tab or a new window).
1353
- </dl>
1317
+ On normal web pages, 'display-mode' will have a value of 'browser' . Only pages appearing in the
1318
+ context of an [=installed web application=] can have a different 'display-mode' , reflecting the
1319
+ way in which the application window is being presented to the end user.
1354
1320
1355
1321
<details class="note">
1356
1322
<summary> The [=display mode/fullscreen=] [=display mode=] is distinct from the [[FULLSCREEN|Fullscreen API]] .</summary>
1357
1323
1358
- The [=display mode/fullscreen=] [=display mode=] describes the fullscreen state of the browser viewport,
1359
- while the [[FULLSCREEN|Fullscreen API]] operates on an element contained within the viewport.
1360
- As such, a web application can have its [=display mode=] set to [=display mode/fullscreen=] ,
1361
- even while {{fullscreenElement}} returns <code> null</code> ,
1362
- and {{fullscreenEnabled}} returns <code> false</code> .
1363
-
1364
- The ''fullscreen'' <a>display mode</a> is also not directly related
1324
+ The ''fullscreen'' value for [=display-mode=] is not directly related
1365
1325
to the CSS '':fullscreen'' pseudo-class.
1366
1326
The '':fullscreen'' pseudo-class matches an element
1367
1327
exclusively when that element is put into the fullscreen element stack.
1368
1328
However, a side effect of calling the {{requestFullscreen()}} method
1369
1329
on an element using the [[FULLSCREEN|Fullscreen API]]
1370
1330
can be that the browser enters a fullscreen mode at the OS-level,
1371
1331
in which case both '':fullscreen'' and ''(display-mode: fullscreen)'' will match.
1372
- </details>
1373
1332
1374
- <div class="example">
1375
- On some platforms,
1376
- it is possible for a user--
1377
- or a [[APPMANIFEST|Web Application Manifest]] --
1378
- to put a web application into fullscreen
1379
- without invoking the [[FULLSCREEN|Fullscreen API]] .
1380
- When this happens,
1381
- the '':fullscreen'' pseudo class will not match,
1382
- but ''(display-mode: fullscreen)'' will match.
1383
- This is exemplified in CSS code below:
1384
-
1385
- <pre class="lang-css">
1386
- /* applies when the viewport is fullscreen */
1387
- @media (display-mode: fullscreen) {
1388
- ...
1389
- }
1390
-
1391
- /* applies when an element is fullscreen */
1392
- #game:fullscreen {
1393
- ...
1394
- }
1395
- </pre>
1396
- </div>
1333
+ <div class="example">
1334
+ On some platforms,
1335
+ it is possible for a user--
1336
+ or a [[APPMANIFEST|Web Application Manifest]] --
1337
+ to put a web application into fullscreen
1338
+ without invoking the [[FULLSCREEN|Fullscreen API]] .
1339
+ When this happens,
1340
+ the '':fullscreen'' pseudo class will not match,
1341
+ but ''(display-mode: fullscreen)'' will match.
1342
+ This is exemplified in CSS code below:
1343
+
1344
+ <pre class="lang-css">
1345
+ /* applies when the viewport is fullscreen */
1346
+ @media (display-mode: fullscreen) {
1347
+ ...
1348
+ }
1349
+
1350
+ /* applies when an element is fullscreen */
1351
+ #game:fullscreen {
1352
+ ...
1353
+ }
1354
+ </pre>
1355
+ </div>
1356
+ </details>
1397
1357
1398
1358
<!--
1399
1359
████████ ████ ██████ ████████ ███████ ██ ██ ███ ██ ████ ████████ ██ ██
@@ -3397,7 +3357,7 @@ In addition to editorial changes and minor clarifications,
3397
3357
the following changes and additions were made to this module since the
3398
3358
<a href="https://www.w3.org/TR/2020/WD-mediaqueries-5-20200731/">2020-07-31 Working Draft</a> :
3399
3359
3400
- * Adopted 'display-mode' from [[APPMANIFEST]] .
3360
+ * Adopted the 'display-mode' media feature from [[APPMANIFEST]] .
3401
3361
(See <a href="https://github.com/w3c/csswg-drafts/issues/6343">Issue 6343</a> )
3402
3362
* Dropped the media features what were meant to query about the geometry of the video plane
3403
3363
in <a href="#video-prefixed-features">bi-plane implementations</a> :
0 commit comments