W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

[csswg-drafts] [css-pseudo-4] Semantics of CSSPseudoElement : EventTarget (#4398)

From: George Steel via GitHub <sysbot+gh@w3.org>
Date: Fri, 04 Oct 2019 19:40:24 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-502811278-1570218023-sysbot+gh@w3.org>
george-steel has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-pseudo-4] Semantics of CSSPseudoElement : EventTarget ==
The CSSPseudoElement IDL specifies an inheritance from EventTarget, and this leaves a not a questions as to how enent handling on pseudo-elements should behave (which has no section on the spec). Is this interface only for animation events (transition events already target the parent but include a pseudoElement field to specify the pseudo-type)?

Currently system events (including click) which hit a pseudo-element are retargeted to the parent element before propagation. Should pseudo-elements be able to listen for these events, and if so, should `event.target` be the the pseudo-element (a breaking change) or the parent element.

Also, while the current system of event bubbling is well-defined for for the tree hierarchy for elements, some pseudo-elements (first-line, selection) feature multiple inheritance. How would pseudo-element events handle this. In normal event handling, a bubbled event always bubbles to it's parent element. However, when dealing with pseudo-elements, we have (following CSS cascade rules) we have the chain
    parent -> parent::first-line -> child -> child::first-line
How would we handle bubbling in this case? Do we break normal order and follow the CSS inheritance hierarchy? Do we propagate through all the pseudo-elements first?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4398 using your GitHub account
Received on Friday, 4 October 2019 19:40:26 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:54 UTC