This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The spec says to use CSS 'pre-wrap' behavior for WebVTT cues (except lines are balanced). However, this leaves a space at the end of each line [1], which looks bad. I think we should collapse spaces at the end of lines in WebVTT rendering. example: WEBVTT 00:00:00.000 --> 00:00:05.000 This is a long cue that will break on two lines. Will render as: line -2: "This is a long cue that " line -1: "will break on two lines." It would be better if the rendered result was line -2: "This is a long cue that" line -1: "will break on two lines." (i.e. with the space after "that" removed) [1] "If 'white-space' is set to 'pre' or 'pre-wrap', any sequence of spaces (U+0020) unbroken by an element boundary is treated as a sequence of non-breaking spaces. However, for 'pre-wrap', a line breaking opportunity exists at the end of the sequence." http://www.w3.org/TR/CSS21/text.html#white-space-model
Actually using pre-line instead of pre-wrap seems like a better solution here.
Yeah, I guess we can use pre-line instead.
Checked in as WHATWG revision r7247. Check-in comment: Change white-space value for VTT http://html5.org/tools/web-apps-tracker?from=7246&to=7247
I'm ok with this change. But now we are removing duplicate whitespace within the cues, too. This is something that caption developers will want more control over: if they put multiple white spaces into a cue and it is significant, they currently don't have a means to specify that in the WebVTT file. What do you suggest to do in this situation?
Use or change white-space.
OK, fair enough. :-)