A shared reading layout keeps text measure consistent across sibling articles. A wide illustration may need a controlled exception to the prose width.
Worked example
// app/studio/layout.tsx
import type { ReactNode } from "react";
export default function ReadingWidthLayout({ children }: { children: ReactNode }) {
return (
<main
style={{ width: "min(100% - 2rem,68ch)", marginInline: "auto", lineHeight: 1.7 }}
>
{children}
</main>
);
}Implementation notes
A reading-width control can affect tables and code differently from paragraphs. Let wide material scroll locally rather than forcing the page to expand.
Try it yourself
Open a short article and one containing a long code line.
Open the Next.js example →Editorial date May 15, 2026 · Published December 6, 2026