getComputedStyle of a node can be incorrect when that node uses CSS Custom Properties and an ancestor node which sets CSS Custom Properties is modified. Example: http://jsbin.com/ginegud/12/edit?html,console,output This example modifies the values of `--border` based on the class selector `.switch`, synchronously calls `getComputedStyle()`, and prints the value of `border-top-width` in the cases of 1) before adding the class `switch` 2) synchronously after adding the class `switch` 3) synchronously removing the class `switch` Expected: 2px 10px 2px Actual: 2px 2px 2px
<rdar://problem/31549434>
I am able to reproduce this issue in Safari 15.6 on macOS 12.5 using below mentioned "JSBin": *** Safari 15.6 on macOS 12.5 *** "2px" "2px" "2px" *** Chrome Canary 106 *** "2px" "10px" "2px" *** Firefox Nightly 105 *** "2px" "10px" "2px"