2.7 KiB
2.7 KiB
Theme Customization, Colors, and Icons
Use this reference when you want documentation that feels intentional and brand-aligned while preserving readability and accessibility.
Start from the Scaffold
Always start new projects with uv run zensical new so the baseline theme/config scaffolding is in place before customization.
Customization Strategy
- Configure theme and feature flags in the project config first.
- Apply visual tokens (colors, spacing, typography) in a shared CSS layer.
- Add icons and logo assets with consistent naming.
- Use template overrides only when config/CSS cannot solve the requirement.
Key Zensical Customization Surfaces
!!! info "Zensical sources" - Customization overview - Additional CSS - Additional JavaScript - Extending the theme - Logo and icons setup
Colors and Accessibility
- Define color variables once and reuse them for semantic roles (primary, surface, muted, success, warning).
- Keep contrast high for body text, code blocks, and nav labels.
- Test color changes on mobile and desktop, including search highlights and active nav states.
!!! info "General references" - Material Design color guidance - WCAG overview
Icons: Selection and Search Landing Pages
If your theme supports icon sets through your docs stack, these search portals are useful:
- Material Symbols search
- Font Awesome icons search
- Simple Icons search
- Iconify icon set search
- Lucide icons
!!! tip "Icon family consistency" Pick one primary icon family for navigation and status icons, then document naming conventions.
Extending the Theme Safely
Use overrides as a last step, not the first.
- Confirm the requirement cannot be solved by config and CSS.
- Keep override templates minimal and focused.
- Track upstream changes if you override partials.
- Add a visual regression checklist for common pages.
Review Checklist
- Theme changes preserve readability for long-form docs.
- Icons are consistent in weight/style and meaningful in context.
- Color changes do not break code-block syntax highlighting or search visibility.
- Overrides are documented with rationale and owner.