style: reduce font weights and clean up docs layout#36
Conversation
React 19.2, Next.js 16.1.6, Tailwind CSS 4.1, fumadocs 16.6, and all Radix UI, motion, vaul, cmdk, shiki, zod packages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Delete tailwind.config.ts, move config to CSS-first @theme inline - Switch postcss plugin from tailwindcss to @tailwindcss/postcss - Replace tailwindcss-animate with tw-animate-css - Add @Utility for no-scrollbar, @custom-variant for dark mode - Add tailwindStylesheet to prettier config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update provider import to fumadocs-ui/provider/next - Update findNeighbour import to fumadocs-core/page-tree - Add explicit Page type for custom frontmatter schema fields - Add fumadocs CSS imports and @source directive in globals.css - Remove non-async export from code-highlight server actions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove eslint block from next.config.mjs (removed in Next 16) - Rewrite eslint.config.mjs to native flat config - Update tsconfig.json for Next.js 16 defaults Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use data-[state=open/closed] variants instead of shorthand for Radix UI compatibility in revola.tsx and dialog.tsx - Update shadcn dialog to v4 animation pattern (fade + zoom) - Fix ReactNode type for icon in command menu Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rehype-pretty-code strips .line class and uses data-line attribute, causing fumadocs CSS padding rules to not apply.
Load JetBrains Mono as a local font and update all font-geist-mono references to font-jetbrains-mono across components and registry.
- Change DocsTitle from font-semibold to font-normal - Override prose heading font-weight to 500 for h2-h6 - Reduce hero title from font-semibold to font-medium, remove subtitle font-medium - Remove unnecessary "use client" from docs layout - Reorder Tailwind classes in hero for consistency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughUpdates include Tailwind/PostCSS plugin and global CSS changes, migration from Geist Mono to a local JetBrains Mono font, new exported Page type, ESLint/Prettier and package script/tooling updates, UI styling tweaks across docs and dialog components, and several dependency/version bumps and script additions. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Fix all issues with AI agents
In `@app/`(docs)/docs/[[...slug]]/page.tsx:
- Around line 145-150: Summary: The computed target prop is being overwritten by
the later props spread; move the spread before setting target so our computed
target wins. Fix: In the anchor renderer (the function returning <Link ... />)
spread props first and then set target using the computed expression
(props.href?.startsWith("https") ? "_blank" : "_self") so any incoming target in
props does not override it; keep the same props cast to
React.ComponentProps<typeof Link> and preserve other attributes. Ensure the
order is: {...(props as React.ComponentProps<typeof Link>)} then target={...}.
- Line 34: Remove the redundant type assertion on the result of source.getPage:
where code assigns const page = source.getPage(params.slug) as Page | undefined,
change it to const page = source.getPage(params.slug) (no assertion). Ensure the
subsequent guard if (!page) notFound() remains intact so TypeScript can narrow
the type; update all call sites in this file that use the same pattern
(references: source.getPage, page, notFound).
In `@components/code-block.tsx`:
- Around line 67-69: The "Loading..." pre is invisible on the bg-black container
because no explicit foreground color is set; update the component (in
components/code-block.tsx) to apply a light text color class (e.g., add
text-white or text-gray-100) to the container div or the <pre> element so the
loading text is readable against bg-black (modify the className on the
surrounding <div className="relative my-6 min-h-125 overflow-hidden rounded-lg
border bg-black text-sm"> or on the <pre> element).
In `@components/component-preview.tsx`:
- Around line 56-68: Replace the incorrect Tailwind attribute selector
data-[state=active] with data-[active] on the Tabs.Tab className strings so the
active styles apply; specifically update the Tabs.Tab instances (the ones
containing "Preview" and "Code") to use data-[active]:border-b-primary
data-[active]:text-foreground data-[active]:shadow-none instead of
data-[state=active]:*; make the same replacement for the Tabs.Tab usages in the
companion component (component-preview-custom-highlight) to ensure active-tab
styling works as intended.
In `@registry/revola/revola.tsx`:
- Around line 170-171: In the desktop variant string in revola.tsx (the long
class list containing "data-[state=open]:animate-in ... outline-none"), remove
the duplicated "max-w-[calc(100%-2rem)]" and resolve the conflicting breakpoint
classes by keeping only the intended "sm:max-w-lg" (remove "sm:max-w-sm"), and
then delete the commented-out old variant line below it; ensure the cleaned
class string is passed unchanged to the same cn()/twMerge call that uses this
value.
🧹 Nitpick comments (4)
app/layout.tsx (1)
19-23: Only the Regular weight is bundled.If any UI element applies
font-boldorfont-semiboldto text usingfont-jetbrains-mono, the browser will synthesize a faux bold instead of using a proper weight variant. This is fine if monospace text is only ever displayed at normal weight, but worth confirming.app/globals.css (1)
1-8: Static analysis warnings are false positives — Tailwind v4 directives.The Biome and Stylelint errors for
@source,@custom-variant,@theme, and@utilityare all valid Tailwind CSS v4 syntax that these tools don't yet recognize. Consider adding Tailwind v4-aware parser configuration to Biome/Stylelint to suppress these, or exclude this file from those linters.components/code-block.tsx (1)
53-65: Potential double border: both the outerdiv(Line 56) andScrollArea(Line 60) carryborder rounded-lg.Since
ScrollAreausessize-fullinside theoverflow-hiddenparent, the two borders will visually stack. If this is intentional, no action needed — but if a single border is desired, removeborderfrom one of the two elements.app/(docs)/docs/[[...slug]]/page.tsx (1)
152-158: Inline<code>styling will be fully replaced if props contain aclassName.The hardcoded
classNameon Line 155 is set before{...props}is spread. If a rehype/remark plugin or MDX content injects aclassName, the styling is lost. Wrapping withcn()would be safer, though for pure inline code this is unlikely to be an issue in practice.💡 Safer merge
code: ({ ref, ...props }: React.ComponentProps<"code">) => ( <code ref={ref} - className="border border-primary/15 bg-secondary/50 px-1 py-[1.5px] font-jetbrains-mono text-secondary-foreground" {...props} + className={cn("border border-primary/15 bg-secondary/50 px-1 py-[1.5px] font-jetbrains-mono text-secondary-foreground", props.className)} /> ),
Summary
font-medium, removed subtitlefont-medium)"use client"directive from docs layoutSummary by CodeRabbit
Chores
Style
Refactor