you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 5 months ago (2 children)
$colors: (
  primary: blue,
  danger: red
);

@each $name, $color in $colors {
  .text-#{$name} {
    color: $color;
  }
}

Although, rarely used in such a simple example.

  • source
  • parent
  • hideshow 2 child comments