[csswg-drafts] [css-selectors-4] CSS reflection of "patching" (#12579)

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

== [css-selectors-4] CSS reflection of "patching" ==
Follow up on #12578

"Patching" is an emerging proposal in the HTML spec, see https://github.com/whatwg/html/issues/11542.
It is essentially streaming of content into an existing element, either "out-of-order" in the original response (see https://github.com/whatwg/html/issues/11542) or later (see https://github.com/whatwg/html/issues/2142).

Since a patch is an asynchronous operation, we want to be able to reflect its state and allow styling accordingly.

A patchable element has 3 states:
- Pending - it shows fallback/placeholder content
- Patching - content is being streamed
- Complete.

This can be reflected using 2 selectors for the first two states (or 3).

For example:

```html
<style>
#gallery {
  &:pending { }
  &:patching { }
}
</style>

<section id=gallery patchid=gallery>
Loading...
</section>

<!-- later -->
<template patchfor=gallery>
 <>the actual gallery<>
</template>
```

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


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

Received on Thursday, 7 August 2025 12:21:48 UTC