3 ms·
I don't understand why we can't have something like this: ``` .target { name: myname } .tooltip: { left: var(myname.left), bottom: calc(var(myname.
by a1371 4y ago
I don't understand why we can't have something like this:
```
.target {
name: myname
}
.tooltip: {
left: var(myname.left),
bottom: calc(var(myname.top)-20px)
}
```
What's hard about exposing some element properties in var()? Instead of just making specific APIs all the time.
- bfgeek 4y agoWith this API this would be: .target { anchor-name: --myname; } .tooltip { left: anchor(--myname left); bottom: calc(anchor(--myname top) - 20px); } https://jsfiddle.net/3rasnhyp/ https://jsfiddle.net/3rasnhyp/