[csswg-drafts] [css-values-5][css-images-4] Allow to change the playback range of media (#12558)

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

== [css-values-5][css-images-4] Allow to change the playback range of media ==
Initially suggested by @samuelbredshaw in https://github.com/w3c/csswg-drafts/issues/9396#issuecomment-1730673745, is the idea of allowing to control the playback range of media ‒ animated images in that case, but also applies to video and audio.
As that's a similar but separate feature, I thought this deserves to be discussed on its own.

Samuel actually thought of adding playback control via a special `#t=[starttime][,endtime]` anchor added to the image URL of an `<img>` element.

My idea is now to allow this special anchor to clip media defined in URLs defined via the `<url>` value. That clipping should apply wherever animated images, video, or audio are used in CSS.

As an example, an animated background image could then be clipped to the first three seconds like this:

```css
background-image: src("https://media3.giphy.com/media/v1.Y2lkPTc5MGI3NjExeXhmc3Q4dzIzZGJ5NzJ2dGUwaTlwNHdkaHRzeDk0bWI5eXpyazJ0aCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/13FrpeVH09Zrb2/giphy.gif#t=,3");
```

Sebastian

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


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

Received on Friday, 1 August 2025 07:18:07 UTC