Skip to main content

Style Guide

This style guide documents the design language and visual standards used across this website.

It also serves as a practical learning tool for understanding Docusaurus's theming system.

Explore the color palettes, typography, and component styles below to see how CSS custom properties and Infima design tokens create a cohesive, themeable design system.

Color Palette

The color system uses CSS variables that automatically adapt to light and dark themes. These swatches show the current theme's colors.

ColorTokenUsage
Primary
--ifm-color-primaryMain brand color, links, buttons
Primary Dark
--ifm-color-primary-darkHover states, active elements
Primary Darker
--ifm-color-primary-darkerPressed states, emphasis
Primary Darkest
--ifm-color-primary-darkestText on light backgrounds
Primary Light
--ifm-color-primary-lightSubtle highlights, borders
Primary Lighter
--ifm-color-primary-lighterLight backgrounds, subtle accents
Primary Lightest
--ifm-color-primary-lightestVery light backgrounds, disabled states
Background
--ifm-background-colorMain page background
Background Surface
--ifm-background-surface-colorCards, panels, elevated surfaces
Base Text
--ifm-font-color-basePrimary text content
Secondary Text
--ifm-font-color-secondarySupporting text, captions

Font Families

Typography system using carefully selected font families for optimal readability and visual hierarchy.

TokenUsagePreview
--ifm-font-family-headingHeadings, display text
The quick brown fox jumps over the lazy dog
--ifm-font-family-baseBody text, UI elements
The quick brown fox jumps over the lazy dog
--ifm-font-family-monospaceCode, technical content
The quick brown fox jumps over the lazy dog

Font Sizes

Typography scale using responsive font sizes that adapt to different screen sizes for optimal readability.

ValueUsagePreview
--ifm-font-size-baseBase font size for body text, paragraphs
Base - The quick brown fox jumps over the lazy dog
--ifm-h1-font-sizeMain headings, page titles
H1 Heading
--ifm-h2-font-sizeSection headings
H2 Heading
--ifm-h3-font-sizeSubsection headings
H3 Heading
--ifm-h4-font-sizeMinor headings
H4 Heading
--ifm-h5-font-sizeSmall headings
H5 Heading
--ifm-h6-font-sizeSmallest headings
H6 Heading
--ifm-code-font-sizeInline code, technical content
const example = 'code';
--ifm-font-size-listList items, secondary content
List item - The quick brown fox jumps over the lazy dog

Vertical Rhythm

Vertical rhythm creates consistent spacing and line heights throughout the design, ensuring optimal readability and visual harmony.

TokenValuePreview
--ifm-line-height-base1.65
This is an example of base line height. It provides comfortable reading with proper spacing between lines for body text and general content.
--ifm-line-height-h11.15
H1 Heading
--ifm-line-height-h21.25
H2 Heading
--ifm-line-height-h31.35
H3 Heading
--ifm-spacing-lg1.5rem
Element 1
Element 2
Element 3
--ifm-spacing-md1rem
Item
Item
Item

Components

Reusable UI components that follow the design system principles and can be used throughout the website.

ComponentDescriptionUsagePreview
AvatarBlockDisplays a person's photo, name, title, and social links in a compact card formatAuthor profiles, team member cards, contact information
John Doe
Senior Software Engineer
TagSmall labels used to categorize content or indicate statusBlog post tags, category labels, status indicators
Design SystemsDevelopment

AvatarBlock Component

The AvatarBlock component is used to display author information with social links. It's commonly used in blog posts and team pages.

Jane Smith
Design System Lead
<AvatarBlock name="Jane Smith" title="Design System Lead" link="https://example.com" image="/img/joe-professional.png" linkedin="https://linkedin.com/in/janesmith" github="https://github.com/janesmith" />

Tag Component

Tags are used to categorize content and provide visual context. They can be styled with different colors and sizes based on their importance.

Primary TagSecondary TagTertiary Tag
<span className="tag tag--primary">Primary Tag</span> <span className="tag tag--secondary">Secondary Tag</span> <span className="tag tag--tertiary">Tertiary Tag</span>