Skip to content

Fix authored zero insets in absolute stack positioning (iOS) - #39

Merged
shanerbaner82 merged 2 commits into
mainfrom
fix/absolute-zero-edge-anchor
Aug 4, 2026
Merged

Fix authored zero insets in absolute stack positioning (iOS)#39
shanerbaner82 merged 2 commits into
mainfrom
fix/absolute-zero-edge-anchor

Conversation

@shanerbaner82

@shanerbaner82 shanerbaner82 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

placeAbsolute read a raw zero inset as "unset", so an authored bottom-0 / right-0 was indistinguishable from no anchor at all — the child silently fell back to the default edge instead of anchoring.

Fix: authored zeros arrive as IEEE -0.0, and the renderer treats "non-zero OR negative sign bit" as set. bottom-0 anchors to the bottom edge, negatives still deliberately overhang (-right-8 bleed), unset edges keep the default.

shanerbaner82 and others added 2 commits August 4, 2026 13:02
The placeAbsolute convention read a raw zero as "unset", so an authored
`bottom-0` / `right-0` was indistinguishable from no anchor at all and
the child fell back to the default edge. Encode authored zeros as IEEE
-0.0 on the wire and treat "non-zero OR negative sign bit" as set:
`bottom-0` now anchors to the bottom edge, negatives still overhang
(`-right-8` bleed), and unset edges keep the default.
Mirrors the iOS signed-zero convention: -0.0f flags an authored
`right-0`/`bottom-0` (raw sign bit, since -0.0f == 0f in Kotlin), and
left/top take precedence when both opposing edges are authored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@shanerbaner82
shanerbaner82 merged commit 683977d into main Aug 4, 2026
3 checks passed
@shanerbaner82
shanerbaner82 deleted the fix/absolute-zero-edge-anchor branch August 4, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant