Page 1 of 1

Underscore in CSS classes for VTT subtitles creates trouble

Posted: 17 Jan 2024 22:10
by ienne
I downloaded a video from Arte for offline viewing and found the subtitles with a nonintended white background. It took me quite a while to figure it out but the source of the problem is their use of underscore in class names.

Specifically, this works as intended:

Code: Select all

WEBVTT STYLE ::cue { color: red; background-color: yellow; } STYLE ::cue(.bgwhite) { color: blue; background-color: white; } 00:00:00.000 --> 00:00:10.000 line:83% align:center Red over yellow and <c.bgwhite>blue over white<c>
But this (similar to the original I downloaded) does not:

Code: Select all

WEBVTT STYLE ::cue { color: red; background-color: yellow; } STYLE ::cue(.bg_white) { color: blue; background-color: white; } 00:00:00.000 --> 00:00:10.000 line:83% align:center Red over yellow and <c.bg_white>blue over white<c>
I do not know much of VTT but I think underscore is perfectly acceptable in CSS class names, so this might be a bug.

Am I missing something?

Otherwise, VLC is fantastic! :-)