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

[csswg-drafts] [css-content-3] target-text can create a loop (#4610)

From: Mike Bremford via GitHub <sysbot+gh@w3.org>
Date: Tue, 17 Dec 2019 14:12:44 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-539091502-1576591961-sysbot+gh@w3.org>
faceless2 has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-content-3] target-text can create a loop ==
This seems like it could lead to very bad things:

#a::before {
    content: target-text("b", before);
#b::before {
    content: target-text("a", before);
<div id="a"></div>
<div id="b"></div>

It might be worth highlighting this risk and clarifying behaviour, for example this edit to https://drafts.csswg.org/css-content-3/#target-text-function
> A target-text() function that forms a loop by referencing itself or that cannot otherwise be resolved, will evaluate to the empty string.

In the same edit, issue 15 appears to have been resolved and can be deleted (target-text can already take a string as the first argument)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4610 using your GitHub account
Received on Tuesday, 17 December 2019 14:12:46 UTC

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