Re: [csswg-drafts] Proposal: Expose Pointer Position Information on Hovered Elements (#6733)

Yeah, this isn't a `var()` value, but that's a small concern; we can just assume it's a different function.

`env()` is possible, but only for whole-window pointer position. env() values aren't allowed to change based on context.

So this could be done, just as a new pair of functions, for x and y, that each returned a `<length>`. Since the rest of the CSS uses "0,0 is top-left of box", it would work the same way. They'd probably take a `<box>` value to determine which box they're measuring relative to. Maybe another value to control whether they return a `<length>` or a `<percentage>`, since I can see use-cases for both and you can't easily convert between them.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6733#issuecomment-944961107 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 16 October 2021 17:27:17 UTC