Skip to content

docs(mobile/v4): stack anchor/origin + attribute-based positioning#447

Open
simonhamp wants to merge 1 commit into
mainfrom
docs/mobile-v4-stack-positioning
Open

docs(mobile/v4): stack anchor/origin + attribute-based positioning#447
simonhamp wants to merge 1 commit into
mainfrom
docs/mobile-v4-stack-positioning

Conversation

@simonhamp

Copy link
Copy Markdown
Member

What

Documents the new mobile v4 positioning capabilities added in NativePHP/mobile-air#226.

the-basics/positioning

  • Attributes ↔ classes. absolute/relative (and position="…") plus top/right/bottom/left now work as plain attributes, not only Tailwind classes — documented side by side in a table.
  • New "Anchor & origin" section for the two-point model: anchor = the point on the parent the child hooks onto, origin = the point on the child that lands there, both defaulting to center, with the nine values (center + edges + corners) and the anchor-* / origin-* class forms.
  • An <aside> on drawing outside the container — supported on both platforms unless a rounded/scroll ancestor clips, plus the hit-testing caveat for interactive overflow.
  • Updated the outdated aside that claimed <native:stack> doesn't honor absolute positioning.

edge-components/stack

  • Children are now absolutely positioned by default with anchor/origin (both center) — no relative/absolute needed; the stack sizes to its largest child.
  • New "Anchoring children" subsection + a corner-status-dot example; replaced the old relative-parent workaround aside.

edge-components/layout

  • Added anchor-* / origin-* to the shared Tailwind class table, linking to the Positioning page.

Verification

Rendered locally via Herd — both pages return 200, code blocks highlight, and the cross-page anchor link resolves to the real heading id (#anchor-amp-origin, since the heading renderer slugs the HTML-encoded Anchor &amp; origin). No code changes; docs only.

Depends on the API in NativePHP/mobile-air#226 — merge/adjust ordering as needed.

🤖 Generated with Claude Code

Covers the new positioning capabilities in NativePHP/mobile-air#226:

- Positioning page: absolute/relative and top/right/bottom/left now work as
  plain attributes, not only utility classes; adds the two-point anchor
  (point on the parent) / origin (point on the child) model, both defaulting
  to center, and notes that a child can draw outside its container.
- Stack page: children are absolutely positioned by default and place
  themselves via anchor/origin; replaces the old relative-parent workaround;
  documents wrap-to-largest-child sizing.
- Layout & Styling: adds anchor-*/origin-* to the shared class table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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