Migrate a CSS codebase
Move from CSS to Sass incrementally with tests and visual checks.
What you will be able to do
- Rename and compile before refactoring.
- Introduce tokens first.
- Extract mixins only where repetition hurts.
- Compare compiled output at every step.
In plain English
Rename CSS to SCSS first, then introduce variables and mixins gradually. Keep the compiled output close to the original at each step. Use visual regression or a screenshot diff to catch changes.
mkdir -p src/styles
mv src/styles/app.css src/styles/app.scss
sass src/styles/app.scss public/app.cssYour turn
EasyCompile the renamed file
Write the command that compiles app.scss to public/app.css.
BASH · starter
sassCheck your understanding before moving on.
Knowledge checkQuestion 1
What is the safest first migration step?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.