- From: Dana Estra via GitHub <noreply@w3.org>
- Date: Thu, 14 Aug 2025 22:17:24 +0000
- To: public-texttracks@w3.org
danae404 has just created a new issue for https://github.com/w3c/webvtt:
== Can ::cue(selector) match a list of webvtt node objects? ==
I am curious if I have this css:
```
::cue(*) {
color: green
}
```
And this .vtt:
```
WEBVTT
00:00:00.000 --> 00:00:05.000
This is a test subtitle
```
Should "This is a test subtitle" be green?
The section of spec that discusses ::cue(_selector_) says this:
> The ::cue(selector) pseudo-element with an argument must have an argument that consists of a CSS selector [[SELECTORS4]](https://www.w3.org/TR/webvtt1/#biblio-selectors4). It matches any [WebVTT Internal Node Object](https://www.w3.org/TR/webvtt1/#webvtt-internal-node-object) constructed for the matched element that also matches the given CSS selector [...]
Because ::cue(selector) matches any WebVTT Internal Node Object that also matches the selector, and because Lists of WebVTT Node Objects are a subclass of WebVTT Internal Node Object, this seems to indicate that `::cue(*) `should match the list/root.
However, [later the spec says that](https://www.w3.org/TR/webvtt1/#css-extensions-introduction) type selectors match "[WebVTT Internal Node Objects](https://www.w3.org/TR/webvtt1/#webvtt-internal-node-object) (except the root [list of WebVTT Node Objects](https://www.w3.org/TR/webvtt1/#list-of-webvtt-node-objects)) with the given name."
This seems like a contradiction to what the spec says earlier. Is one of these statements an error that should be fixed?
Please view or discuss this issue at https://github.com/w3c/webvtt/issues/533 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 14 August 2025 22:17:25 UTC