- From: Xiaocheng Hu via GitHub <sysbot+gh@w3.org>
- Date: Thu, 07 Nov 2019 20:27:15 +0000
- To: public-css-archive@w3.org
@gibson042 The use cases you gave are totally valid, and in general, using `attr()` in fallback value doesn't seem to introduce cyclic dependency by itself.
And I was thinking of a different thing though. Sorry for the confusion.
What if the referenced attribute itself contains `attr()`? For example:
```
<div id=target foo="attr(bar *)" bar="attr(foo *)"></div>
#target { --whatever-property: attr(foo *); }
```
Or a detour via `var()`:
```
<div id=target foo="var(--prop-a)" bar="var(--prop-b)"></div>
#target {
--prop-a: attr(bar *);
--prop-b: attr(foo *);
}
```
So do we have valid use cases like that?
If not, we might want to consider making `attr(foo)` ivact if attribute `foo` itself contains `attr()` (and possibly `var()`?)
--
GitHub Notification of comment by xiaochengh
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4482#issuecomment-551249419 using your GitHub account
Received on Thursday, 7 November 2019 20:27:17 UTC