Design content density

From Intense-Visions/harness-engineering · View interactive version

Design content density is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > Information density as a deliberate design variable — compact, comfortable, and spacious modes, matching density to user context, and the tradeoff between showing more and showing clearly

How to use this skill

Skill file

Content Density

Information density as a deliberate design variable — compact, comfortable, and spacious modes, matching density to user context, and the tradeoff between showing more and showing clearly

When to Use

Instructions

  1. Treat density as a design variable, not a bug. Density is not "how much content you crammed in" — it is a deliberate decision about information-per-viewport. Different contexts demand different densities:

Decision procedure: Ask two questions: (1) How expert is the user? (2) How many items must be compared simultaneously? Expert users comparing many items = high density. Novice users evaluating one thing = low density.

  1. Apply Tufte's data-ink ratio. Edward Tufte's principle: maximize the share of ink (pixels) used to present data; minimize the share used for non-data decoration. This is a precision tool for density optimization:

Practical application: For any component, count the pixels devoted to actual information vs. everything else (borders, shadows, padding, backgrounds, icons). If a data table has 300px rows with 12px of actual text content, the density is wrong — either show more data or reduce the row height.

  1. Define three density modes with specific values. When building a system that serves multiple contexts, define concrete parameters for each mode:

| Parameter | Compact | Comfortable | Spacious |

| ---------------- | ------- | ----------- | ---------- |

| Table row height | 32-36px | 40-48px | 52-64px |

| Card padding | 8-12px | 16-24px | 24-32px |

| List item height | 28-32px | 36-44px | 48-56px |

| Body font size | 13-14px | 14-16px | 16-18px |

| Line-height | 1.3-1.4 | 1.5-1.6 | 1.6-1.8 |

| Section padding | 24-32px | 40-64px | 80-128px |

| Items visible | 15-25 | 8-15 | 3-8 |

| Scroll required | Rarely | Sometimes | Frequently |

Gmail implements all three: Compact (row height 28px, ~25 emails visible), Comfortable (row height 40px, ~15 emails visible), Spacious (row height 52px, ~10 emails visible). The user chooses based on their workflow.

  1. Match density to page purpose. Within a single product, different pages serve different purposes and should have different densities:
  1. Implement progressive density. Show less at first, reveal more on demand. This respects both the scanner (who needs overview) and the reader (who needs detail):
  1. Adjust density for responsive viewports. Smaller screens require density recalibration:

Details

The Density Spectrum in Practice

Real products mapped to the density spectrum:

| Product | Density | Row/Item Height | Items per Screen | Data-Ink Ratio |

| ------------------- | ------- | --------------- | ---------------- | -------------- |

| Bloomberg Terminal | Extreme | 18-22px | 40-60 | 0.85+ |

| VS Code | High | 22px | 40-55 | 0.75 |

| Gmail (compact) | High | 28px | 20-25 | 0.60 |

| GitHub Issues | Medium+ | 36px | 12-18 | 0.55 |

| Stripe Dashboard | Medium | 48px | 8-12 | 0.50 |

| Gmail (comfortable) | Medium | 40px | 12-15 | 0.50 |

| Notion | Medium- | 44px | 10-14 | 0.45 |

| Gmail (spacious) | Low+ | 52px | 8-10 | 0.40 |

| Vercel Homepage | Low | N/A (sections) | 1-2 ideas | 0.25 |

| Apple Product Page | Minimal | N/A (sections) | 1 idea | 0.15 |

Density Controls: Implementation Pattern

When offering user-selectable density, implement it as a single CSS custom property cascade:

Anti-Patterns

  1. One density for all contexts. Using marketing-page spacing on a data table (massive padding, spacious rows) wastes the screen — a table that should show 20 rows shows 5, forcing excessive scrolling. Conversely, using data-table density on a landing page creates information overload where the user expects a calm, guided experience. Stripe uses spacious density on its marketing site and compact-to-comfortable density on its dashboard — same brand, different contexts.
  1. Density without hierarchy. Cramming content into a small space without establishing visual priority creates a wall of text. High density does not mean "everything the same size and weight" — it means more information with clear hierarchy. Bloomberg Terminal is extremely dense but uses color coding, bold text, borders, and spatial grouping to maintain scannability. Without these hierarchy tools, density becomes chaos.
  1. User-hostile density. Defaulting to compact density with no option to increase spacing. Not all users are power users — new users, users with visual impairments, and users on touch devices need more space. Gmail defaults to "comfortable" and offers compact/spacious as options. Material Design 3 specifies that compact density should never be the default — it is an opt-in for experienced users.
  1. Ignoring the scroll cost. Spacious density means more scrolling. For data comparison tasks, scrolling is expensive — the user loses context of items above the fold. A data table with 64px rows showing 5 items per screen forces constant scrolling to compare 20 items. For this context, 32px rows showing 15+ items reduces scroll cost by 60% and improves comparison efficiency.
  1. Responsive density mismatch. Keeping desktop density on mobile. A comfortable-density dashboard (48px rows) on a 667px-tall mobile screen shows only 8-9 rows after accounting for navigation and header. Switching to compact (36px rows) shows 12-13 rows — a 40% increase in visible data that materially improves the mobile experience.

Real-World Examples

Bloomberg Terminal (Expert Density):

Stripe Dashboard (Balanced Density):

Apple Product Pages (Minimal Density):

Source

Process

  1. Classify the page purpose (data, overview, detail, marketing, onboarding) to determine the target density zone
  2. Define concrete density parameters (row height, padding, font size, items per screen) from the density table
  3. Validate by counting visible items per screen and measuring the data-ink ratio — adjust if the numbers fall outside the target zone

Harness Integration

This is a knowledge skill. When activated, its content is injected into the system prompt to guide density decisions. It does not execute code or modify files. Use alongside design-whitespace for spacing scale definition, design-readability for typography density interaction, and design-responsive-strategy for viewport-specific density adaptation.

Success Criteria

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.