Skip to content

docs(snap): vertical stacks should default justify (omit it)#171

Open
bob-obringer wants to merge 1 commit intomainfrom
bobo/skill-vertical-justify-default
Open

docs(snap): vertical stacks should default justify (omit it)#171
bob-obringer wants to merge 1 commit intomainfrom
bobo/skill-vertical-justify-default

Conversation

@bob-obringer
Copy link
Copy Markdown
Contributor

Summary

After the text-rendering fix in #168, vertical stacks no longer fill via flex-grow: 1 on text children. That exposed a long-standing foot-gun: when a snap sets justify: "between" on a vertical content column whose row peer is taller (e.g. a 9:16 image), the stretched column now has visible empty space, and space-between spreads children across it. Reads as awkward, not designed.

This PR steers agents toward the implicit start packing as the default for vertical content columns and reserves distributing justify values for cases that actually need them.

Changes

  • apps/docs/public/SKILL.md and apps/docs/public/2.0/SKILL.md — new bullet calling out the default and listing when to deviate (Back/Next nav row is the canonical exception).
  • pkgs/snap/llms.txt and apps/docs/public/llms.txt — extended stack.justify description with the same guidance.
  • Patch changeset for @farcaster/snap (since llms.txt ships with the package).

Why this matters now

PR #168 changed text in vertical stacks from flex-1 to min-w-0. With flex-1, text greedily filled the column → no empty space → justify: "between" had nothing to distribute → bug was hidden. With the fix, the column's intrinsic height matches its content, the row's align-items: stretch gives the column a tall stretched height, and the empty space distributes children to top + bottom edges.

The framework behavior is correct (CSS doing what was asked); the agent's output is what needs to change. SKILL.md is the right place to fix it.

Test plan

  • No code changes — docs only
  • Reviewer: confirm SKILL.md additions read clearly and don't conflict with existing guidance

llms.txt and SKILL.md now explicitly steer agents toward the
implicit start packing for vertical content columns, and reserve
`justify: "between"` / `"around"` / `"evenly"` for layouts that
genuinely need children pushed to edges (a horizontal Back/Next
nav row is the canonical case).

This documents a foot-gun made visible by the recent text fix:
text in a vertical stack no longer fills the column with
flex-grow:1, so a stretched column whose snap set
`justify: "between"` now spreads children across empty space
rather than appearing packed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
snap-docs Ready Ready Preview, Comment May 1, 2026 10:38pm

Request Review

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