- From: Pete Boere <pete@the-echoplex.net>
- Date: Wed, 9 Nov 2011 12:15:16 +0000
- To: www-style@w3.org
Received on Wednesday, 9 November 2011 12:17:05 UTC
Usually when using the :hover pseudo class it is appropriate to also use the :focus pseudo class for accesibility reasons. [1] Is it possible to have composite pseudo classes for this purpose? I've implemented a kind of composite pseduo class in a PHP CSS preprocessor[2] like this: ..nav a:hocus { ... } ..nav a:pocus { ... } compiling to ..nav a:hover, .nav a:focus { ... } ..nav a:hover, .nav a:focus, .nav a:active { ... } internally a substitiution is being made using an :any (:matches) shim [3] :hocus => :matches(:hover,:focus) [1] http://www.456bereastreet.com/archive/201004/whenever_you_use_hover_also_use_focus/ [2] http://the-echoplex.net/csscrush [3] https://github.com/peteboere/css-crush/blob/master/plugins/hocus-pocus.php -- Pete Boere Web Developer
Received on Wednesday, 9 November 2011 12:17:05 UTC