feat(web)!: layout/grid system v1 — Container/Grid/Row/Column primitives + responsive nav#12
Merged
Merged
Conversation
Approved brainstorming output. Hybrid path: engine ships four React primitives (Container, Grid, Row, Column) consumed by organism/template code; preset-layout CMS palette stays reserved with zero components (the Strapi 5 no-DZ-inside-component limit rules out polymorphic layout blocks on the editor side). Shell change: main becomes full-width, atom blocks preserve the 72ch prose width via one CSS selector, chrome shells strip layout CSS so refactored organisms own their containers. Scope: three-tier mobile-first breakpoints (base/md/lg), 12-column Grid, refactor of Hero + Cta + Navbar + Footer to consume the primitives. Wire-compatible (no PressSchema change); visual-only breaking change for adopter custom blocks that relied on the old 72ch main. Co-authored-by: Cursor <cursoragent@cursor.com>
…ives allow data-/aria-* passthrough Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this ships
The layout/grid system v1 for
@ogs-tech/press-web(plan:docs/superpowers/plans/2026-07-16-layout-grid-system.md, executed task-by-task with per-task spec+quality reviews and a final whole-branch review).packages/web/src/layout/—Container,Grid(12-col),Row,Column— emitting semantic HTML +data-press-layout="…"+ per-instance CSS custom properties; all responsive behavior lives intheme.cssvar()cascades over three fixed tiers (base 0 / md 768 / lg 1024). A coordination test pins the TS↔CSS breakpoint literals against drift.FIXED_TOKENS.container(widths + paddingX) andFIXED_TOKENS.gridGap, emitted viabuildThemeStyle's single:rootinjection point (engine-fixed, not adopter-overridable).data-cta="frame"), Navbar (Container + nested Rows), Footer (Container-wrapped<small>).MobileNavhamburger drawer (the one deliberate client-side exception): aria-expanded/aria-controls,role="dialog" aria-modal, Escape closes, backdrop-only close (target === currentTarget), body scroll lock, focus to first link on open / restored to toggle on close. Internal toNavbar— not exported; adopters overridingpreset-organism.navbarbypass it entirely.mainis full-width; a single selector keeps everypreset-atom.*/custom-atom.*insidemainat ~72ch prose width; header/footer shells keep only stroke + vertical padding.@ogs-tech/press-web+ CLAUDE.md "Layout primitives" architecture section.Breaking (see changeset for migration)
mainno longer caps at 72ch — adopter custom non-atom blocks that relied on the old cap should wrap in<Container maxWidth="prose">.MobileNav(adopters keeping the engine navbar get it automatically).Wire contract untouched:
PressSchema/PageBody/HeaderBlocks/FooterBlocksbyte-identical;packages/cms,shared,clihave zero changes; no re-seed, nopress-cmsbump.preset-layoutCMS category stays labelled and empty by design.Verification
pnpm -r --if-present typecheckclean (+ cms backend tsc); tests cli 21/21, cms 60/60, web 284/284.Remaining manual checklist (editor-driven — needs admin-created content)
Tracked follow-ups (non-blocking, from reviews)
aria-modal), CTA-only-drawer focus target, draweraria-current, drawer external-link marker styling.setCssVarhelper +gapExprdedupe + Container passthrough index-signature alignment + minor comment/test hardening.🤖 Generated with Claude Code