Skip to content

[css-selectors-4] CSS reflection of "patching"Β #12579

@noamr

Description

@noamr

Follow up on #12578

"Patching" is an emerging proposal in the HTML spec, see whatwg/html#11542.
It is essentially streaming of content into an existing element, either "out-of-order" in the original response (see whatwg/html#11542) or later (see whatwg/html#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:

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

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

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions