Re: [csswg-drafts] [css-selectors] Compare values across different attributes? (#11536)

~~~~ css
[data-one][data-two] {
--diff: calc(attr(data-one type(<number>), 0) - attr(data-two type(<number>), 0));
  background: red;
  background: if(
    var(--diff) = 0: green;
    var(--diff) > 0: lime;
    var(--diff) < 0: olive;
    else: orange;
  );
}
~~~~
I understand that this would be cumbersome for more than a handful of properties.

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


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

Received on Tuesday, 21 January 2025 21:15:50 UTC