can you have an array inside of a sass object value?

It is possible. @each part needs some modification:

  1. &-#{$name}: should convert to &-#{$name}.
  2. Access to list (array) items is possible with nth function; for example nth($value, 1).
  3. lists indexes start from 1.
  4. Also '100vh' doesn’t need '.

More information about lists:

    @each $name, $value in $background-things {
        #background {
            &-#{$name} {
                @include column($height:nth($value, 1), $background-color:nth($value, 2), $flex-direction:nth($value, 3));

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top