[csswg-drafts] [selectors] :volume() pseudo (#4001)

tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts:

== [selectors] :volume() pseudo ==
Branching off of #3821, :muted is a good pseudo-class, but would it be useful to also have a :volume() pseudo-class letting you style differently based on the current volume level? One of the use-cases for these pseudo-classes is to help display custom player UI; a common UI pattern I see is a 3-state "muted"/"low volume"/"high volume" display on the volume button (or sometimes more states than that).

The syntax could perhaps be something like:

```
:volume( [ '<' | '>' ] '='? [ <number [0,1]> | <percentage [0%, 100%] ] )
```

So you could write `:volume(<= 50%)`, or `:volume(> .3)`.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4001 using your GitHub account

Received on Tuesday, 4 June 2019 13:49:35 UTC