- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 30 Oct 2024 16:43:27 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed ``[cssom-view] Spec for offsetTop/Left does not match impls when offsetParent is `position:static` `<body>` element``, and agreed to the following: * `RESOLVED: change the spec to match reality around child-of-root BODY elements` <details><summary>The full IRC log of that discussion</summary> <noamr> oriol: we encountered this in servo, that impls are not per-spec<br> <noamr> oriol: offsetTop/offsetLeft of the element, when there is no offsetParent, the distance is used<br> <noamr> oriol: implementations do something different with body which has position static, they use its parent (document element), and use the border edge instead of a border edge<br> <noamr> oriol: there's a bug in firefox but the idea is still the same<br> <noamr> oriol: I think what the spec says makes more sense, that even though browsers are doing something different, we should probably align the spec with reality<br> <kbabbitt> s/instead of a border edge/instead of a padding edge/<br> <noamr> astearns: probably browsers wouldn't change this and maintain backwards compat<br> <TabAtkins> i'm also very sad about this being so weird, but suspect we couldn't fix it without everyone being off by 8px<br> <noamr> no one likes to touch offsetLeft issues, I tried before<br> <noamr> oriol: it works differently in nested body elements<br> <noamr> astearns: so the discrepancy is only about the body?<br> <noamr> oriol: impls are doing different things for all body elements<br> <noamr> oriol: maybe that's ok<br> <noamr> oriol: if it's something is nested we might have to do something, I'm fine either way<br> <kbabbitt> agree that we probably need to spec current behavior for compat<br> <noamr> astearns: the simple thing would be to change the spec to match reality<br> <noamr> astearns: what would be the change?<br> <noamr> oriol: we'll add a case where if the offset parent is body with position static, we'd take its parent's border edge instead of its padding edge. Need to analyze some details<br> <noamr> oriol: we could establish for all body elements, or just for body that is a child of a root<br> <noamr> q-<br> <astearns> ack fantasai<br> <Zakim> fantasai, you wanted to ask if this makes sense to make dependent on 'position'<br> <noamr> fantasai: no strong opinion; our propagation rules for certain thing depend on body being the child of the HTML element<br> <noamr> fantasai: the value of position makes a difference. Does it make sense to depend on position?<br> <noamr> oriol: browsers only do this with position:static, otherwise they compute the distance from the body<br> <noamr> oriol: it would probably be tricky compat-wise to do something else<br> <noamr> PROPOSED RESOLUTION: change the spec to match reality around child-of-root BODY elements<br> <flackr> q+<br> <noamr> fantasai: we should double check with WPT<br> <astearns> ack flackr<br> <fantasai> s/double check with WPT/not be checking in WPTs that aren't backed by a spec/<br> <noamr> flackr: is it just that the body element is position:static, or possibly when the body element is not a containing block? Do we need to worry about position:relative containing position:fixed<br> <noamr> oriol: if the body establishes a containing block using position, eg fixed inside relative, it would do the normal thing<br> <astearns> fwiw I’m OK with tests that pass everywhere but are not specced. This points out things we should spec<br> <noamr> oriol: if it's not the offsetParent, we also do the normal thing. so it needs to be in the containing block chain<br> <noamr> oriol: if the body is not in the containing block chain, it also wouldn't be the offsetParent and this wouldn't apply<br> <noamr> flackr: what is the offsetParent with position:fixed<br> <noamr> oriol: this is only a special case when the body is the offsetParent. So if position prevents the body from being a containing block it would also not be the offsetParent<br> <noamr> flackr: just making sure there is no additional special case here<br> <noamr> oriol: just that from what I can see<br> <noamr> objections?<br> <noamr> RESOLVED: change the spec to match reality around child-of-root BODY elements<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10549#issuecomment-2447769164 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 30 October 2024 16:43:27 UTC