[csswg-drafts] [mediaqueries-5] Move the definition of "display mode" back to Manifest spec (#7306)

mgiuca has just created a new issue for https://github.com/w3c/csswg-drafts:

== [mediaqueries-5] Move the definition of "display mode" back to Manifest spec ==
(Attn: @frivoal @marcoscaceres )

In #6343, two sections of the Web App Manifest spec were moved into the CSS Media Queries 5 spec:

* "Display modes"
* "The `'display-mode'` media feature"

The resulting negative diff on Manifest can be seen here: https://github.com/w3c/manifest/pull/1022/files

I believe the first of these moves was a mistake and would like to move the "display modes" section back to Manifest where it belongs. Moving the "The `'display-mode'` media feature" section to CSSMQ was correct.

(Apologies that I've just noticed this now. It happened in December as I was planning to go on leave and I have been absent since then.)

**Background**

This started from an off-hand comment by @marcoscaceres in https://github.com/w3c/manifest/issues/975:

> While the CSS crew is here, somewhat unrelated, but related, could we move "display mode media feature" to MQ5?

I believe the intention here was to move *just* the "display mode media feature" to MQ5 (which is correct). However what ended up happening was that *both* the "display modes" and "display mode media feature" section got moved. Essentially, the "display mode media feature" was "remotely" injecting new content into the CSS spec, and I believe the intention was always to move it into CSS when it was ready. But I think moving the entire definition of "display mode" was a mistake.

**Proposal**

Move the "display modes" section (including the definition of the four display modes: browser, minimal-ui, standalone and fullscreen) back to the Manifest spec.

Keep the "The `'display-mode'` media feature" section in the CSSMQ spec, referencing the definition of "display mode" in the Manifest spec.

**Rationale**

The "display mode" section, which defines [display mode](https://www.w3.org/TR/mediaqueries-5/#display-mode) and provides the definition of the four display modes (browser, minimal-ui, standalone and fullscreen) is one of the core concepts of the web app manifest. The Web App Manifest spec is concerned with what it means to be a web app, and largely this revolves around being displayed in a non-browser display mode.

The Web App Manifest spec defines the `"display"` member which can be one of the four display modes, and allows the web app to control which display mode it should be presented in. So far, this is all self-contained within the Manifest spec and has nothing to do with CSS whatsoever. The definition of the display modes is critical to the manifest spec (hence the phrase appears 30 times in the spec).

In addition to this, we defined the `display-mode` CSS media query, which allows pages to query which app display mode they are in. While this is a useful feature, it is ancillary. We could delete the display-mode media query and the entire web app system would continue to function, albeit it would be harder for pages to determine which mode they're in.

Having the entire definition of "display mode" be in the CSS spec makes no sense, because it is a manifest concept that happens to have a CSS media query associated with it, not a CSS concept that happens to be referenced by the manifest spec. It doesn't make sense that the Manifest spec defines the "`display`" member by saying "see the CSS spec".

My practical concerns over this are that it will unnecessarily complicate future discussions around display modes. We (Manifest authors) have plans to add at least two new display modes ([tabbed mode](https://github.com/w3c/manifest/issues/737) and [window controls overlay](https://github.com/WICG/window-controls-overlay/blob/main/explainer.md)), and those discussions should take place in the Web Apps WG, around the Manifest spec. We should not be discussing proposals about new Web App functionality in the CSSWG.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7306 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 25 May 2022 04:06:12 UTC