Re: Yet Another Scroll-Up Idea (YASUI) in VTT

On Wed, Sep 26, 2012 at 12:06 AM, Simon Pieters <simonp@opera.com> wrote:
> On Tue, 25 Sep 2012 14:32:57 +0200, Silvia Pfeiffer
> <silviapfeiffer1@gmail.com> wrote:
>
>
> Looking at it again, other things now stand out. :-)

Coo, thanks!


> ::cue(c.bg_white) {
>   background-color: white;
> }
> ::cue(c.bg_green) {
>   background-color: green;
> }
> ::cue(c.bg_blue) {
>   background-color: blue;
> }
> ::cue(c.bg_cyan) {
>   background-color: cyan;
> }
> ::cue(c.bg_red) {
>   background-color: red;
> }
> ::cue(c.bg_yellow) {
>   background-color: yellow;
> }
> ::cue(c.bg_magenta) {
>   background-color: magenta;
> }
> ::cue(c.bg_black) {
>   background-color: black;
> }
> ::cue(c.transparent) {
>   background-color: transparent;
> }
> /* need to set this before changing color, otherwise the color is lost */
> ::cue(c.semi-transparent) {
>   background-color: rbga(0, 0, 0, 0.5);
> }
> /* need to set this before changing color, otherwise the color is lost */
> ::cue(c.opaque) {
>   background-color: rbga(0, 0, 0, 1);
> }
>
>
> You have typoed rgba as rbga.

Fixed.

> The above doesn't do what you think it does. The way the cascade works is
> that the last background-color declaration wins if there are two classes
> specified, so <c.semi-transparent.bg_magenta> will end up being rgba(0, 0,
> 0, 0.5).
>
> The above should be:
>
> ::cue(c.bg_white) {
>   background-color: white;
> }
> ::cue(c.bg_green) {
>   background-color: green;
> }
> ::cue(c.bg_blue) {
>   background-color: blue;
> }
> ::cue(c.bg_cyan) {
>   background-color: cyan;
> }
> ::cue(c.bg_red) {
>   background-color: red;
> }
> ::cue(c.bg_yellow) {
>   background-color: yellow;
> }
> ::cue(c.bg_magenta) {
>   background-color: magenta;
> }
> ::cue(c.bg_black) {
>   background-color: black;
> }
> ::cue(c.bg_white.semi-transparent) {
>   background-color: rgba(255, 255, 255, 0.5);
> }
> ::cue(c.bg_green.semi-transparent) {
>   background-color: rgba(0, 128, 0, 0.5);
> }
> ::cue(c.bg_blue.semi-transparent) {
>   background-color: rgba(0, 0, 255, 0.5);
> }
> ::cue(c.bg_cyan.semi-transparent) {
>   background-color: rgba(0, 255, 255, 0.5);
> }
> ::cue(c.bg_red.semi-transparent) {
>   background-color: rgba(255, 0, 0, 0.5);
> }
> ::cue(c.bg_yellow.semi-transparent) {
>   background-color: rgba(255, 255, 0, 0.5);
> }
> ::cue(c.bg_magenta.semi-transparent) {
>   background-color: rgba(255, 0, 255, 0.5);
> }
> ::cue(c.bg_black.semi-transparent) {
>   background-color: rgba(0, 0, 0, 0.5);
> }
> ::cue(c.transparent) {
>   background-color: transparent;
> }

Added.


> The ::cue(c.transparent) selector has lower specificity than the
> semi-transparent one. If you want transparent to win over semi-transparent
> when both are specified, make the selector ::cue(c.transparent.transparent).

Changed.

> Then we have these:
>
>
> ::cue(c.underline) {
>   text-decoration: underline;
> }
> ::cue(c.italics) {
>   font-style: italic;
> }
> ::cue(c.bold) {
>   font-weight: bold;
> }
>
>
> Why not rely on <u>, <i> and <b> instead?

Yeah, funny that. My text actually says to use those. I guess I added
them for completeness, but they really are not necessary. Removed.

> Finally, it seems slightly weird that style sheets referenced from the
> WebVTT file itself would use the pseudo-elements, since it would mean that
> the selector has to match the <video> of which the track is associated. I
> can see some value in being able to use the same style sheet for both the
> HTML page and referencing it from the track. OTOH, having to say ::cue(blah)
> instead of just blah in an inline style sheet seems quite annoying.

I definitely want to keep those. I don't think we should use different
CSS inline in a WebVTT file than in a HTML file. That just becomes
annoying when you want to cut and paste and move things around. I'd
much rather live with the ::cue overhead in the WebVTT file.

Cheers,
Silvia.

Received on Tuesday, 25 September 2012 22:04:26 UTC