Accessing theme list settings via SCSS @each rule

btw solved this last week. used a string separator scss function

@function str-to-list($string, $separator, $startAt: 1) {
  $item: str-slice($string, $startAt);
  $list: ();
  $index: str-index($item, $separator);

  @if $index ==null {
    $list: ($item);
  }

  @else {
    $list: (str-slice($item, 1, $index - 1));
    $list: join($list, str-to-list($item, $separator, $startAt: $index + 1));
  }

  @return $list;
}

$list: str-to-list("#{$list_setting}", "|");

@each $setting in $list {
  some css formating code with each $setting here;
}

using it in these components here:

https://github.com/Lillinator/topic-header-changer

https://github.com/Lillinator/restrict-user-status

thanks to @Don for the tip :slight_smile: