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 28183 - Add ruby-position to the CSS whitelist
Summary: Add ruby-position to the CSS whitelist
Status: RESOLVED MOVED
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: Web Media Text Tracks CG
URL: http://dev.w3.org/html5/webvtt/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-10 05:52 UTC by Philip Jägenstedt
Modified: 2015-11-16 13:00 UTC (History)
6 users (show)

See Also:


Attachments

Description Philip Jägenstedt 2015-03-10 05:52:13 UTC
http://dev.w3.org/csswg/css-ruby/#rubypos

This is needed to control the position of the ruby text.

There's also ruby-merge and ruby-align, but one thing at a time...

(Via private feedback from Dae Kim)
Comment 1 Dae Kim 2015-04-02 20:22:58 UTC
I'm not sure this will be enough to support most use cases.
Consider the snippet:

00:00:10.000 --> 00:00:15.000
<ruby>Line 1<rt>ruby1</rt></ruby>
<ruby>Line 2<rt>ruby2</rt></ruby>

Whitelisting ruby-position would allow control per cue, but how would I apply "over" to <rt>ruby1</rt> and "under" to <rt>ruby2</rt>?

Wouldn't we need two unique <rt> spans or allow rubies to be class references or have attributes?
Comment 2 Philip Jägenstedt 2015-04-03 04:10:32 UTC
You would have to assign classes in that case:

00:00:10.000 --> 00:00:15.000
<ruby>Line 1<rt.over>ruby1</rt></ruby>
<ruby>Line 2<rt.under>ruby2</rt></ruby>

The style that with

::cue(rt.over) {
  ruby-position: over;
}

::cue(rt.under) {
  ruby-position: under;
}
Comment 3 Dae Kim 2015-04-03 23:20:38 UTC
In addition to whitelisting ruby-position, should the wording also change in the VTT spec?

Change:
A WebVTT cue span start tag "rt" that disallows an annotation.

To:
A WebVTT cue span start tag "rt".
Comment 4 Dae Kim 2015-04-10 22:55:38 UTC
(In reply to Dae Kim from comment #3)
> In addition to whitelisting ruby-position, should the wording also change in
> the VTT spec?
> 
> Change:
> A WebVTT cue span start tag "rt" that disallows an annotation.
> 
> To:
> A WebVTT cue span start tag "rt".

Apologies. Change to the spec should be:
A WebVTT cue span start tag "rt" that requires annotation; ...
Comment 5 Philip Jägenstedt 2015-04-15 09:06:41 UTC
Note that annotations are for <v> and <lang> and the annotation is the part after a space, like <v Roger Bingham> or <lang en>. I believe all tag allow classes without any modification, but we'll have to look closer when fixing this.
Comment 6 Silvia Pfeiffer 2015-08-09 10:15:21 UTC
ruby-position is not supported by any browser other than Firefox. It's a bit early to adopt IMHO.
Comment 7 Dae Kim 2015-08-10 22:41:49 UTC
(In reply to Silvia Pfeiffer from comment #6)
> ruby-position is not supported by any browser other than Firefox. It's a bit
> early to adopt IMHO.

I can't speak for them BUT ... the largest implementer of WebVTT uses it for more than native browser support. They also have a global presence.
Comment 8 Silvia Pfeiffer 2015-09-26 22:13:31 UTC
I'd be happy to add ruby-position to the whitelisted CSS unless browsers object to it.
Comment 9 Simon Pieters 2015-11-16 12:23:46 UTC
ruby-position is also supported in WebKit as -webkit-ruby-position: [ before | after | inter-character ]

(Filed https://bugs.webkit.org/show_bug.cgi?id=151306 to unprefix.)
Comment 10 Simon Pieters 2015-11-16 12:33:42 UTC
https://github.com/w3c/webvtt/pull/263
Comment 11 Simon Pieters 2015-11-16 13:00:47 UTC
For ruby-merge, I suggest WONTFIX since the same effect can be achieved with markup, which is shown in the examples in the css-ruby spec. (VTT only has <ruby> and <rt> anyway.)

For ruby-align, I filed https://github.com/w3c/webvtt/issues/265