Jonas Web Design & Advanced CSS Skill
This skill translates Jonas Schmedtmann's complete frontend curriculum (Web Design Rules & Guidelines, Build Responsive Real-World Websites with HTML & CSS, and Advanced CSS and Sass) into a systematic, repeatable workflow for building polished, conversion-focused, and responsive web interfaces.
Core Philosophy: Good web design is not subjective guesswork. It is a rigorous system built on 7 Website Personalities (plus trait mixing) applied consistently across 10 Design Ingredients, engineered with Responsive Units (
62.5%rem), Flexbox + CSS Grid, and Component-Driven Architecture.
🚦 Phase 1: Mandatory Style Alignment (带 Agent 建议的风格对齐)
CRITICAL RULE: At the very beginning of any new webpage or UI design task — before writing implementation code (unless the user explicitly says "直接写代码/跳过确认") — you MUST first align on the visual style with the user and provide a proactive Agent Recommendation.
Step 1.1: Rapid Context Analysis (Define & Plan)
Silently infer from the user's request:
- WHO & WHAT: Industry, target audience, business goal (e.g., conversion, brand prestige, information clarity), and user goal.
- Vibe Needed: Which of the 7 Website Personalities best serves this goal, and whether a Secondary Personality (混搭副风格) should be injected (80% Primary + 20% Secondary).
Step 1.2: Present Your Agent Recommendation + Options
Present a structured, concise Style Alignment Proposal (or use the ask_question tool if available alongside a brief visual recipe preview):
- 🎯 Agent 专属推荐方案 (Recommended Direction):
- 主风格 (Primary Personality) + 混搭副风格 (Secondary Trait Injection) (e.g., Startup/Upbeat 创业活力 + Calm/Peaceful 温和关怀).
- 推荐理由 (Why it fits): 1–2 sentences linking the product's business/user goals to this personality pairing.
- 视觉配方预览 (Visual Recipe Preview):
- Typography (字体与字号): Recommended heading & body font pairing + headline scale (
52px+bold vs. light serif). - Color Palette (色彩系统): Main color + Accent color + Tint background + Dark-grey text (with concrete Hex values, never pure
#000). - Shape & Depth (圆角与阴影): Border-radius (
0pxsharp vs.9px–12pxfriendly vs.16px+playful) & Shadow strategy (nonevs.Flat Design 2.0 subtle elevationvs.colored glow). - Layout & Hero Pattern (核心布局与首屏): e.g., Split 2-column Hero + Featured-in strip + Z-pattern steps + 3-col cards + Highlighted pricing tier.
- Typography (字体与字号): Recommended heading & body font pairing + headline scale (
- 🎨 备选风格方向 (2 Contrasting Alternatives): Offer 2 distinct alternative personalities from the 7 Personalities table below (e.g., Option B: Minimalist/Simple + Bold/Confident, Option C: Serious/Elegant) so the user can easily compare and choose.
- Wait for User Confirmation: Ask the user to confirm the recommended recipe, pick Option B/C, or tweak any ingredient (colors, dark/light mode, roundness). Once confirmed, immediately proceed to Phase 2 & Phase 3.
🎭 The 7 Website Personalities Matrix
Every design ingredient must adapt to the chosen Website Personality. (For full CSS :root presets and hybrid mixing rules, read references/personalities-and-tokens.md).
| # | Personality | Typical Industries | Typography | Color System | Images & Icons | Shadows & Radius | Layout Tendencies |
|---|---|---|---|---|---|---|---|
| 01 | Serious / Elegant(严肃/优雅) | Luxury, real estate (Nexter), high fashion, jewelry, boutique hotels | Thin/light Serif headings (Playfair Display, Cormorant), small body (16px) | Gold (#c69963), champagne/pastel creams (#f9f7f6), deep navy (#101d2c), charcoal | Big, high-res product/space photos; no icons or ultra-thin line icons | No shadows (none)No radius (0px) | Creative, asymmetric, overlapping CSS Grid, magazine layouts |
| 02 | Minimalist / Simple(极简/纯粹) | Portfolios, design studios, minimalist fashion, developer docs | Boxy/clean Sans-Serif (Inter, Work Sans), small/medium text | Monochrome (#222/#333 on pure #fff), max 1 restrained color | Few curated photos to add color; no illustrations; minimal/no icons | No shadows (none)No radius (0px) | Simple, narrow 1-column or clean Swiss grid with hairline borders |
| 03 | Plain / Neutral(平实/中性) | Enterprise B2B, finance, established corporations, data portals | Neutral Sans-Serif (Inter, Roboto), small compact text (14–16px) | Safe corporate blues (#1d4ed8), slate greys (#334155), nothing flashy | Small-to-medium functional photos; simple labeled UI icons | No shadowsNo radius (0–4px) | Structured, condensed rows, boxes, sidebars, F-pattern, tables |
| 04 | Bold / Confident(大胆/自信) | Digital agencies, adventure travel (Natours), sports, strong tech | Boxy Sans-Serif (Montserrat, Lato), huge bold uppercase (52–98px, 700+) | Multiple bright saturated colors; big full-bleed color-block sections | Lots of large, high-impact photos or background video; few/no icons | Usually no shadowsUsually 0px radius | Diagonal clip-path/skewed sections, big color blocks, bold grids |
| 05 | Calm / Peaceful(平静/温和) | Healthcare, wellness, nutrition (Omnifood), skincare, eco brands | Soft Serif headings (Lora, Merriweather) or warm rounded Sans (Rubik) | Pastel/earth-washed tones: warm cream (#fdf2e9), terracotta, sage, soft blue | Warm human photos & color-matched illustrations; frequent icons in tinted circles | Sparse/soft shadowsModerate radius (8–12px) | Balanced Z-patterns, generous whitespace (96–128px), warm sections |
| 06 | Startup / Upbeat(创业/活力) | SaaS, AI products, modern apps (Trillo), fintech, productivity | 1 clean Sans-Serif (Inter, Rubik, Plus Jakarta Sans), medium headings | Blues, greens, indigos, purples; light-grey/tinted backgrounds + subtle gradients | 3D/vector illustrations, app UI mockups, subtle shapes; very frequent icons | Subtle shadows + glowsCommon radius (9–16px) | Rows of cards, Z-patterns, logo strips, pricing tables, 200–400ms motion |
| 07 | Playful / Fun(活泼/趣味) | Kids/pet products, food & drink, creative communities, casual games | Round/creative Sans-Serif (Rubik, Quicksand), centered text common | Multi-color vibrant palettes across backgrounds, cards, and text | Hand-drawn or 3D illustrations, geometric patterns; hand-drawn/duotone icons | Subtle or offset shadowsHigh radius (16px–pill) | Collage grids, bouncy hover interactions, fun conversational copy |
💡 Pro Tip — Trait Injection (风格混搭): Combine 1 Primary Personality with 1 Secondary Personality to create distinctive, non-generic designs:
- Startup/Upbeat + Calm/Peaceful (e.g., Omnifood: SaaS conversion structure + warm
#fdf2e9cream backgrounds &#e67e22orange).- Startup/Upbeat + Bold/Confident (Modern SaaS cards + oversized
74pxboxy typography & dark high-contrast sections).- Minimalist/Simple + Bold/Confident (Monochrome clean grid + gigantic typography & stark color blocks).
📐 Phase 2: Apply the 10 Design Ingredients & Quantified Scales
Never guess font sizes, margins, or colors. Enforce Jonas's exact numerical scales via CSS Custom Properties (:root). For all 86 rules across the 10 ingredients, consult references/ten-design-ingredients.md.
1. The Strict Type Scale & Spacing System
Set html { font-size: 62.5%; } (1rem = 10px) and restrict all font sizes and spacing values to these two pre-defined scales:
- Font Size Scale (
px):10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98 - Spacing Scale (
px):2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
2. Core Rules Checklist Across the 10 Ingredients
- Typography:
- Use 1 typeface (or max 2: Serif heading + Sans body) from curated families (
Inter,Rubik,Work Sans,Montserrat,Lato,Playfair Display,Merriweather,Lora). - Body text:
16px–20px(20px–24pxfor long articles), weight>= 400,line-height: 1.5–2.0, line length< 75ch(65ch–72chideal). - Headlines:
44px–86px+, weight600–700, tightline-height: 1.05–1.2, negativeletter-spacing: -0.5pxto-1.5px. - Eyebrow sub-headings: Small (
12px–16px), bold (600–700),UPPERCASE, trackedletter-spacing: 0.75px–2px, primary shade color. - Never justify text (
text-align: justify) and never center long text blocks (> 3 lines).
- Use 1 typeface (or max 2: Serif heading + Sans body) from curated families (
- Colors:
- Build a system of Main Color + Grey Scale + optional Accent Color, and generate Tints (mixed with
#ffffor section/icon backgrounds) and Shades (mixed with#000for hover states & dark headings). - Never use pure
#000000for text — use softened dark grey (#333,#444,#555). - On dark colored backgrounds, use a light tint of that background color for body text.
- Maintain WCAG contrast:
>= 4.5:1for normal text,>= 3.0:1for large text (18px+).
- Build a system of Main Color + Grey Scale + optional Accent Color, and generate Tints (mixed with
- Images & Illustrations:
- Show real people to trigger emotion; ensure side-by-side images share identical dimensions (
aspect-ratio+object-fit: cover). - Text on Images: Always use one of Jonas's 3 methods: (1) Darken/brighten with
linear-gradient(rgba(0,0,0,0.6), ...)overlay, (2) Place text in a neutral image area, or (3) Put text inside a tinted/blurred box.
- Show real people to trigger emotion; ensure side-by-side images share identical dimensions (
- Icons:
- Use one single SVG icon pack (Phosphor, Ionicons, Lucide, Heroicons). Never mix packs or use
.png/.jpg. - Never scale raw icons past
24px–32px; if a larger feature anchor (48px–64px) is needed, enclose the24px–32pxicon inside a tinted circle/square (background: var(--color-primary-tint-1); padding: 1.6rem; border-radius: 50%).
- Use one single SVG icon pack (Phosphor, Ionicons, Lucide, Heroicons). Never mix packs or use
- Shadows & 6. Border-Radius:
- Keep shadows light (
rgba(0,0,0,0.05)to0.12) and sparse. Scale shadow blur with elevation (small for cards, large for floating modals). - Change shadow +
translateY(-2px)on:hoverand reduce on:active. Matchborder-radiusto typeface roundness and personality.
- Keep shadows light (
- Whitespace (Law of Proximity 亲密性原则):
- Use massive whitespace between sections (
80px–128px, e.g.,padding: 9.6rem 0) and element groups (48px–96px). - Elements that belong together must be closer together (e.g., heading closer to its body paragraph than the element above; form label closer to its input than the previous field). Prefer whitespace over divider lines.
- Use massive whitespace between sections (
- Visual Hierarchy:
- Place high-priority content and CTAs near the top.
- Combine size, weight, color, and spacing: de-emphasize secondary labels/metadata (
#767676,14px) so titles and key data points (prices, metrics) pop. - De-emphasize Component B to emphasize Component A (e.g., pair
.btn--fullprimary CTA with.btn--outlinesecondary button; highlight 1 "Best Value" pricing card with a tinted background/ribbon while keeping the other tier plain white with a subtle border).
- User Experience (UX):
- Use familiar layout patterns; write descriptive, benefit-driven CTA copy (e.g., "Start eating well" instead of "Submit").
- Keep animations fast and purposeful (
200ms–500ms). Reserve blue/underlined text strictly for links. - Break up long copy with subheadings, blockquotes, feature boxes, and icon bullet lists.
- Components & Layout Assembly:
- Assemble pages from Atomic Elements → UI Components → Section Components → Layout Patterns (Row of cards, Grid of cards, Z-Pattern, F-Pattern, Single-column, Sidebar, Magazine, Asymmetric overlap).
🏗️ Phase 3: 7-Step Execution & Advanced CSS Engineering
Follow Jonas's 7 Steps to a Great Website and Think – Build – Architect engineering standards (detailed patterns in references/css-architecture-and-layouts.md):
- Define & Plan Sections: Map out the narrative flow before coding (e.g., Sticky Nav → Hero Split with Social Proof → Featured-In Logo Strip → How It Works Z-Pattern with
01/02/03large numbers → Feature/Product Cards with Tags → Testimonials + Photo Gallery Grid → Pricing Comparison + Feature Icons → High-Contrast Split CTA Form → Multi-Column Footer). - Semantic HTML5 + Flat BEM Naming:
- Use
<header>,<nav>,<main>,<section class="section-...">,<article>,<figure>,<footer>. - Use clean BEM classes (
.meal__content,.btn--full,.pricing-plan--complete) and reusable layout primitives (.container,.grid,.grid--2-cols,.grid--3-cols,.grid--4-cols,.grid--center-v).
- Use
- Combine Flexbox (1D) & CSS Grid (2D):
- Use Flexbox for 1D component internals (navbars, button rows, icon+label lists, vertical card stacks).
- Use CSS Grid for 2D page & section layouts, asymmetric overlapping media (
grid-row/grid-columnspans), and auto-responsive card grids (repeat(auto-fit, minmax(25rem, 1fr))).
- Responsive Scaling & Breakpoints:
- Scale the entire design effortlessly by stepping down root
htmlfont-size at breakpoints where the layout breaks (62.5%→56.25%at1200px→50%at944px), and collapsing multi-column grids to2then1column on mobile (<= 544px).
- Scale the entire design effortlessly by stepping down root
📚 Bundled Reference Guides
Load these reference files when you need concrete CSS snippets, token presets, or deep-dive rules:
references/personalities-and-tokens.md: Full breakdown of the 7 Website Personalities, Trait Injection mixing table, and copy-pasteable:rootCSS Custom Property presets (Omnifood, Nexter, Natours, Modern SaaS).references/ten-design-ingredients.md: Complete 86 rules across all 10 Web Design Ingredients + full catalog of 5 Atomic Elements, 18 UI Components, 5 Section Components, and 8 Layout Patterns.references/css-architecture-and-layouts.md: BEM & 7-1 CSS architecture,62.5%remgrid boilerplate, Flexbox vs. CSS Grid patterns, breakpoint strategy, and signature CSS effects (desaturated press logos,::afterribbons,105degsolid-color gradients,:placeholder-shownfloating labels, gallery hover zoom).