Re: [csswg-drafts] [css-view-transitions-2] CSS only way to transition between list <-> detail views (#8209)

Had an offline chat with @noamr today. I realized I hadn't completely followed the problem of "a media-query per item in the list". If we only have the media query, then the author is forced to generate a rule for each item in the list. The problem gets worse with a list using infinite scroll.

So I do like the idea of a pseudo-class which activates on a href if its link matches the outgoing URL. Noam had a nice suggestion of the pseudo-class building on top of the media query with something like:

```css
@navigation list-details {
    target: urlpattern(/list), urlpattern(/details?id=:id);
}

a:navigating-to(list-details) .poster {
   view-transition-name: poster;
}
```

-- 
GitHub Notification of comment by khushalsagar
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8209#issuecomment-1591367453 using your GitHub account


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

Received on Wednesday, 14 June 2023 14:43:23 UTC