Skip to content

Commit 331d4e1

Browse files
committed
Add support for ::cue-container
Fixes #516 In order to align the capabilities of WebVTT with CEA standards like 708, add the concept of a "WebVTT block backgound box", which is defined as a block-level wrapper around the WebVTT cue's contents. To allow authors to specify styles that apply to this block background object, add a new selector `::cue-container` that matches it. UAs which provide FCC required styling information for "window background & opacity" can do so via this new selector in UA-provided style sheets.
1 parent aeaf117 commit 331d4e1

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

index.bs

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4786,7 +4786,11 @@ constraints: [[!CSS22]]</p>
47864786
sheets after their boxes are generated, as described below.)</li>
47874787

47884788
<li>The children of the |nodes| must be wrapped in an anonymous box whose 'display' property has
4789-
the value ''display/inline''. This is the <dfn>WebVTT cue background box</dfn>.</li>
4789+
the value ''display/inline''. This is the <dfn>WebVTT cue inline background box</dfn>.</li>
4790+
4791+
<li>The <a>WebVTT cue inline background box</a> must be wrapped in an anonymous box whose 'display'
4792+
property has the value ''display/block''. This is the <dfn>WebVTT cue block background
4793+
box</dfn>.</li>
47904794

47914795
<li>Runs of children of <a lt="WebVTT Ruby Object">WebVTT Ruby Objects</a> that are not <a
47924796
lt="WebVTT Ruby Text Object">WebVTT Ruby Text Objects</a> must be wrapped in anonymous boxes whose
@@ -4873,8 +4877,8 @@ corresponding <a lt="text track cue">cue</a>'s <a>WebVTT cue text alignment</a>:
48734877
<p>The 'color' property on the (root) <a>list of WebVTT Node Objects</a> must be set to
48744878
''rgba(255,255,255,1)''. [[!CSS3-COLOR]]</p>
48754879

4876-
<p>The 'background' shorthand property on the <a>WebVTT cue background box</a> and on <a>WebVTT Ruby
4877-
Text Objects</a> must be set to ''rgba(0,0,0,0.8)''. [[!CSS3-COLOR]]</p>
4880+
<p>The 'background' shorthand property on the <a>WebVTT cue inline background box</a> and on
4881+
<a>WebVTT Ruby Text Objects</a> must be set to ''rgba(0,0,0,0.8)''. [[!CSS3-COLOR]]</p>
48784882

48794883
<p>The 'white-space' property on the (root) <a>list of WebVTT Node Objects</a> must be set to
48804884
''white-space/pre-line''. [[!CSS22]]</p>
@@ -5302,10 +5306,10 @@ pseudo-elements defined below won't have any effect according to this specificat
53025306

53035307
<h4 id=the-cue-pseudo-element>The ''::cue'' pseudo-element</h4>
53045308

5305-
<p>The <dfn selector>::cue</dfn> pseudo-element (with no argument) matches any <a>list of WebVTT Node
5306-
Objects</a> constructed for the <i>matched element</i>, with the exception that the properties
5307-
corresponding to the 'background' shorthand must be applied to the <a>WebVTT cue background box</a>
5308-
rather than the <a>list of WebVTT Node Objects</a>.</p>
5309+
<p>The <dfn selector>::cue</dfn> pseudo-element (with no argument) matches any <a>list of WebVTT
5310+
Node Objects</a> constructed for the <i>matched element</i>, with the exception that the properties
5311+
corresponding to the 'background' shorthand must be applied to the <a>WebVTT cue inline background
5312+
box</a> rather than the <a>list of WebVTT Node Objects</a>.</p>
53095313

53105314
<p>The following properties apply to the ''::cue'' pseudo-element with no argument; other properties
53115315
set on the pseudo-element must be ignored:</p>
@@ -5472,8 +5476,22 @@ when the selector does not contain the '':past'' and '':future'' pseudo-classes:
54725476

54735477
<p>As a special exception, the properties corresponding to the 'background' shorthand, when they
54745478
would have been applied to the <a>list of WebVTT Node Objects</a>, must instead be applied to the
5475-
<a>WebVTT cue background box</a>.</p>
5479+
<a>WebVTT cue inline background box</a>.</p>
5480+
5481+
<h4 id=the-cue-pseudo-element>The ''::cue-container'' pseudo-element</h4>
5482+
5483+
<p>The <dfn selector>::cue-container</dfn> pseudo-element (with no argument) matches the <a>WebVTT
5484+
cue block background box</a> constructed for the <i>matched element</i>.</p>
5485+
5486+
<p>The following properties apply to the ''::cue-container'' pseudo-element with no argument; other
5487+
properties set on the pseudo-element must be ignored:</p>
54765488

5489+
<ul class="brief">
5490+
<li>the properties corresponding to the 'background' shorthand</li>
5491+
<li>'padding'</li>
5492+
<li>the properties corresponding to the 'border' shorthand</li>
5493+
<!-- add more... -->
5494+
</ul>
54775495

54785496
<h4 id=the-past-and-future-pseudo-classes>The '':past'' and '':future'' pseudo-classes</h4>
54795497

0 commit comments

Comments
 (0)