W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: [selectors4][css-ui] Timed media state pseudoclasses

From: Henrik Andersson <henke@henke37.cjb.net>
Date: Tue, 13 Aug 2013 20:50:16 +0200
Message-ID: <520A7FE8.5020505@henke37.cjb.net>
To: Edward O'Connor <eoconnor@apple.com>, www-style@w3.org
This looks thematically similar to my idea of adding pseudo elements for
common parts of ui controls. (See archive in Feb 2013) Could the both
fit into the same spec?

Edward O'Connor skriver:
> Hi,
> 
> When Web authors build custom media controls, they have to build a bunch
> of appearance-related stuff imperatively in JS that should be easy to do
> in a declarative manner.
> 
> For example, it's common to have a play/pause button whose appearance
> depends on whether or not the media is playing.
> 
>   :matches(video, audio) + .controls button.playpause {
>     background-image: url(pause.png);
>   }
> 
>   :matches(video, audio):paused + .controls button.playpause {
>     background-image: url(play.png);
>   }
> 
> Similarly, volume controls often have a special appearance when the
> media is muted.
> 
>   :matches(video, audio) + .controls .volume {
>     background-image: url(vol-normal.png);
>   }
> 
>   :matches(video, audio):muted + .controls .volume {
>     background-image: url(vol-muted.png);
>   }
> 
> 
> Thanks,
> Ted
> 
> 
> 
Received on Tuesday, 13 August 2013 18:50:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC