w3c / webvtt

WebVTT Standard
https://w3c.github.io/webvtt/
Other
104 stars 40 forks source link

Consider labeling the originating element for cues as "featureless" #477

Open evliu-google opened 5 years ago

evliu-google commented 5 years ago

The current spec reads:

For the purpose of selectors in STYLE blocks of a WebVTT file, the style sheet must apply to a hypothetical document that contains a single empty element with no explicit name, no namespace, no attributes, no classes, no IDs, and unknown primary language, that acts like the media element for the text tracks that were sourced from the given WebVTT file. The selectors must not match other text tracks for the same media element. In this hypothetical document, the element must not match any selector that would match the element itself.

This would mean that selectors such as *:not([attr])::cue would match, which doesn't seem very useful. Labeling the originating element as "featureless" instead would simplify the implementation of the spec because it wouldn't require recursing down the selector list to verify that the selector matches the originating element. If the element were featureless, only selectors with an implicit tag would match the originating element.

silviapfeiffer commented 5 years ago

Sounds like a sensible change. The easiest way to take this forward is to prepare a pull request, if you're keen.