- From: CSS Meeting Bot via GitHub <noreply@w3.org>
- Date: Wed, 15 Apr 2026 16:16:04 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-position] Browsers treat auto margins as 0 when resolving sticky insets`, and agreed to the following: * `RESOLVED: auto margins are treated as zero for the purpose of calculating stickypos insets` * `RESOLVED: no change to gCS() margin behavior (it still becomes a static length, as usual)` <details><summary>The full IRC log of that discussion</summary> <TabAtkins> oriol: This is about something all browsers are currently doing, but spec doesn't metnion<br> <TabAtkins> oriol: when resolving the stickypos insets, the algo takes care of that using the modified margin box<br> <TabAtkins> oriol: it takes margins into account<br> <TabAtkins> oriol: but all browsers treat auto margins as zero for this purpose<br> <TabAtkins> oriol: so first stickypos is laid out as usual, auto margins are normal, but when resolving the stickypos insets the auto margins behaves as zero<br> <TabAtkins> oriol: since all browsers agree with this, and there's some WPT testing it, there might be stuff on the web relying on it. think it's easier to just agree to use it<br> <TabAtkins> oriol: but there's another question then, rountripping<br> <TabAtkins> oriol: in gcs() when you look at margins you get the used length, from layout<br> <TabAtkins> oriol: but there the amount you use for layout and what you use for stickypos insets are different, so they won't roundtrip<br> <TabAtkins> oriol: we could say that gCS() preserves auto margins when stickypos, or accept that this case won't roundtrip<br> <Rossen> q?<br> <emilio> q+<br> <TabAtkins> oriol: I have some mild preference for preserving roundtripping, but could accept otherwise<br> <emilio> q+ fantasai<br> <emilio> q+ emilio<br> <Rossen> Zakim, start meeting<br> <Zakim> inviting RRSAgent<br> <Zakim> RRSAgent, make logs Public<br> <Zakim> Meeting: Cascading Style Sheets (CSS) Working Group Teleconference<br> <RRSAgent> logging to https://www.w3.org/2026/04/15-css-irc<br> <RRSAgent> I have made the request, Zakim<br> <emilio> ack fantasai<br> <Rossen> ack emilio<br> <TabAtkins> fantasai: I think the layout beahvior of resolving auto to zero for sticky insets makes sense, it's probably what you want. no opinion on roundtripping<br> <TabAtkins> emilio: roundtripping is just not resolving the margin, right? that seems doable. we can try it.<br> <TabAtkins> fantasai: you'd have to serialize it as "auto" to make the roundtrip<br> <flackr> q+<br> <TabAtkins> oriol: yeah layout could have auto become a non-zero margin, then inset treats as zero<br> <TabAtkins> emilio: all right, seems doable. worth a try at least<br> <Rossen> ack flackr<br> <TabAtkins> emilio: I would imagine auto+sticky and messing with computed styles is something we might be able to get away with. we can try.<br> <TabAtkins> flackr: we're jumping to the conclusion of trying to specify what browsers do, but why is auto treated as zero for sticky? what would it mean if we tried to make auto meaningful for sticky?<br> <TabAtkins> flackr: also, this roundtripping issue, presumably even aside from sticky if you have "auto" and then check gCS() you get a static value, it's not adaptive. not strictly a roundtrip then<br> <Rossen> ack dbaron<br> <TabAtkins> dbaron: might be misremembering, but I think there are many other cases for margins that doesn't roundtrip<br> <TabAtkins> dbaron: like % margins resolve to px<br> <TabAtkins> dbaron: that also doesn't really roundtrip.<br> <TabAtkins> dbaron: at least, that can cause different intrinsic sizing results<br> <TabAtkins> emilio: and float layout<br> <TabAtkins> dbaron: in general, you can't really roundtrip from gCS() for some of these properties that do a lot of resolution, even if it "does the same thing" in (most) contexts<br> <TabAtkins> oriol: it's true that using %s can affect intrinsic contribution, but the element itself kinda stays the same<br> <emilio> I still think the less gCS magic we have the better, but also can live with either I guess<br> <TabAtkins> oriol: so I suppose if all browsers are okay with keeping the special auto behavior, we can spec that. for roundtripping I don't have a strong opinion<br> <TabAtkins> proposed: auto margins are treated as zero for the purpose of calculating stickypos insets<br> <TabAtkins> proposed: no change to gCS() margin behavior (it still becomes a static length, as usual)<br> <TabAtkins> RESOLVED: auto margins are treated as zero for the purpose of calculating stickypos insets<br> <TabAtkins> RESOLVED: no change to gCS() margin behavior (it still becomes a static length, as usual)<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12852#issuecomment-4253662293 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 15 April 2026 16:16:05 UTC