diff --git a/docs/platforms/javascript/guides/nextjs/index.mdx b/docs/platforms/javascript/guides/nextjs/index.mdx index bbe21a4901c0df..478beb4447f112 100644 --- a/docs/platforms/javascript/guides/nextjs/index.mdx +++ b/docs/platforms/javascript/guides/nextjs/index.mdx @@ -9,6 +9,158 @@ categories: - server-node --- + + diff --git a/nextjs-typography-audit.md b/nextjs-typography-audit.md new file mode 100644 index 00000000000000..149f461147a9d5 --- /dev/null +++ b/nextjs-typography-audit.md @@ -0,0 +1,121 @@ +# Next.js Page Typography Audit & Improvements + +## Overview +Applied clean, Supabase-inspired typography improvements to the main Next.js guide page (`https://docs.sentry.io/platforms/javascript/guides/nextjs/`) to enhance readability and reduce visual noise. + +## Audit Findings + +### Issues Identified +1. **Inconsistent heading hierarchy** - Steps and sections lacked clear visual distinction +2. **Dense code blocks** - Small font sizes and poor contrast made code difficult to read +3. **Noisy alert styling** - Heavy colors and backgrounds created visual clutter +4. **Poor expandable sections** - Lack of subtle styling for collapsed/expanded content +5. **Inadequate spacing** - Tight margins reduced reading comfort + +## Implemented Solutions + +### 1. Clean Typography Hierarchy +- **H1 (Main title)**: 36px with subtle letter-spacing for clear page identity +- **H2 (Step headers)**: 26px with consistent spacing, no heavy underlines +- **H3 (Subsections)**: 20px for clear content organization +- **H4 (Components)**: 18px for detailed sections +- **Body text**: Enhanced line-height (1.6) for improved readability + +### 2. Supabase-Inspired Color Scheme +**Light Mode:** +- Code blocks: Light gray (#f8fafc) with subtle borders +- Alerts: Soft, contextual colors (blue for info, green for success, yellow for warnings) +- Expandables: Clean gray backgrounds with minimal contrast + +**Dark Mode:** +- Adjusted colors for proper contrast in dark theme +- Maintained readability across all components + +### 3. Enhanced Code Presentation +- **Font size**: Increased to 14px for better readability +- **Backgrounds**: Subtle gray instead of high contrast +- **Borders**: Clean 1px borders for definition +- **Inline code**: Balanced contrast for easy scanning + +### 4. Subtle Alert Styling +- **Reduced visual weight**: Soft backgrounds instead of bold colors +- **Better hierarchy**: Consistent with Supabase's documentation approach +- **Contextual colors**: + - Info: Light blue (#eff6ff) + - Success: Light green (#f0fdf4) + - Warning: Light yellow (#fefce8) + +### 5. Clean Expandable Sections +- **Minimal styling**: Light gray headers with subtle borders +- **Clear interaction**: Obvious but not overwhelming click targets +- **Consistent spacing**: Proper padding and margins + +## Technical Implementation + +### Page Targeting +Applied styles directly to the Next.js page using an inline `