ajeetchaulagain.com

Design System

The visual language of this site — a living reference for colors, typography, spacing, breakpoints, and components.

ColorsTypographySpacingBreakpointsComponentsStyling Guide
01

Brand Colors

Four source-of-truth values per theme in src/components/theme/brand.ts. Edit only these to shift the entire site's look.

Light theme

#81A6C6
base#81A6C6Hero / header / footer bg
#3B6E9A
accent#3B6E9ALinks, accents, nav hover
#0f2035
heroText#0f2035Headings on brand bg
#2a4a68
heroParagraph#2a4a68Body on brand bg

Dark theme

#1f1f1f
base#1f1f1fHero / header / footer bg
#81A6C6
accent#81A6C6Links, hovers, borders
#e7e7e7
heroText#e7e7e7Headings on brand bg
#C8C8C8
heroParagraph#C8C8C8Body on brand bg
02

Color Tokens

All theme.colors tokens derived from brand values. Access via ${({ theme }) => theme.colors.tokenName}.

Light theme

Backgrounds

#ffffff
primaryBackground#ffffffPage background
#faf8f2
secondaryBackground#faf8f2Section / card fill
#f3f6f9
tertiaryBackground#f3f6f9Code title bar
#e7e7e7
quaternaryBackground#e7e7e7Hover states

Text

#333333
primaryText#333333Body text
#555555
tocText#555555Muted / secondary text
#222831
heroText#222831Heading on hero
#222831
heroParagraph#222831Body on hero

Brand & Accents

#908f19
brandPrimary#908f19Links, primary CTA
#EFD2B0
heroBackground#EFD2B0Hero area background
#e6ffec
codeHighlightBackground#e6ffecHighlighted line fill
#65be65
codeHighlightBorderColor#65be65Highlight left border

Borders

#e7e7e7
primaryBorder#e7e7e7Default border
#e7e7e7
cardBorder#e7e7e7Card / code block border
#EFD2B0
secondaryBorder#EFD2B0Accent border

Dark theme

Backgrounds

#181818
primaryBackground#181818Page background
#1f1f1f
secondaryBackground#1f1f1fSection / card fill
#1f1f1f
tertiaryBackground#1f1f1fCode title bar
#333333
quaternaryBackground#333333Hover states

Text

#e7e7e7
primaryText#e7e7e7Body text
#aaaaaa
tocText#aaaaaaMuted / secondary text
#e7e7e7
heroText#e7e7e7Heading on hero
#C8C8C8
heroParagraph#C8C8C8Body on hero

Brand & Accents

#81A6C6
brandPrimary#81A6C6Links, primary CTA
#333333
heroBackground#333333Hero area background
#1d3526
codeHighlightBackground#1d3526Highlighted line fill
#316531
codeHighlightBorderColor#316531Highlight left border

Borders

#181818
primaryBorder#181818Default border
#2c2c2c
cardBorder#2c2c2cCard / code block border
#1f1f1f
secondaryBorder#1f1f1fAccent border
03

Typography

Three typefaces — Domine (serif) for primary headings, Roboto for secondary headings, Source Sans Pro for body text, and Fira Code for monospace.

Heading scale — Serif (Domine)

The craft of clear thinking

xlarge · 2.1rem
weight 900

Engineering simplicity

large · 1.8rem
weight 600

Notes from the stack

medium · 1.5rem
weight 600

Shipping ideas, one commit at a time

small · 1.2rem
weight 500

Heading scale — Sans-serif (Roboto)

The craft of clear thinking

xlarge · 2.1rem
weight 600

Engineering simplicity

large · 1.8rem
weight 600

Notes from the stack

medium · 1.5rem
weight 600

Body text (Source Sans Pro)

The quick brown fox jumps over the lazy dog. Body text uses Source Sans Pro at 1.125rem (xmedium) with a line height of 1.8 for comfortable reading on long-form content. Paragraphs carry a bottom margin of 1.5rem.

Font size scale

The quick brown foxxsmall · 0.975rem
The quick brown foxsmall · 1.05rem
The quick brown foxxmedium · 1.125rem
The quick brown foxmedium · 1.2rem
The quick brown foxlarge · 1.3rem
The quick brown foxxlarge · 1.4rem
04

Spacing

Spacing utilities from styled-components-spacing. Use mt(n), mb(n), p(n), px(n) etc. with keys 0–10.

00
10.25rem
20.5rem
30.75rem
41rem
51.5rem
62rem
72.5rem
83rem
94rem
105rem
05

Breakpoints

All breakpoints available via styled-components-breakpoint. Use breakpoint('lg') for min-width or breakpoint('xs', 'lg') for a range.

NamepxNotes
xs0Mobile — default
xsm370Small mobile
sm480
md640Tablet start
lg800Tablet end / desktop start
xl992Content becomes card (62rem wide)
xxl1120Content widens to 70rem
xxxl1200Large desktop
06

Components

Props: variant (text · contained · outlined) · color (primary · secondary) · size (small · medium · large)

Tag

Props: type (light · dark) · size (small · medium)

type="light"

javascripttypescriptreactmedium size

type="dark"

javascripttypescriptreactmedium size
07

Styling Guide

Quick-reference patterns for working with the design system in this codebase.

Accessing theme tokens

import styled from 'styled-components';

const Card = styled.div`
  color: ${({ theme }) => theme.colors.primaryText};
  font-size: ${({ theme }) => theme.fontSizes.medium};
  font-family: ${({ theme }) => theme.fonts.body};
  border-radius: ${({ theme }) => theme.borderRadius.base};
  font-weight: ${({ theme }) => theme.fontWeights[5]}; // 500
  border: ${({ theme }) => theme.borders.thin}
    ${({ theme }) => theme.colors.cardBorder};
`;

Spacing utilities

import { mt, mb, p, px, py, mr, ml } from 'styled-components-spacing';

const Section = styled.div`
  ${p(5)};      // padding: 1.5rem (all sides)
  ${px(4)};     // padding-left + padding-right: 1rem
  ${mt(6)};     // margin-top: 2rem
  ${mb(3)};     // margin-bottom: 0.75rem
`;

Responsive breakpoints

import breakpoint from 'styled-components-breakpoint';

const Box = styled.div`
  font-size: 1rem;

  // min-width: 800px and above
  ${breakpoint('lg')`
    font-size: 1.25rem;
  `}

  // between xs (0) and lg (800px)
  ${breakpoint('xs', 'lg')`
    padding: 1rem;
  `}
`;

Conditional theming

const El = styled.div`
  color: ${({ theme }) =>
    theme.name === 'lightTheme'
      ? theme.colors.secondaryText
      : theme.colors.primaryText};
`;

© 2020–2026 Ajeet Chaulagain · Design System →