How to Refactor SCSS Variables for Styled Components

Example syntax for variables, formulas, fonts and images

Andreea Macoveiciuc
Code Like A Girl
Published in
3 min readApr 20, 2020

--

Photo by Jan Huber on Unsplash

In SCSS, you can use variables and formulas for expressing colors, font sizes, widths and spacing variants. However, when you switch from SCSS to styled components, the syntax isn’t valid anymore.

--

--

I bring clarity to content chaos and help SaaS companies scale their marketing by aligning their strategy to business goals. https://www.schoolofcontent.net/