[csswg-drafts] [cssom-view-1] offsetParent produces incorrect results for position:fixed elements that behave like absolute (#12352)

dbaron has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom-view-1] offsetParent produces incorrect results for position:fixed elements that behave like absolute ==
There are a number of cases ([such as for transforms](https://drafts.csswg.org/css-transforms-1/#containing-block-for-all-descendants)) where `position:fixed` elements behave like `position:absolute`, rather than attaching to the viewport.

The [spec for `offsetParent`](https://drafts.csswg.org/cssom-view-1/#dom-htmlelement-offsetparent) (and presumably `offsetTop`/`offsetLeft` as well) doesn't account for this, but instead returns null for `position:fixed` in step 1.

According to [the relevant Chromium bug](https://issues.chromium.org/40694036) Firefox does this correctly -- and it seems like it would be best if Chromium changed to match Firefox since that behavior makes the most sense.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12352 using your GitHub account


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

Received on Tuesday, 17 June 2025 13:33:58 UTC