web-design-mastery
Web Design Mastery
Production-grade UI design principles from Refactoring UI by Adam Wathan & Steve Schoger.
Core Design Workflow
1. Start with a Feature, Not a Layout
- Design the actual piece of functionality first
- Don't start with navigation, sidebar, or shell
- Details come later—work in grayscale first
- Don't design too much—work in cycles
2. Establish Systems Before Designing
Define these systems up front to eliminate decision fatigue:
Spacing Scale (px):
| Token | Size | Use Case |
|---|---|---|
| 1 | 4 | Micro gaps |
| 2 | 8 | Tight, within components |
| 3 | 12 | Related elements |
| 4 | 16 | Section padding |
| 6 | 24 | Between sections |
| 8 | 32 | Major separation |
| 12 | 48 | Large gaps |
| 16 | 64 | Hero spacing |
| 24 | 96 | Maximum separation |
Type Scale (px):
| Size | Use Case |
|---|---|
| 12 | Labels, meta, fine print |
| 14 | Body text, default |
| 16 | Emphasis, subheadings |
| 18 | Section headings |
| 20 | Card titles |
| 24 | Page section titles |
| 30 | Page headings |
| 36 | Hero subheading |
| 48 | Hero heading |
| 60-72 | Display text |
Shadow Scale (5 levels):
| Level | Use Case |
|---|---|
| 1 | Buttons, subtle lift |
| 2 | Cards, inputs |
| 3 | Dropdowns, popovers |
| 4 | Sticky elements |
| 5 | Modals, dialogs |
3. Build Hierarchy, Not Decoration
- Primary: Dark color (headlines, key actions)
- Secondary: Grey (supporting text, dates)
- Tertiary: Light grey (metadata, copyright)
Key principles:
- Size isn't everything—use weight and color
- Emphasize by de-emphasizing competing elements
- Labels are a last resort—combine with values
- Semantics are secondary to hierarchy
4. Apply Depth Meaningfully
- Light comes from above
- Shadows convey elevation (closer = more attention)
- Use two-part shadows for premium look
- Consider overlapping elements for layers
5. Finish with Polish
- Supercharge defaults (bullets → icons, style quotes)
- Add accent borders for visual interest
- Design empty states as first impressions
- Use fewer borders—prefer shadows or spacing
Color System
Categories needed:
- Greys (8-10 shades): Text, backgrounds, panels, borders
- Primary (5-10 shades): Actions, active states, links
- Accents (per semantic): Success, warning, error states
Process for defining shades:
- Pick base color (500) that works as button background
- Pick edges (100 for tinted bg, 900 for text)
- Fill gaps: 700, 300 → 800, 600, 400, 200
Key rules:
- Use HSL for intuitive adjustments
- Increase saturation at lightness extremes
- Rotate hue toward bright (60°, 180°, 300°) for lighter
- Greys can be warm (yellow/orange tint) or cool (blue tint)
- Accessibility: 4.5:1 contrast for normal text, 3:1 for large
Anti-Patterns
NEVER do:
- Grey text on colored backgrounds (hand-pick colors instead)
- Fill the whole screen when content needs less
- Use grids religiously (fixed widths often better)
- Ambiguous spacing (more space between groups than within)
- Relative sizing that doesn't scale
- Scale icons beyond intended size
- Rely on color alone for meaning
Reference Files
For detailed guidance on specific topics:
| Topic | File | When to Read |
|---|---|---|
| Visual hierarchy, labels, emphasis | hierarchy.md | Balancing element importance |
| Spacing, white space, layout grids | spacing-layout.md | Layout decisions |
| Typography, fonts, line-height | typography.md | Text styling |
| HSL, shades, accessibility | color.md | Color palette creation |
| Shadows, elevation, layers | depth.md | Adding depth to UI |
| Borders, backgrounds, empty states | finishing-touches.md | Polishing design |
More from anilcancakir/my-claude-code
flutter-design
Flutter/Dart implementation patterns for Refactoring UI principles. COMPANION skill for mobile-app-design-mastery. ALWAYS activate for: Flutter theming, ThemeData, ColorScheme, TextTheme, BoxDecoration, Material 3, Flutter shadows, Flutter spacing, Flutter typography, Flutter dark mode, Flutter components, Flutter styling, Dart UI, Widget decoration. Provides ThemeData setup, color schemes, typography styles, spacing utilities, decoration patterns. Turkish: Flutter tema, Flutter renk, Flutter tasarım, Dart UI, widget stil. English: Flutter theming, Material Design, Flutter styling, widget decoration.
75tailwindcss-design
TailwindCSS implementation patterns for Refactoring UI principles. COMPANION skill for web-design-mastery. ALWAYS activate for: TailwindCSS, Tailwind classes, utility classes, Tailwind config, Tailwind components, Tailwind dark mode, Tailwind responsive, Tailwind spacing, Tailwind typography, Tailwind colors, Tailwind shadows. Provides class recipes, component patterns, dark mode implementation, responsive patterns. Turkish: Tailwind kullanımı, Tailwind class, utility CSS, Tailwind config. English: Tailwind patterns, utility-first CSS, Tailwind best practices.
56mobile-app-design-mastery
Production-grade mobile application UI design based on Refactoring UI principles. ALWAYS activate for: Flutter app, mobile app, iOS app, Android app, mobile UI, app screens, mobile navigation, bottom sheets, mobile forms, touch targets, mobile typography, app color scheme, mobile cards, list views, mobile modals, tab bars, app bars, floating action buttons. Provides mobile design workflow, touch-optimized spacing, mobile typography scale, platform-aware patterns. Turkish: mobil uygulama tasarımı, Flutter tasarım, uygulama arayüzü, mobil UI, telefon uygulaması, Android tasarım, iOS tasarım. English: app design, mobile interface, touch-friendly, native feel, mobile UX.
35laravel-api-architect
Laravel API development, REST endpoints, JSON responses, Sanctum/Passport authentication, Service-Repository pattern. ALWAYS activate when: working with routes/api.php, app/Http/Controllers/Api/, API endpoints, token authentication, mobile backend, API Resource, JsonResponse, FormRequest, Policy. Triggers on: endpoint çalışmıyor, API hatası, API error, 401 unauthorized, 403 forbidden, 422 validation, token expired, login endpoint, register API, CRUD operations, postman, fetch request, axios, mobile backend, webhook, OAuth, JWT, auth guard, rate limit, throttle, response format, pagination API.
10laravel-infrastructure
Laravel Horizon queues, Octane performance, Reverb WebSockets, Redis caching, PostgreSQL database. ALWAYS activate when: working with queue jobs, cache, sessions, broadcasting, database performance, supervisor, worker. Triggers on: job failed, queue stuck, cache not clearing, Redis connection, broadcast event, WebSocket, real-time, Horizon dashboard, Octane memory leak, slow query, N+1, database timeout, connection refused, kuyruk çalışmıyor, cache temizlenmiyor, job başarısız, worker durdu, broadcast çalışmıyor, real-time gelmiyor.
10laravel-fullstack
Laravel Blade views, Alpine.js, Vue.js integration, TailwindCSS styling, Vite assets. ALWAYS activate when: working with resources/views/, Blade components, frontend forms, UI elements, modals, dropdowns, forms. Triggers on: görünmüyor, gösterilmiyor, sayfa yüklenmiyor, sayfa açılmıyor, form çalışmıyor, form gönderilmiyor, buton çalışmıyor, button not working, style bozuk, CSS bozuk, renk yanlış, color wrong, responsive bozuk, mobile görünüm, dark mode çalışmıyor, layout bozuk, component çalışmıyor, modal açılmıyor, dropdown çalışmıyor, asset yüklenmiyor, image not loading, JS error, JavaScript hatası.
10