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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 13 Aug 2013 11:42:18 -0700
Message-ID: <CAAWBYDB+8r5KXndnMbAYYNftpHVcaL4HsZXyk=C+OUYcMJZG4Q@mail.gmail.com>
To: "Edward O'Connor" <eoconnor@apple.com>
Cc: www-style list <www-style@w3.org>
On Tue, Aug 13, 2013 at 11:14 AM, Edward O'Connor <eoconnor@apple.com> wrote:
> 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);
>   }

These make sense to me.  I'm fine with HTML defining them.

~TJ
Received on Tuesday, 13 August 2013 18:43:06 UTC

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