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

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:

```html
<style>
#a::before {
    content: target-text("b", before);
}
#b::before {
    content: target-text("a", before);
}
</style>
<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