Interview practice question
Migrating a legacy CSS codebase to a new architecture
Frontend Engineering · HTML and CSS · Experienced
Your app has 15,000 lines of global CSS with heavy specificity and !important. How would you migrate it to a maintainable architecture?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Audit and measure (unused, specificity).
- Choose target (tokens, components, layers).
- Wrap legacy CSS in low-priority layer.
- Migrate component by component.
- Visual regression tests, delete dead CSS.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.