Each loops with SCSS - how to loop through lists and maps

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI10 min

About this video

Kevin Powell explores a couple of simple examples of using the @each control directive in SCSS to loop through lists and maps. The video points to more complex examples in linked articles for further reading.

What you’ll learn

  • Write a Sass @each loop over a list of values
  • Loop through a Sass map to generate repeated CSS rules
  • Find more advanced Sass control directive examples in linked articles