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

The CSS Working Group just discussed `[css-selectors-4] CSS reflection of "patching"`.

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> noamr: anothe rintro topic<br>
&lt;TabAtkins> noamr: working with the whatwg on a new ability we're calling "patching"<br>
&lt;TabAtkins> noamr: letting you stream content into an element while or after it's loaded<br>
&lt;TabAtkins> noamr: letting you pull in some html and direct it into an element. in JS or declaratively<br>
&lt;TabAtkins> noamr: like HTML with a &lt;select> on top, the content is loaded dynamically<br>
&lt;TabAtkins> noamr: the options can load in later via a &lt;template><br>
&lt;TabAtkins> noamr: or a &lt;script> it's bing discussed<br>
&lt;TabAtkins> noamr: and some indicator that the contents go into an existing element, via an ID or something<br>
&lt;astearns> q+<br>
&lt;TabAtkins> noamr: people obvs do this in JS a lot today, React server-side rendering<br>
&lt;TabAtkins> noamr: we also want to reflect this in style, React has a spinner<br>
&lt;TabAtkins> noamr: parts that will load later on, you want to indicate in rendering somehow<br>
&lt;TabAtkins> noamr: so this is opted in, a patchable element will have a special attribute<br>
&lt;TabAtkins> noamr: and when something is patching it's clear, not all the elements on the page<br>
&lt;TabAtkins> noamr: so the use-case style-wise is a loading indicator<br>
&lt;TabAtkins> noamr: graying out an element, enabling a spinner, something like that<br>
&lt;TabAtkins> noamr: maybe could also tie into loading/loaded<br>
&lt;TabAtkins> noamr: not wanting to reoslve, just talking about ti<br>
&lt;TabAtkins> astearns: have some questions<br>
&lt;TabAtkins> astearns: your example has bare text for the laoding state<br>
&lt;TabAtkins> astearns: that i assume that text will be styled, or can have elements that will be repalced<br>
&lt;TabAtkins> astearns: so you alraedy have a way of styling osme loading indicators<br>
&lt;TabAtkins> astearns: so if we already have a way of - the template's not applied yet. what's the use-case for distinguishing between "tempalte's not applied" and "template has been applied but still loading"<br>
&lt;astearns> ack astearns<br>
&lt;TabAtkins> noamr: i'd say similar to indicating any timeline in the start or middle. pending, loading, or done<br>
&lt;TabAtkins> astearns: I'd like to see some more fleshed-out examples of what someone might want to do from style for these pending and patching states<br>
&lt;TabAtkins> astearns: not against it, just not sure it's completely motivated<br>
&lt;TabAtkins> emilio: for imperative patching, "pending" doesn't exist, yeah?<br>
&lt;TabAtkins> noamr: right<br>
&lt;TabAtkins> emilio: is there a use for distinguishing between pending and patching?<br>
&lt;TabAtkins> noamr: just more convenience, can check if you have a loading indicator<br>
&lt;TabAtkins> emilio: not sure i udnerstand<br>
&lt;TabAtkins> emilio: just not sure when you'd want to dsitinguish between "patch not applied" and "patch has just begun applying"<br>
&lt;TabAtkins> noamr: before it's applied, you want to show the placeholder content; different thatn partially streamed content<br>
&lt;TabAtkins> emilio: okay, would like to see what author use-cases would benefit<br>
&lt;TabAtkins> noamr: it's not novel here, frameworks do it. Suspense library exposes this<br>
&lt;TabAtkins> astearns: i could see some better skeleton loading, where as things are pending you get a skeleton, as they patch in some skeleton remains while it happens...<br>
&lt;TabAtkins> noamr: i can make more demos<br>
&lt;TabAtkins> astearns: and some motivation for why it's in css, rather than just relying on js<br>
&lt;ydaniv> q+<br>
&lt;TabAtkins> TabAtkins: part of the feature is a declarative version, where you leave open your html response and later drop in a &lt;template>. no js involved at all<br>
&lt;TabAtkins> noamr: for perf reasons and bug reasons, the direction is to keep things as declarative as possible<br>
&lt;TabAtkins> noamr: similar to event triggers, good to know ahead of time that an event will trigger something<br>
&lt;astearns> ack ydaniv<br>
&lt;TabAtkins> ydaniv: i wanna stress what noam is trying to do and giv emore emphasis to this need<br>
&lt;TabAtkins> ydaniv: the web looks now like ti's very flakey, comapred to native apps<br>
&lt;TabAtkins> ydaniv: when people try to build apps that load in async and want it robust<br>
&lt;TabAtkins> ydaniv: so the time we're talking about is before JS ran, the initial server response is important to get right and look right<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12579#issuecomment-3209403642 using your GitHub account


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

Received on Thursday, 21 August 2025 07:49:18 UTC