This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16889 - WebVTT: Should use white-space:pre-line instead of pre-wrap
Summary: WebVTT: Should use white-space:pre-line instead of pre-wrap
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: This bug has no owner yet - up for the taking
Depends on:
Reported: 2012-04-30 09:58 UTC by Simon Pieters
Modified: 2012-08-23 05:18 UTC (History)
5 users (show)

See Also:


Description Simon Pieters 2012-04-30 09:58:28 UTC
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.



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."
Comment 1 Simon Pieters 2012-05-28 09:07:00 UTC
Actually using pre-line instead of pre-wrap seems like a better solution here.
Comment 2 Ian 'Hixie' Hickson 2012-07-24 15:59:56 UTC
Yeah, I guess we can use pre-line instead.
Comment 3 contributor 2012-08-21 02:15:23 UTC
Checked in as WHATWG revision r7247.
Check-in comment: Change white-space value for VTT
Comment 4 Silvia Pfeiffer 2012-08-22 23:46:54 UTC
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?
Comment 5 Simon Pieters 2012-08-23 05:04:18 UTC
Use   or change white-space.
Comment 6 Silvia Pfeiffer 2012-08-23 05:18:24 UTC
OK, fair enough. :-)