This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
Releases: madyankin/postcss-each
Releases · madyankin/postcss-each
0.6.0
Added multiple variable assignment (by Ryan Tsao @rtsao):
@each $animal, $color in (puma, black), (sea-slug, blue) {
.$(animal)-icon {
background-image: url('/images/$(animal).png');
border: 2px solid $color;
}
}
```css
.puma-icon {
background-image: url('/images/puma.png');
border: 2px solid black;
}
.sea-slug-icon {
background-image: url('/images/sea-slug.png');
border: 2px solid blue;
}
0.4.1
0.4.0
0.3.1
0.3.0
Added index iteration (by Anton Winogradov @verybigman):
@each $val, $i in foo, bar {
.icon-$(val) {
background: url("$(val)_$(i).png");
}
}
.icon-foo {
background: url("foo_0.png");
}
.icon-bar {
background: url("bar_1.png");
}