W3C home > Mailing lists > Public > www-style@w3.org > November 2014

[selectors] define how the :active state propagates across elements

From: Florian Rivoal <florian@rivoal.net>
Date: Thu, 6 Nov 2014 14:24:25 +0100
Message-Id: <8ADFE4C9-579D-4DF2-B6CD-53FF9C2D6ADB@rivoal.net>
To: www-style@w3.org

The selector spec does not define whether the :active pseudo class applies to more than the element which is directly activated.


I’ve tested a bit, and here are the current behaviours:

a - Firefox, chrome, safari and IE(11) propagate the :active state from a label to its labelled control (linked through the ‘for’ attribute)

b - IE(11) also propagates the active state from a labelled control to its label (opposite direction from a)

c- Firefox, chrome, safari, *but not IE(11)* propagate the :active state to parent of an :active element

(If anyone cares, Opera's Presto does neither a, b nor c)

Proposal 1: Similarly to :hover, add “Host languages may define additional ways in which an element can match :active.” and let the whatwg sort out a vs a+b in the html spec

Proposal 2: If IE is willing to adjust, define that just like :hover “The parent of an element that is :active is also in that state.” (and ping the whatwg to reflect that in their spec as well)

 - Florian
Received on Thursday, 6 November 2014 13:24:49 UTC

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