Skip to content

Commit a791201

Browse files
mgiucamarcoscaceresaarongustafson
authored
editorial: Move the definition of display-mode back to APPMANIFEST. (#1039)
* Move the definition of display-mode back to APPMANIFEST. Closes w3c/csswg-drafts#7306. This text was moved out of the Manifest spec into CSS mediaqueries-5 in w3c/csswg-drafts#6343, along with the display-mode media feature. The actual definition of display mode belongs here, while the display-mode media feature remains in CSS mediaqueries-5. * Apply suggestions from code review Co-authored-by: Aaron Gustafson <[email protected]> * Tidy. * display-mode: Rewrite note about display-mode media feature to helpfully point towards the CSS spec. Also linkify display-mode properly. --------- Co-authored-by: Marcos Cáceres <[email protected]> Co-authored-by: Aaron Gustafson <[email protected]>
1 parent 482c7fd commit a791201

File tree

1 file changed

+72
-11
lines changed

1 file changed

+72
-11
lines changed

index.html

+72-11
Original file line numberDiff line numberDiff line change
@@ -2540,13 +2540,68 @@ <h3>
25402540
</section>
25412541
<section>
25422542
<h2>
2543-
Choosing a display mode
2543+
Display modes
25442544
</h2>
25452545
<p>
2546-
A [=display mode=], as defined in [[MEDIAQUERIES-5]], represents how
2547-
the web application is being presented within the context of an OS
2548-
(e.g., in fullscreen, etc.). Display modes correspond to user interface
2549-
(UI) metaphors and functionality in use on a given platform.
2546+
A <dfn class="export">display mode</dfn> represents how the web
2547+
application is being presented within the context of an OS (e.g., in
2548+
fullscreen, etc.). Display modes correspond to user interface (UI)
2549+
metaphors and functionality in use on a given platform. The UI
2550+
conventions of the display modes are purely advisory and implementers
2551+
are free to interpret them how they best see fit.
2552+
</p>
2553+
<p>
2554+
This specification defines the following [=display modes=]:
2555+
</p>
2556+
<dl>
2557+
<dt>
2558+
<dfn class="export" data-dfn-for="display mode">fullscreen</dfn>
2559+
</dt>
2560+
<dd>
2561+
Opens the web application with browser UI elements hidden and takes
2562+
up the entirety of the available display area.
2563+
</dd>
2564+
<dt>
2565+
<dfn class="export" data-dfn-for="display mode">standalone</dfn>
2566+
</dt>
2567+
<dd>
2568+
Opens the web application to look and feel like a standalone native
2569+
application. This can include the application having a different
2570+
window, its own icon in the application launcher, etc. In this mode,
2571+
the user agent will exclude standard browser UI elements such as an
2572+
URL bar, but can include other system UI elements such as a status
2573+
bar and/or system back button.
2574+
</dd>
2575+
<dt>
2576+
<dfn class="export" data-dfn-for="display mode">minimal-ui</dfn>
2577+
</dt>
2578+
<dd>
2579+
This mode is similar to [=display mode/standalone=], but provides the
2580+
end-user with some means to access a minimal set of UI elements for
2581+
controlling navigation (i.e., back, forward, reload, and perhaps some
2582+
way of viewing the document's address). A user agent can include
2583+
other platform specific UI elements, such as "share" and "print"
2584+
buttons or whatever is customary on the platform and user agent.
2585+
</dd>
2586+
<dt>
2587+
<dfn class="export" data-dfn-for="display mode">browser</dfn>
2588+
(default)
2589+
</dt>
2590+
<dd>
2591+
Opens the web application using the platform-specific convention for
2592+
opening hyperlinks in the user agent (e.g., in a browser tab or a new
2593+
window).
2594+
</dd>
2595+
</dl>
2596+
<p class="note">
2597+
The [=display mode/fullscreen=] <a>display mode</a> is orthogonal to,
2598+
and works independently of, the [[[FULLSCREEN]]]. The [=display
2599+
mode/fullscreen=] <a>display mode</a> affects the fullscreen state of
2600+
the browser window, while the [[FULLSCREEN]] API operates on an element
2601+
contained within the viewport. As such, a web application can have its
2602+
<a>display mode</a> set to [=display mode/fullscreen=], while
2603+
`document.fullScreenElement` returns `null`, and `fullscreenEnabled`
2604+
returns `false`.
25502605
</p>
25512606
<p>
25522607
Once a user agent [=applies=] a particular <a>display mode</a> to an
@@ -2628,14 +2683,20 @@ <h2>
26282683
</p>
26292684
<p>
26302685
A user agent MUST reflect the applied <a>display mode</a> of the web
2631-
application in the '`display-mode`' media feature [[MEDIAQUERIES-5]].
2686+
application in the <a data-xref-type="css-descriptor" data-xref-for=
2687+
"@media">`display-mode`</a> media feature [[MEDIAQUERIES-5]].
26322688
</p>
26332689
<p class="note">
2634-
A user agent will expose the '`display-mode`' media feature
2635-
irrespective of whether a manifest is being applied to a browsing
2636-
context. For example, if the end-user puts the application into
2637-
fullscreen, then the user agent would reflect this change to CSS and
2638-
scripts via the '`display-mode`' media feature.
2690+
A user agent will expose the actual display mode being applied — not
2691+
necessarily the one declared in the manifest — via the
2692+
<a data-xref-type="css-descriptor" data-xref-for=
2693+
"@media">`display-mode`</a> media feature, accessible through CSS or
2694+
JavaScript. Note that this media feature will also reflect other
2695+
display modes for a web page when a manifest is not being applied. For
2696+
example, if the end-user puts the page into fullscreen, then the user
2697+
agent would reflect this change to CSS and scripts via the
2698+
<a data-xref-type="css-descriptor" data-xref-for=
2699+
"@media">`display-mode`</a> media feature.
26392700
</p>
26402701
</section>
26412702
<section id="priv-sec">

0 commit comments

Comments
 (0)