Design System¶
This document defines the visual design system for Forge documentation. Use these patterns to maintain consistency across all documentation pages.
π¨ Color Palette¶
Forge Brand Colors¶
#ff6b35Primary brand, active states, CTAs
#ff8a5cHover states, dark mode
#e55a2bPressed states
#434343Header, footer, dark surfaces
SAIF Brand Colors¶
#007ACCLinks, accents
#4F7E11Success, stable
#FACB47Warning, beta
#E01F22Error, deprecated
Neutral Colors¶
#323131
#747272
#9E9C9C
#DFDEDE
#F7F5F2
When to Use Each Color¶
| Color | CSS Variable | Usage |
|---|---|---|
| Forge Flame | --forge-flame |
Primary CTAs, active navigation, brand emphasis |
| SAIF Pacific | --saif-pacific |
Text links, accent elements, informational |
| SAIF Evergreen | --saif-evergreen |
Success states, stable badges, checkmarks |
| SAIF Lemon | --saif-lemon |
Warnings, beta/preview badges, caution |
| SAIF Poppy | --saif-poppy |
Errors, deprecated badges, critical notices |
| Forge Anvil | --forge-anvil |
Header, footer, dark backgrounds |
π Spacing System¶
The spacing system uses a 16px base with 8 tokens for consistent layouts.
| Token | Value | Pixels | Usage |
|---|---|---|---|
--spacing-xs |
0.25rem | 4px | Tight spacing, inline elements |
--spacing-sm |
0.5rem | 8px | Small gaps, padding |
--spacing-md |
0.75rem | 12px | Medium padding, card gaps |
--spacing-lg |
1rem | 16px | Standard padding, section spacing |
--spacing-xl |
1.5rem | 24px | Card padding, major section gaps |
--spacing-xxl |
2rem | 32px | Section margins |
--spacing-xxxl |
3rem | 48px | Large section breaks |
--spacing-xxxxl |
4rem | 64px | Page-level spacing |
π€ Typography¶
Font Families¶
| Purpose | Font | CSS Variable |
|---|---|---|
| Body text | Verdana | (SAIF digital standard) |
| Code | Roboto Mono | Monospace fallback |
Font Weights¶
| Weight | Value | Usage |
|---|---|---|
| Medium | 500 | Navigation items |
| Semi | 600 | Active navigation, emphasis |
| Bold | 700 | Headings, strong emphasis |
π§© Components¶
Version Badges¶
Use version badges to indicate release status inline.
Syntax:
<span class="version-badge new">LTS</span>
<span class="version-badge beta">Preview</span>
<span class="version-badge deprecated">Deprecated</span>
Result:
LTS Preview Deprecated
When to use:
- β Version tables to indicate LTS/STS/Preview status
- β Feature documentation to mark new or deprecated features
- β Package references to show stability
- β Don't use for emphasisβuse bold instead
Status Indicators¶
Use status indicators to show feature or component maturity.
Syntax:
<span class="status stable">Stable</span>
<span class="status preview">Preview</span>
<span class="status deprecated">Deprecated</span>
Result:
Stable Preview Deprecated
When to use:
- β Tool/feature overviews showing maturity level
- β Roadmap items indicating development stage
- β Foundry experiments to show experimental status
- β Don't use within running textβuse version badges instead
Quick Links¶
Use quick links for pill-styled navigation or resource links.
Syntax:
<div class="quick-links">
<a href="../guides/">π Guides</a>
<a href="../reference/">π§ Reference</a>
<a href="https://teams.microsoft.com/...">π¬ Teams Channel</a>
</div>
Result:
When to use:
- β Index pages for quick navigation
- β External resource collections
- β Support/contact link sections
- β Don't use for inline content linksβuse standard markdown links
Feature Cards¶
Use feature cards for homepage-style content sections.
Syntax:
<div class="feature-cards">
<div class="feature-card">
<h3>π Guides</h3>
<p>Step-by-step tutorials for building applications.</p>
</div>
</div>
When to use:
- β Landing pages with multiple navigation options
- β Overview sections highlighting key areas
- β Don't use for regular contentβuse headings and paragraphs
Custom Admonitions¶
Beyond Material for MkDocs defaults (tip, note, warning, info, etc.), we have custom admonitions:
Platform Admonition¶
For platform-specific guidance that applies across the Forge ecosystem.
!!! platform "Platform Configuration"
This setting applies to all Forge applications deployed to Azure.
Platform Configuration
This setting applies to all Forge applications deployed to Azure.
Forge Admonition¶
For Forge-specific features and capabilities.
!!! forge "Forge Feature"
This capability is unique to the Forge platform and not available in standard .NET.
Forge Feature
This capability is unique to the Forge platform and not available in standard .NET.
Security Admonition¶
For security-related notices and requirements.
!!! security "Security Requirement"
All API endpoints must implement authentication. See the security guide for details.
Security Requirement
All API endpoints must implement authentication. See the security guide for details.
π Dark Mode¶
All components automatically support dark mode through CSS custom properties. When creating custom styles:
- Use CSS variables instead of hardcoded colors
- Test in both modes before committing
- Ensure sufficient contrast (WCAG AA minimum)
Testing Checklist¶
- Text readable on light backgrounds
- Text readable on dark backgrounds
- Links distinguishable from surrounding text
- Status indicators visible in both modes
- Code blocks have sufficient contrast
βΏ Accessibility¶
Color Contrast¶
- Text on backgrounds: Minimum 4.5:1 contrast ratio (WCAG AA)
- Large text: Minimum 3:1 contrast ratio
- Non-text elements: Minimum 3:1 contrast ratio
Focus States¶
All interactive elements must have visible focus indicators. The theme provides:
- Orange outline for navigation items
- Blue outline for content links
Screen Readers¶
- Use semantic HTML elements (
<nav>,<main>,<article>) - Provide alt text for informational images
- Use ARIA labels for icon-only buttons
π File Locations¶
| File | Purpose |
|---|---|
docs/overrides/main.html |
Theme extension with CSS custom properties |
docs/assets/stylesheets/extra.css |
Component-specific styles |
mkdocs.yml |
Theme configuration |
docs/assets/icons/ |
Brand icons (SVG, PNG) |
π§ Adding New Styles¶
When adding new component styles:
- Check if existing patterns apply - Use version badges, status indicators, or admonitions first
- Use CSS variables - Reference
--forge-*,--saif-*, and--spacing-*tokens - Add to extra.css - Keep component styles separate from theme tokens
- Document the pattern - Update this page with usage examples
- Test both modes - Verify light and dark mode appearance
Example: Adding a New Component¶
/* In docs/assets/stylesheets/extra.css */
/* ==========================================================================
New Component Name
========================================================================== */
.my-component {
background: var(--md-default-bg-color);
border: 1px solid var(--md-default-fg-color--lightest);
border-radius: 8px;
padding: var(--spacing-lg);
}
.my-component:hover {
border-color: var(--forge-flame);
}
[data-md-color-scheme="slate"] .my-component {
/* Dark mode overrides if needed */
}
π Resources¶
- Material for MkDocs - Base theme documentation
- WCAG Guidelines - Accessibility reference
- CSS Custom Properties - Variable reference