- From: Boris Chiou via GitHub <noreply@w3.org>
- Date: Mon, 09 Feb 2026 22:57:52 +0000
- To: public-css-archive@w3.org
BorisChiou has just created a new issue for https://github.com/w3c/csswg-drafts:
== [scroll-animations-1] Use pseudo-element as the source of ScrollTimeline or subject of ViewTimeline ==
Per the spec [[scroll-animations-1] ](https://drafts.csswg.org/scroll-animations-1)definition, [ScrollTimeline interface](https://drafts.csswg.org/scroll-animations-1/#scrolltimeline-interface) has an attribute, `source`, which is the scroll container of this `ScrollTimeline`:
```
[Exposed=Window]
interface ScrollTimeline : AnimationTimeline {
constructor(optional ScrollTimelineOptions options = {});
readonly attribute Element? source;
readonly attribute ScrollAxis axis;
};
```
However, what happened if the scroll container is a pseudo-element? Should we add a `CSSOMString` to represent the pseudo-element, just like [KeyframeEffect](https://drafts.csswg.org/web-animations-1/#keyframeeffect)? Or restrict it to non pseudo-element?
Same question for attribute [subject](https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface) in `ViewTimeline`. We only have an `Element` attribute, and I think it is possible to let a pseudo-element be a subject, right? Or do we have to restrict it for only non pseudo-element?
```
[Exposed=Window]
interface ViewTimeline : ScrollTimeline {
constructor(optional ViewTimelineOptions options = {});
readonly attribute Element subject;
...
};
```
Emilio filed a Chromium bug with a simple test case because this may cause an issue: https://issues.chromium.org/u/1/issues/483088585.
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13471 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 9 February 2026 22:57:53 UTC