Skip to content

feat: enhance visibility of syntax blocks in docs - #570

Merged
cofin merged 2 commits into
mainfrom
feat/theme-color-alignment
Oct 11, 2025
Merged

cofin merged 2 commits into
mainfrom
feat/theme-color-alignment

Conversation

@cofin

@cofin cofin commented Oct 11, 2025 •

Copy link
Copy Markdown
Member

Summary

Migrates custom documentation styling from hardcoded colors to Shibuya theme's native CSS variable system. This ensures consistent theming across light/dark modes and leverages the configured accent_color: "amber" setting.

Changes

Theme Color Integration

  • custom.css: Replaced all hardcoded colors (#202235, #edb641, #ffd480) with Shibuya CSS variables
    • Uses --accent-* variables (1-12) for brand colors
    • Uses --accent-a* variables for transparent/glow effects
    • Uses --sy-c-text and --sy-c-heading for text colors
    • Uses --gray-* variables for neutral colors

Syntax Highlighting

  • syntax-highlighting.css: New file integrating code syntax highlighting with amber accent color
    • Decorators, attributes use --accent-11 in light mode
    • Functions, classes use --accent-11 in dark mode
    • Highlighted lines use --accent-a2 (light) and --accent-a4 (dark)
    • All colors respect current theme mode

Logo Styling

  • Dark mode: White text (var(--sy-c-text)) with soft gold glow
  • Light mode: Heading color with amber glow

Badge Container

  • Removed box styling (padding, border, background)
  • Clean flex layout with gap spacing

Configuration

  • Added syntax-highlighting.css to codespell skip list (prevents false positives on CSS class abbreviations like .nd for Name.Decorator)

Visual Impact

Before: Hardcoded colors inconsistent with theme system
After: All colors dynamically use Shibuya's amber accent palette

  • Light mode: Clean amber accents throughout
  • Dark mode: White text with soft gold glow, amber highlights
  • Both modes: Consistent theming, proper contrast ratios

Testing

  • ✅ Documentation builds successfully
  • ✅ Light mode verified
  • ✅ Dark mode verified
  • ✅ Logo glow effect preserved
  • ✅ Syntax highlighting integrates with theme
  • ✅ All linting passes

Files Changed

  • docs/_static/custom.css - Theme variable migration
  • docs/_static/syntax-highlighting.css - New syntax highlighting integration
  • docs/conf.py - Added syntax-highlighting.css to html_css_files
  • pyproject.toml - Added codespell skip rule
  • Minor documentation fixes in guides (unrelated formatting)

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Documentation preview will be available shortly at https://litestar-org.github.io/advanced-alchemy-docs-preview/570

@cofin
cofin merged commit 0690c54 into main Oct 11, 2025
20 checks passed
@cofin
cofin deleted the feat/theme-color-alignment branch October 11, 2025 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants