Phase 5: Design System Consolidation & Polish
Objective: Achieve 100% branding consistency, improve UI/UX, and establish reusable patterns
๐ Phase Overview
Duration: 2-3 sprints (estimated 10 hours)
Priority: Medium-High (improves maintainability and user experience)
Dependencies: Phases 1-4 complete โ
Success Definition
- โ All pages use centralized SCSS variables (no local redefinitions)
- โ Consistent hover/focus/active states across all interactive elements
- โ Animation system unified with standard durations
- โ Design tokens documented for future reference
- โ Component patterns established and reusable
- โ WCAG AA accessibility compliance on all interactive elements
๐ง Work Breakdown
Task 1: Refactor Projects Page SCSS (Priority: ๐ด CRITICAL)
Effort: 1.5 hours | Impact: HIGH
Current Issues:
// โ WRONG - Custom color redefinition
$color1: #1E293B; // Duplicates $primary
$color2: #E0F2FE; // Custom, should use rgba($primary, $opacity-10)
$color3: #8B5CF6; // Duplicates $ai-accent
$color5: #10B981; // Duplicates $energy-accent
// โ WRONG - Hard-coded values
background: #f6f9fc;
color: #525f7f;
padding: $spacing 1.2rem; // Mixing custom + implicit
border-top: 1px solid #eee; // Should be $border-color-lightRequired Changes:
Remove custom color variables, replace with:
// Replace $color1 with $primary // Replace $color2 with rgba($primary, $opacity-10) // Replace $color3 with $ai-accent // Replace $color5 with $energy-accentReplace hard-coded values:
background: #f6f9fc; โ background: $gray-100; color: #525f7f; โ color: $gray-700; padding: $spacing 1.2rem; โ padding: $spacer-3 $spacer-4; border-top: 1px solid #eee; โ border-top: $border-width-1 solid $border-color-light; font-size: 1.1rem; โ font-size: $font-size-lg; font-weight: 600; โ font-weight: $font-weight-semibold; margin-bottom: 0.5rem; โ margin-bottom: $spacer-2;Replace custom spacing values:
$spacing: 16px โ Remove variable, use $spacer-3 or $spacer-4 margin: 1.5rem 0 โ margin: $spacer-5 0; padding: 0 $spacing โ padding: 0 $spacer-3;Update animation timing:
// Replace hard-coded durations with new variables animation: fadeInUp 0.6s ease-out forwards; โ Use $animation-duration-base animation: fillTop 2s forwards 4s ease-in-out; โ Use $animation-duration-slowUse breakpoint variables:
@media (max-width: 786px) โ @media (max-width: $breakpoint-lg) @media (min-width: 1024px) โ @media (min-width: $breakpoint-lg)
Checklist:
Task 3: Create State Color & Shadow Tokens (Priority: ๐ก MEDIUM)
Effort: 1.5 hours | Impact: MEDIUM
Update assets/scss/_defaults.scss
Add after opacity levels section:
// =====================================================
// STATE COLOR SYSTEM
// =====================================================
// Hover States
$color-hover-light: rgba($primary, $opacity-10) !default;
$color-hover-dark: darken($primary, 10%) !default;
// Active States
$color-active: darken($primary, 15%) !default;
// Disabled States
$color-disabled: $gray-400 !default;
$color-disabled-bg: $gray-100 !default;
// Focus/Ring States
$color-focus-ring: rgba($primary, $opacity-30) !default;
$focus-ring-width: 2px !default;
$focus-ring-style: 2px solid $color-focus-ring !default;
// =====================================================
// SHADOW SYSTEM
// =====================================================
// Base Shadows (for depth/elevation)
$shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05) !default;
$shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !default;
$shadow-base: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06) !default;
$shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !default;
$shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !default;
$shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !default;
// Hover Shadows (elevate on hover)
$shadow-hover: $shadow-md !default;
$shadow-hover-lg: $shadow-lg !default;
// Interactive Shadow Transitions
$shadow-transition: box-shadow $animation-duration-base $animation-timing-ease-in-out !default;
// =====================================================
// TRANSFORM SYSTEM
// =====================================================
$transform-hover-lift: translateY(-2px) !default;
$transform-active-press: translateY(0) !default;
$transform-disabled: scale(1) !default;Use in Components
Update _cards.scss:
.card {
box-shadow: $shadow-base; // Was $card-box-shadow
&:hover {
box-shadow: $shadow-hover;
transform: $transform-hover-lift;
}
&:focus-visible {
outline: $focus-ring-style;
}
&:disabled {
opacity: 0.6;
color: $color-disabled;
}
}Checklist:
Task 4: Standardize Interaction Patterns (Priority: ๐ก MEDIUM)
Effort: 2 hours | Impact: MEDIUM-HIGH
Link Consistency
Create assets/scss/components/_links.scss:
/*-- scss:components/links --*/
a {
transition: color $animation-duration-fast $animation-timing-ease;
&:hover {
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 4px;
}
&:focus-visible {
outline: $focus-ring-style;
outline-offset: 2px;
}
}
.link-primary {
color: $primary;
&:hover {
color: $color-hover-dark;
}
}
.link-secondary {
color: $secondary;
&:hover {
color: darken($secondary, 10%);
}
}Card Consistency (Update existing)
All cards should follow:
.card {
box-shadow: $shadow-base;
transition: $shadow-transition, transform $animation-duration-base $animation-timing-ease-in-out;
&:hover {
box-shadow: $shadow-hover;
transform: $transform-hover-lift;
}
}Projects Page Cards
Update timeline-content:
.timeline-content {
box-shadow: $shadow-base; // Not hard-coded
transition: $shadow-transition, transform $animation-duration-base $animation-timing-ease-in-out;
&:hover {
box-shadow: $shadow-hover;
transform: $transform-hover-lift;
}
}Checklist:
Task 5: Add Accessibility Improvements (Priority: ๐ก MEDIUM)
Effort: 1.5 hours | Impact: MEDIUM
Update assets/scss/base.scss
Add focus styles:
// Keyboard Navigation
:focus-visible {
outline: $focus-ring-style;
outline-offset: 2px;
}
// Skip to main content link (hide but accessible)
.skip-to-main {
position: absolute;
top: -40px;
left: 0;
background: $primary;
color: $white;
padding: $spacer-3 $spacer-4;
text-decoration: none;
z-index: 100;
&:focus {
top: 0;
}
}Add ARIA-label support
Update _buttons.scss:
.btn[aria-busy="true"] {
opacity: 0.7;
pointer-events: none;
}Color Contrast Verification
Create checklist for WCAG AA (4.5:1 for text, 3:1 for UI): - [ ] Primary text on white: $gray-900 or $gray-800 โ (15:1) - [ ] Primary text on $primary: $white โ (10:1) - [ ] Secondary text: $gray-700 โ (8:1) - [ ] Disabled text: $gray-400 โ ๏ธ (Check: 2.3:1 - below target, needs review)
Checklist:
Task 6: Create Design System Documentation (Priority: ๐ข MEDIUM-LOW)
Effort: 2 hours | Impact: HIGH (long-term)
File 1: DESIGN_TOKENS.md
# Design Tokens Reference
## Colors
### Primary
- Teal (#1E293B) - Primary brand color
- Light Teal (rgba) - Hover states
- Dark Teal - Active states
### Semantic
- Success: $green (#059669)
- Warning: $orange (#EA580C)
- Danger: $red (#DC2626)
- Info: $cyan (#0369A1)
### Accent
- Energy: #10B981 (Community projects)
- AI: #8B5CF6 (Maintained projects)
## Typography Scale
- Display: 2.625rem
- H1: 1.875rem
- H2: 1.5rem
- H3: 1.3rem
- ...etc
## Spacing System
- Base: 1rem (16px)
- Spacer-1: 4px
- Spacer-2: 8px
- Spacer-3: 16px
- ...up to Spacer-8: 80px
## Shadows
- xs: Small elevation
- base: Default cards
- hover: Hover state
- lg: Modal/overlay
## Animations
- Duration: 0.15s (fast), 0.3s (base), 0.6s (slow)
- Timing: ease, ease-in-out, ease-outFile 2: COMPONENT_GUIDE.md
Document patterns for: - Card types (basic, elevated, outlined) - Button variations - Link behaviors - Form inputs - Navigation patterns - Timeline component (Projects page) - Blog listing - Publication grid
Checklist:
Task 7: Create Reusable Component Mixins (Priority: ๐ข LOW)
Effort: 1 hour | Impact: MEDIUM (future use)
New File: assets/scss/_component-mixins.scss
/*-- scss:mixins/components --*/
// Card with consistent styling
@mixin card-base {
background: $white;
border-radius: $border-radius-lg;
box-shadow: $shadow-base;
transition: $shadow-transition, transform $animation-duration-base $animation-timing-ease-in-out;
&:hover {
box-shadow: $shadow-hover;
transform: $transform-hover-lift;
}
}
// Button with consistent interactive states
@mixin button-interactive($bg-color: $primary, $text-color: $white) {
background: $bg-color;
color: $text-color;
transition: all $animation-duration-base $animation-timing-ease-in-out;
cursor: pointer;
&:hover {
background: darken($bg-color, 5%);
box-shadow: $shadow-hover;
transform: $transform-hover-lift;
}
&:active {
box-shadow: $shadow-sm;
transform: $transform-active-press;
}
&:focus-visible {
outline: $focus-ring-style;
outline-offset: 2px;
}
&:disabled {
background: $color-disabled-bg;
color: $color-disabled;
cursor: not-allowed;
box-shadow: none;
transform: none;
}
}
// Text input focus state
@mixin input-focus {
border-color: $primary;
box-shadow: 0 0 0 3px rgba($primary, $opacity-10);
outline: none;
}
// Badge/label styling
@mixin badge($bg-color: $primary) {
display: inline-block;
padding: $spacer-1 $spacer-2;
background: rgba($bg-color, $opacity-10);
color: $bg-color;
border-radius: $border-radius-full;
font-size: $font-size-xs;
font-weight: $font-weight-semibold;
text-transform: uppercase;
letter-spacing: $letter-spacing-wider;
}Checklist:
๐ Phase 5 Summary Table
| Task | Duration | Priority | Files Changed | Impact |
|---|---|---|---|---|
| 1. Refactor Projects Page | 1.5h | ๐ด CRITICAL | _projects.scss | HIGH |
| 2. Animation System | 1h | ๐ก MEDIUM | _animations.scss, twiga.scss | MEDIUM |
| 3. State Tokens | 1.5h | ๐ก MEDIUM | _defaults.scss, _cards.scss, _buttons.scss | MEDIUM |
| 4. Interaction Patterns | 2h | ๐ก MEDIUM | _buttons.scss, _cards.scss, _projects.scss | MEDIUM-HIGH |
| 5. Accessibility | 1.5h | ๐ก MEDIUM | base.scss | MEDIUM |
| 6. Documentation | 2h | ๐ข LOW | DESIGN_TOKENS.md, COMPONENT_GUIDE.md | HIGH |
| 7. Component Mixins | 1h | ๐ข LOW | _component-mixins.scss | MEDIUM |
| TOTAL | 10h | โ | 10 files | TRANSFORMATIVE |
๐ Implementation Strategy
Phase 5A: Foundation (Hours 1-3)
Priority: Complete Task 1 & 2 first 1. Refactor Projects page (1.5h) 2. Create animation system (1.5h) - Result: Consolidation of custom variables, reusable animations
Phase 5B: Enhancement (Hours 4-7)
Priority: Add state system & patterns 3. State color tokens (1.5h) 4. Interaction patterns (2h) 5. Accessibility (1.5h) - Result: Consistent hover/focus/active states, WCAG compliance
Phase 5C: Documentation (Hours 8-10)
Priority: Codify knowledge for team 6. Design system docs (2h) 7. Component mixins (1h) - Result: Reference guide for future development
โ Merge Strategy
- Create branch:
feature/design-system-consolidation - Commit frequency: After each task completes
- Testing: Manual visual regression testing at each step
- Review: Check all pages at multiple breakpoints
- Final: Comprehensive comparison: Before Phase 5 vs. After Phase 5
๐ฏ Phase 5 Success Indicators
By end of Phase 5: - โ Zero custom color variables (all use branding system) - โ Zero hard-coded dimensions (all use spacing system) - โ Consistent hover states across all interactive elements - โ Visible focus states for keyboard navigation - โ Animation system unified - โ Design tokens documented - โ Component patterns established - โ WCAG AA compliance verified - โ Site feels more cohesive and professional - โ Future changes easier to implement
๐ Notes
- Changes are non-breaking - visual output should remain identical
- All changes are maintainability improvements
- Can be merged directly to main (no QA blocker)
- Recommended to preview in browser to verify no regressions
- Provides foundation for future features (dark mode, themes, etc.)