W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2020

[csswg-drafts] subtree-visibility CSS property (#4843)

From: Chris Harrelson via GitHub <sysbot+gh@w3.org>
Date: Fri, 06 Mar 2020 22:57:19 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-577218960-1583535437-sysbot+gh@w3.org>
chrishtr has just created a new issue for https://github.com/w3c/csswg-drafts:

== subtree-visibility CSS property ==
I would like CSSWG feedback on the proposed [subtree-visibility CSS property](https://wicg.github.io/display-locking/index.html)

subtree-visibility solves the same use cases as the previous `rendersubtree` element attribute that was presented to the CSSWG at TPAC 2019. [1] The changes are:
* Now a CSS property with only 3 values (`visible`, `auto`, `hidden`).
* `hidden` subtrees, and `auto` subtrees that are offscreen, are invisible; otherwise visible
* "invisible" is semantically very similar to what `visibility:hidden` does today
* `auto` subtrees are also exposed to accessibility and all UA features such as find-in-page
* There is no activation event or updateRendering method
* UA is encouraged but not required to skip rendering work for invisible subtrees

I'd appreciate feedback on all of the feature of course, but in particular:
* Naming
* Semantics related to boxes and flat trees

Chromium has implemented this CSS property fully, and if all goes well hoping to ship it. There is an explainer [here](https://github.com/WICG/display-locking/blob/master/README.md). It can be turned on for testing via chrome://flags/#enable-web-payments-experimental-features.

Related issues include #4531 and  #4229.
----

[1] Unofficial Meeting notes from Dael Jackson below:

rendersubtree
-------------

  - chrishtr introduced the proposal for a rendersubtree attribute.
      Proposal text:
https://github.com/WICG/display-locking/blob/master/README.md
      Proposed PR: https://github.com/whatwg/html/pull/4862
      Github issue: https://github.com/whatwg/html/issues/4861
  - The 'rendersubtree' attribute controls whether the subtree is
      laid out and rendered or not, in order to allow browsers to be
      more performant and authors to reserve space for an element that
      is not yet loaded. This also introduces an "activation" concept
      which allows the browser to choose to render.
  - Several members expressed concern that this felt more like a CSS
      property. The reason it was not written to be is because the UA
      is allowed to overwrite it.
  - The use case for 'invisible' and not 'activatable' is so the author
      can prevent not-yet-rendered content from being shown. It was
      suggested the default should be 'activatable' since authors might
      not think through all cases of 'invisible' if it's the default.
  - It was suggested to add callbacks for the activation actions so
      authors could listen for the changes.
  - The difference between this and 'contain: all' is that this would
      prevent animations from loading. Meanwhile, the difference to
      'display: none' is that the layout work is still done in this
      case.
  - More info at https://github.com/whatwg/html/issues/4861

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4843 using your GitHub account
Received on Friday, 6 March 2020 22:57:22 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:02 UTC