csstools / csstools/postcss-advanced-variables

$counter in @each statement not working

Open
#59 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
144
Forks
33
PR merge metrics
No merged PRs in 30d

Description

I am not getting this statement to work. Using your example:

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

The CSS that is returned when I include the counter($i) looks like this:

`.$(animal)-icon {
background-image: url("images/icon-$i.svg");
}`

If I remove the counter, the statement proceeds as expected.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.