I am proposing a way to enable a transparent window background effect for webpages.
More than a week ago, I submitted a proposal to the CSS Working Group (see issue #7281 on the csswg-drafts repo) and got no response, so I want to start a discussion about it here. Depending on how this would get implemented, it might, however, not be the responsibility of the CSSWG at all. The following is the copy-pasted original issue for the CSS Working Group:
Proposal: Transparent window
Another missing key feature of the web platform in comparison to native applications is the ability to create transparent windows. This issue discourse aims to elaborate ideas on possible implementations of transparent windows. The goal is to provide a mechanism on how authors can create a transparent window effect resulting in the following:
Additionally, authors should then be able to, for example, set a transparent background-color
and a backdrop-filter: blur()
on the :root
and/or <body>
element to achive an effect like this:
An implementation of this feature would allow for a richer and more modern visual experience for users.
Possible implementation ideas
The following are possible ideas on how authors could be able to enable the transparent window effect:
- A new property in the viewport
<meta>
tag, e.g.transparent-window=yes
. - A new CSS property that is only valid in the
:root
and/or<body>
element, e.g.window-transparency: transparent
. - A new Web Application Manifest member, e.g.
"transparent_window": true
, which would only be applied in the context of a standalone installed Progressive Web App.
Privacy implications?
A key concern here should be that there is no way for the website to view stuff underneath the window. However, since there is no way to read pixel data of the client’s viewport in JavaScript, I do not think there are extra privacy implications to consider here.