Re: [csswg-drafts] [mediaqueries-5] Move the definition of display-mode back to APPMANIFEST. Closes #7306. (#7307)

Hi CSS folks, including @frivoal .

I have _finally_ gotten around to updating this PR with the changes discussed around this time last year. Apologies for the slow turnaround on this - this was disrupted at the start of this year and been on my backburner since then.

I believe my edits have captured the essence of what was requested in the [CSSWG meeting from 17 Nov, 2022](https://github.com/w3c/csswg-drafts/issues/7306#issuecomment-1317378222).

A brief recap:

- In December 2021, the definition of "display mode" and its corresponding values was moved from the Manifest spec to the Media Queries spec. This is because it was defined as both a JSON value in the Manifest and a media query feature.
- I argued that the definition should be in the Manifest spec, as the display mode is a core concept (or rather, _the_ core concept) defined by the web app manifest, and the media query was just a convenience feature for developers. I proposed two PRs: this one, and the [corresponding one in the Manifest spec to put it back](https://github.com/w3c/manifest/pull/1039).
- In November 2022, the CSSWG agreed in principle to move the definition back, but argued that because "fullscreen" is triggered by not only the manifest `"display": "fullscreen"` but also by any other type of fullscreen, it isn't proper to have that display mode defined in Manifest when the media query works independent of the manifest.

So for today's update to the PR, I have:

1. Largely rewritten the PR, so that rather than saying "this MQ reflects the display mode from the Manifest", it's more neutral: it says that it reflects the way the page is being presented to the user, with the Manifest display mode being one of the ways it can be modified, various ways of entering fullscreen being another, and "browser" being the default.
2. Added an explicit definition of "browser" and "fullscreen" modes here in CSS. The "fullscreen" one is neutral as to how it can be triggered (manifest, `requestFullscreen` or user control). The other two modes are defined in terms of the Manifest spec, as they can only be entered from an application context.
3. Added an example.

There are two main aspects that I wish to keep in the Manifest spec:

- The definition of the term "display mode" itself is in the Manifest spec, since that is the core concept which that spec revolves around.
- There is no prose describing any display modes other than "browser" and "fullscreen" (the two modes which can be triggered outside of an application context). This is for future proofing: we intend to add more display modes going forward (two new modes, `window-controls-overlay` and `tabbed` are explicitly planned), and we want the process of adding new display modes to be that you define their meaning in full in the Manifest spec, and then simply add their name to the Media-Queries spec, linking back to the Manifest definition, and not duplicating any prose.

Please take a look and let me know if this is going to be discussed at a CSSWG meeting.

Cheers.

-- 
GitHub Notification of comment by mgiuca
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/7307#issuecomment-1818372599 using your GitHub account


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

Received on Monday, 20 November 2023 07:27:55 UTC