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

[csswg-drafts] [web-animations-1] What if the effect target is a nested pseudo-element? (#4487)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Wed, 06 Nov 2019 15:40:35 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-518553565-1573054834-sysbot+gh@w3.org>
Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [web-animations-1] What if the effect target is a nested pseudo-element? ==
From https://drafts.csswg.org/web-animations-1/#keyframe-effects,

> In order for the effect target to have a well-defined lifecycle, it is represented as an Element known as the ***target element*** and a pseudo-element selector knows as the ***target pseudo-selector***. If the effect target is an Element, the target element is that element and the target pseudo-selector is null. If the effect target is a pseudo-element, the target element is its originating element and the target pseudo-selector is as required to specify that particular pseudo-element.

This seems to assume that pseudo-elements are always originated by an element. But nested pseudo-elements are originated by another pseudo-element.

So what happens if the effect target is a nested pseudo-element like `::before::marker`?

I see 3 reasonable possibilities:

  - The target element is the originating element of the `::before`, and the target pseudo-selector is `::before::marker`.
    That is, enforce the target element to be an Element, never a CSSPseudoElement, and let the target pseudo-selector be multiple pseudo-element selectors.
 - The target element is the CSSPseudoElement represeinting the `::before`, and the target pseudo-selector is `::marker`
    That is, enforce the target pseudo-selector to be at most a single pseudo-element selector, and let the target element be either an Element or a CSSPseudoElement. Just forbid the case of the target element being a CSSPseudoElementand the target pseudo-selector being null.
 - Get rid of the target pseudo-selector, let the target element equal the effect target, either an Element or a CSSPseudoElement.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4487 using your GitHub account
Received on Wednesday, 6 November 2019 15:40:37 UTC

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