Skip to content

Commit e454100

Browse files
committed
Move the definition of display-mode back to APPMANIFEST. Closes w3c#7306.
This text was moved out of the Manifest spec into CSS mediaqueries-5 in w3c#6343, along with the display-mode media feature. The actual definition of display mode belongs in Manifest, while the display-mode media feature remains here. Added some more text explaining how the display-mode media feature works given that this is in a separate spec to where web apps are defined.
1 parent 681621f commit e454100

File tree

1 file changed

+34
-74
lines changed

1 file changed

+34
-74
lines changed

mediaqueries-5/Overview.bs

Lines changed: 34 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,94 +1306,54 @@ Display Modes: the ''display-mode'' media feature
13061306
Type: discrete
13071307
13081308

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=].
13101310
Child browsing contexts reflect the [=display mode=] of their [=top-level browsing context=].
13111311

1312-
A display mode 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).
13181316

1319-
This specification defines the following [=display modes=]:
1320-
1321-
fullscreen
1322-
1323-
The web application is displayed with browser UI elements hidden
1324-
and takes up the entirety of the available display area.
1325-
1326-
standalone
1327-
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-
minimal-ui
1339-
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-
browser
1349-
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-
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.
13541320

13551321
13561322
The [=display mode/fullscreen=] [=display mode=] is distinct from the [[FULLSCREEN|Fullscreen API]].
13571323

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 null,
1362-
and {{fullscreenEnabled}} returns false.
1363-
1364-
The ''fullscreen'' display mode is also not directly related
1324+
The ''fullscreen'' value for [=display-mode=] is not directly related
13651325
to the CSS '':fullscreen'' pseudo-class.
13661326
The '':fullscreen'' pseudo-class matches an element
13671327
exclusively when that element is put into the fullscreen element stack.
13681328
However, a side effect of calling the {{requestFullscreen()}} method
13691329
on an element using the [[FULLSCREEN|Fullscreen API]]
13701330
can be that the browser enters a fullscreen mode at the OS-level,
13711331
in which case both '':fullscreen'' and ''(display-mode: fullscreen)'' will match.
1372-
13731332

1374-
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-
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-
1396-
1333+
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+
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+
1355+
1356+
13971357

13981358
commit comments
Comments
 (0)