refactor: Improve templates layout flexibility#89245
Merged
bgw merged 2 commits intovercel:canaryfrom Jan 29, 2026
Merged
Conversation
Collaborator
|
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
bgw
approved these changes
Jan 29, 2026
Member
|
Thanks! I'll work on getting this merged. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Switches the
create-next-apptemplates (app-tw,app) to flex-based layouts instead ofmin-height: 100vh.Why
At Clerk, we ship a template on top of
create-next-appthat adds a header with sign-in/sign-up links to the root layout. The currentmin-height: 100vhapproach causes overflow as soon as you add anything to the layout.Here's a minimal repo showing the overflow issue.
Using flexbox lets the page fill remaining space naturally, so headers/footers don't force an overflow and avoids us having to modify the
page.tsxtemplate.Changes
Tailwind (
app-tw):h-fullon<html>,min-h-full flex flex-colon<body>min-h-screen→flex flex-col flex-1CSS Modules (
app):globals.css:height: 100%on html,min-height: 100%; display: flex; flex-direction: columnon bodypage.module.css:min-height: 100vh→flex: 1The empty templates (
app-empty,app-tw-empty) don't have height styling so they're unchanged.Closes NEXT-
Fixes #