[csswg-drafts] Page Visibility hook (#7028)

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

== Page Visibility hook ==
**Problem**:
[Page Visibility](https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API) - JavaScript can know when a page has gone into the background, or a tab has lost focus, etc.

**Proposal**:
CSS get's a way to manage it too

```css
@media (document-visibility: hidden) {
  .ui-controls {
    --saturation: 0; /* dim out controls */
  }

  * {
    animation-play-state: paused;
  }

  .sensitive-content {
    filter: blur(10px);
  }
}
```

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


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

Received on Wednesday, 9 February 2022 21:08:48 UTC