DESIGN.md · Analysis
CodePen Editor UI
es-d-30801683120260715-019f5bbc-79bf-72dd-a936-cb8c6b1cd3a4.codepen.dev · 13 Jul 2026 · 47 colors · Lato, 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, sans-serif, Lato, 'Lato Fallback', 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, sans-serif
CodePen Editor UI
A developer-focused code editor interface combining dark-mode productivity with vibrant accent colors for CTAs and status indicators. The design prioritizes clarity, accessibility, and rapid interaction patterns.
Colors
Typography
- display
- fontFamily: Lato, 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, sans-serif · fontSize: 56px · fontWeight: 900 · lineHeight: 64px · letterSpacing: -0.02em
- headline-lg
- fontFamily: Lato, 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, sans-serif · fontSize: 32px · fontWeight: 700 · lineHeight: 40px · letterSpacing: -0.01em
- headline-md
- fontFamily: Lato, 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, sans-serif · fontSize: 24px · fontWeight: 700 · lineHeight: 32px
- title-lg
- fontFamily: Lato, 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, sans-serif · fontSize: 18px · fontWeight: 600 · lineHeight: 28px
- body-lg
- fontFamily: Lato, 'Lato Fallback', 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, sans-serif · fontSize: 16px · fontWeight: 400 · lineHeight: 24px
- body-md
- fontFamily: Lato, 'Lato Fallback', 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, sans-serif · fontSize: 15px · fontWeight: 400 · lineHeight: 22px
- label-md
- fontFamily: Lato, 'Lato Fallback', 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, sans-serif · fontSize: 14px · fontWeight: 600 · lineHeight: 20px · letterSpacing: 0.01em
- label-sm
- fontFamily: Lato, 'Lato Fallback', 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, sans-serif · fontSize: 12px · fontWeight: 500 · lineHeight: 16px
Design guidance
Overview
CodePen Editor UI is a developer-centric interface system built on the principle of 'Productive Minimalism'—a design philosophy that strips away visual noise while maintaining vibrant, purposeful accent colors for critical interactions. The system serves professional developers and code educators who demand rapid context-switching, clear file hierarchies, and instant visual feedback on code execution. The aesthetic combines a deep charcoal canvas (rgb(0, 0, 0)) with a signature emerald green primary (rgb(71, 207, 115)) that signals actionable CTAs, success states, and brand identity. The interface evokes precision, speed, and creative control—every pixel serves a function. Voice: direct, technical, encouraging without being patronizing. Example: 'Save your pen and share it with the community.'
Colors
The color system prioritizes contrast and accessibility within a dark-mode-first paradigm. Primary (rgb(71, 207, 115), #47cf73) is the brand's signature accent, applied exclusively to affirmative CTAs ('Sign Up', 'Save'), success indicators, and focus states. It achieves WCAG AAA contrast (7.2:1) against the black surface. Secondary (rgb(26, 115, 232), #1a73e8) supports informational elements, links, and learning-focused CTAs ('Learn More'). Tertiary (rgb(255, 60, 65), #ff3c41) signals destructive actions, warnings, and errors. The surface stack progresses from pure black (#000000) at the base through increasingly lighter grays (#0a0a0a, #131313, #282828) to create depth without abandoning the dark aesthetic. On-surface text is pure white (rgb(255, 255, 255)) for maximum legibility at 15px
Typography
The type system employs Lato as the primary typeface—a humanist sans-serif that balances technical clarity with approachability. Display (56px, weight 900) anchors page titles and hero sections with aggressive letter-spacing (-0.02em) to command attention. Headline-lg (32px, weight 700) structures major sections; headline-md (24px, weight 700) organizes subsections. Title-lg (18px, weight 600) labels UI regions like 'Files' and 'Controls'. Body-lg (16px) and body-md (15px, weight 400) handle descriptive copy and file listings, with line-height set to 1.5 (24px) for comfortable reading in code contexts. Label-md (14px, weight 600) and label-sm (12px, weight 500) apply to buttons, badges, and form labels. All text over busy backgrounds (e.g., code editor panes) receives a subtle text-shadow:
Layout
The layout operates on a 12-column grid with a max-width of 1280px, accommodating split-pane editor layouts (code on left, preview on right) and full-width content areas. The gutter spacing is 16px, with section separation using lg spacing (40px) for major content blocks. The left sidebar (Files panel) occupies ~240px fixed width; the main editor area flexes to fill remaining space. Container padding follows the md spacing token (24px) for cards and modals, with sm spacing (12px) for internal list items. White-space is deliberately generous—no element crowds another by less than 12px—to reduce cognitive friction when scanning file trees or reading code. The header bar (height: 56px) anchors navigation and CTAs at the top with 9px internal padding, creating visual separation from the editor
Elevation & Depth
Depth is conveyed through a restrained shadow system that respects the dark theme without introducing visual clutter. Level 1 (Base): the surface itself, no shadow. Level 2 (Cards, Dropdowns): box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05)—a soft, spread shadow that lifts elements 8-12px above the canvas. Level 3 (Modals, Toasts): box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15)—a tighter, more dramatic shadow for elements demanding focus. All shadows use black with low opacity (0.05–0.15) to avoid harsh contrast. Hover states on cards transition to Level 3 shadows over 200m
Shapes
The shape philosophy is 'Functional Geometry'—rounded corners are applied conservatively and purposefully. Buttons use border-radius: 4px (0.25rem) for a subtle, professional appearance that avoids the 'bubbly' aesthetic. Cards and input fields use 8px (0.5rem) for slightly more breathing room, signaling containment without softness. Modals and dropdowns use 12px (0.75rem) to emphasize their elevated status. Badges and pills use border-radius: 9999px (full) to create a distinct visual category for status indicators and tags. The rationale: sharp corners (4px) on buttons reinforce precision and
Components
Action Elements Buttons are the primary interaction mechanism. button-primary (height: 40px, padding: 10px 16px, border-radius: 4px) uses the signature emerald green background with black text (contrast 7.2:1). On hover, the background transitions to the darker primary-container (rgb(45, 157, 82)) over 150ms, maintaining the same text color. button-secondary uses the surface-container-highest background with a 1px outline-variant border, creating a 'hollow' appearance. button-ghost has a transparent background and on-surface-variant text; on hover, it gains a 8% white overlay (rgba(255, 255, 255, 0.08)) and transitions text to pure white. All buttons use label-md typography (14px, weight 600) and support a disabled state with reduced opacity (0.5) and cursor: not-allowed.
Containe
Do's and Don'ts
**Do**
- Do use primary (rgb(71, 207, 115)) exclusively for affirmative, forward-moving actions—'Save', 'Sign Up', 'Create'—to build consistent mental models.
- Do apply elevation.md shadows to cards and dropdowns; reserve elevation.lg for modals and overlays to maintain a clear hierarchy.
- Do set all interactive elements to height: 40px minimum (including padding) to meet touch-target accessibility standards (44px recommended, but 40px acceptable for desktop).
- Do use label-md (14px, weight 600) for all button text and form labels; never deviate to body-md for CTAs, as it dilutes visual priority.
- Do transition all hover/focus states over 150–200ms using cubic-bezier(0.4, 0, 0.2, 1) to signal responsiveness without feeling sluggish.
**Don't**
- Don't apply primary color to neutral UI elements (dividers, borders, backgrounds) or secondary CTAs—it dilutes brand signal and confuses user intent.
- Don't use border-radius values outside the defined scale (sm, DEFAULT, md, lg, xl, full); custom radii fragment the visual language.
- Don't set text smaller than 12px (label-sm) in the UI; CodePen users often work on smaller screens, and 12px is the accessibility floor.
- Don't layer more than two shadows (e.g., elevation.md + custom glow); excessive shadows create visual noise and obscure the dark-mode aesthetic.
- Don't use opacity < 0.5 for disabled states; instead, use a desaturated color (e.g., outline-variant text on surface-container-low background) to maintain contrast.
Edit, then copy or download.