This document outlines the comprehensive visual design system implemented for the Saheb Ansari blog. The design system provides a cohesive, modern, and accessible user interface built on a solid foundation of design tokens.
--color-primary-50 - Lightest (backgrounds, highlights): #e6f3ff--color-primary-100: #b3dcff--color-primary-200: #80c4ff--color-primary-300: #4dadff--color-primary-400: #1a96ff--color-primary-500 - PRIMARY: #0078d4--color-primary-600 - Hover: #0062b0--color-primary-700: #004b8c--color-primary-800: #003568--color-primary-900 - Darkest: #001f44--color-secondary-500 - SECONDARY: #7a00ea--color-accent-coral: #ff6b5b - For calls-to-action, alerts--color-accent-teal: #2dd4bf - For success states, highlightsFull range from --color-gray-50 (#fafafa) to --color-gray-950 (#0a0a0a) for backgrounds, text, borders.
--font-size-xs (12px) - Fine print, labels--font-size-sm (14px) - Secondary text--font-size-base (16px) - Body text--font-size-lg (18px) - Large body, small headings--font-size-xl (20px)--font-size-2xl (24px)--font-size-3xl (30px)--font-size-4xl (36px)--font-size-5xl (48px) - Hero titles--font-size-6xl (60px)--font-size-7xl (72px)--font-weight-regular (400) - Body--font-weight-medium (500)--font-weight-semibold (600) - Buttons, nav--font-weight-bold (700) - Headings--font-weight-extrabold (800) - Hero titles--line-height-normal (1.5) - Body text--line-height-tight (1.25) - Headings--line-height-relaxed (1.625) - Reading content--line-height-snug (1.375) - Card content--space-0 to --space-32--radius-sm (4px)--radius-md (8px) - Standard--radius-lg (12px) - Cards, modals--radius-xl (16px)--radius-2xl (24px)--radius-full (9999px) - Avatars, pills--shadow-xs - Subtle elevation--shadow-sm - Cards, buttons hover--shadow-md - Elevated elements--shadow-lg - Hover states--shadow-xl - Modal dialogs, dropdowns--shadow-2xl - Prominent elements--transition-fast (150ms) - Micro-interactions--transition-normal (250ms) - Default--transition-slow (350ms) - Page transitions--transition-bounce (500ms) - Attention-grabbing effects--z-dropdown (100)--z-sticky (200) - Navbar--z-fixed (300)--z-modal-backdrop (400)--z-modal (500)--z-popover (600)--z-tooltip (700)Implementation: <nav class="navbar">
Implementation: <section class="hero">
Base class: .btn
Variants:
.btn--primary - Gradient background, white text, shadow.btn--secondary - Gray background, dark text, border.btn--ghost - Transparent, colored textSizes:
.btn--sm - Small.btn--btn--lg - LargeStates:
Structure:
<a href="..." class="post-card">
<div class="post-card-image-wrapper">
<img class="post-card-image" ...>
</div>
<div class="post-card-content">
<div class="post-card-header">
<span class="post-card-tag">Category</span>
<h3 class="post-card-title">Title</h3>
</div>
<p class="post-card-excerpt">Excerpt...</p>
<div class="post-card-footer">
<span class="post-card-date">Date</span>
<span class="post-card-readtime">Time</span>
</div>
</div>
</a>
Features:
Header:
Content:
Share Buttons:
Dark mode inverts colors intelligently:
Activation: Toggle button in navbar, persists in localStorage, respects system preference.
prefers-reduced-motionprefers-contrast: highloading="lazy" attributesrc/
βββ assets/
β βββ css/
β β βββ fluent2-tokens.css β Design system tokens
β β βββ style.css β Component styles & utilities
β βββ js/
β βββ theme.js β Dark mode toggle
βββ _includes/
β βββ layouts/
β βββ base.njk β Main template
β βββ post.njk β Article template
βββ pages/
β βββ blog.njk β Blog listing
β βββ about.njk β About page
β βββ ... (legal pages)
βββ _includes/
βββ post-card.njk β Reusable post card
.njk file in src/pages/ or appropriate locationlayout: base frontmattertitle, description, pageTypecomponent-name, component--modifier, component__elementtitle, date, category, excerpt, readingTime, image (optional)| Old Class | New Class |
|---|---|
fluent-body |
fluent-body (kept for transition) |
fluent-nav |
navbar |
fluent-hero |
hero |
fluent-button |
btn + btn--primary/secondary |
fluent-post-card |
post-card |
fluent-section |
section |
fluent-footer |
footer |
fluent-container |
container |
Note: Uses CSS features like color-mix() which requires modern browsers. Consider fallbacks for older browsers if needed.
This design system provides a solid foundation for a modern, accessible, and maintainable website. All components are built with consistency, scalability, and user experience in mind.
Version: 2.0 Last Updated: May 2026 Maintained By: Saheb Ansari