styling of video controls/captions (was Re: native elements versus scripted)

On Apr 7, 2010, at 1:02 AM, Sean Hayes wrote:

> This is an interesting point. And might address something that has  
> been concerning me with regards to caption formats inheriting style  
> from the surrounding context. I think inheritance of style into the  
> track elements should not happen by default, to avoid inadvertent  
> mixing of ambient styles with the caption style, but could be  
> allowed where it is explicitly applied using a pseudo class, and  
> thus the author intended this to happen and presumably knows what  
> they are doing.

I think it needs to be a pseudo-element, not pseudo-class, since it  
selects a piece of a compound element, rather than identifying a state  
of the whole element. I realize the distinction may seem academic to  
those who are not serious CSS nerds, but it's helpful to avoid  
ambiguity, since it may sometimes be unclear which is intended.  
Examples -  ::first-letter is a pseudo-element, it  applies to only a  
piece of the element it is applied to. :hover is a pseudo-class, it  
applies to the whole element, but only in a particular state.

So yes, we could come up with a ::captions pseudo-class that allows  
styling of caption text separate from any surrounding content. By  
having a default text style defined for video::captions, it could  
avoid picking up ambient styles but still allow explicit styling.  
However, I think this is starting to stray a bit from the original  
topic.

Regards,
Maciej

Received on Wednesday, 7 April 2010 08:43:17 UTC