diff --git a/source b/source index 5da2f9eb977..23a5b9c61ed 100644 --- a/source +++ b/source @@ -3757,6 +3757,12 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute + +

The following term is defined in CSS Containment:

+ + @@ -57097,6 +57103,35 @@ interface HTMLDetailsElement : HTMLElement { +

The ancestor details revealing algorithm is to run the following steps on + currentNode:

+ +
    +
  1. +

    While currentNode has a parent node within the flat tree:

    + +
      +
    1. +

      If currentNode is slotted into the second slot of a details + element:

      + +
        +
      1. Set currentNode to the details element which + currentNode is slotted into.

      2. + +
      3. If the open attribute is not set on + currentNode, then set + the open attribute on currentNode to the + empty string.

      4. +
      +
    2. + +
    3. Otherwise, set currentNode to the parent node of + currentNode within the flat tree.

    4. +
    +
  2. +
+

The following example shows the details element being used to hide technical @@ -76144,6 +76179,29 @@ body { display:none } standardizing how find-in-page underlies the currently-unspecified window.find() API.

+

Interaction with details

+ +

When find-in-page begins searching for matches, all details elements in the page + which do not have their open attribute set should have + the skipped contents of their second slot become + accessible, without modifying the open attribute, in + order to make find-in-page able to search through it. After find-in-page finishes searching for + matches, those details elements should have their contents become skipped again. + This entire process must happen synchronously (and so is not observable to users or to author + code).

+ +

When find-in-page chooses a new active match, perform + the following steps:

+ +
    +
  1. Let node be the first node in the active + match.

  2. + +
  3. Queue a global task on the user interaction task source given + node's relevant global object to run the ancestor details + revealing algorithm on node.

  4. +
+

Interaction with selection

The find-in-page process is invoked in the context of a document, and may have an effect on @@ -87068,6 +87126,8 @@ new PaymentRequest(…); // Allowed to use

  • Set the Document's target element to target.

  • +
  • Run the ancestor details revealing algorithm on target.

  • +
  • Scroll target into view, with behavior set to "auto", block set to "start", and inline set to "nearest".

  • @@ -115821,8 +115881,17 @@ details[open] > summary { expected to allow the user to request the details be shown or hidden.

    The details element's second slot is expected - to be removed from the rendering when the details element does not have an open attribute.

    + to have its style attribute set to "display: + block; content-visibility: hidden;" when the details element does not have an + open attribute. When it does have the open attribute, the style + attribute is expected to be removed from the second slot.

    + +

    Because the slots are hidden inside a shadow tree, this style attribute is not directly visible to author code. Its impacts, + however, are visible. Notably, the choice of content-visibility: hidden + instead of, e.g., display: none, impacts the results of various APIs that + query layout information.

    @@ -123865,6 +123934,9 @@ INSERT INTERFACES HERE
    [CSSCASCADE]
    CSS Cascading and Inheritance, E. Etemad, T. Atkins. W3C.
    +
    [CSSCONTAIN]
    +
    CSS Containment, T. Atkins, F. Rivoal, V. Levin. W3C.
    +
    [CSSCOLOR]
    CSS Color Module, T. Çelik, C. Lilley, L. Baron. W3C.