Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@each don't work properly. #88

Open
Dragod opened this issue May 10, 2021 · 1 comment · May be fixed by #103
Open

@each don't work properly. #88

Dragod opened this issue May 10, 2021 · 1 comment · May be fixed by #103

Comments

@Dragod
Copy link

Dragod commented May 10, 2021

I have @each loop:

@each $status $color in $list-statuses

but doesn't work

The doc only cover :

@each $animal $i in (puma, sea-slug, egret, salamander) {
    .#{$animal}-icon {
      background-image: url("images/icon-#{$i}.svg");
    }
  }

where $i is only a counter.

Is it not possible to do this:

@each $animal $i in (puma, sea-slug, egret, salamander), (something, something1, something2, something3) {
    .#{$animal}-icon {
      background-image: url("images/icon-#{$i}.svg");
    }
  }

or

$list-statuses: (
	"inprogress" 	: $cv-pending,
	"In Progress" 	: $cv-pending,
	"tobedone" 	: $cv-g-200,
	"complete"	: $cv-success,
	"Complete"	: $cv-success,
	"Cancelled" 	: $cv-alert,
	"Active" 		: $cv-notification,
);

@each  $status $color in $list-statuses {
	[data-value="#{$status}"] {
		.list-dropdown {
			@include background-contrast-hover($color);
			border-color:$color;
		}

		&.cs-tag {
			@include background-contrast($color);
			border-color:$color;
		}
	}
}
@t0byman
Copy link

t0byman commented Aug 31, 2022

I have the same problem

@armano2 armano2 linked a pull request Sep 20, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants