csstools / precss

Use Sass-like markup in your CSS
https://jonathantneal.github.io/precss/
Creative Commons Zero v1.0 Universal
1.61k stars 77 forks source link

Find element in a list? #65

Open kkomaz opened 8 years ago

kkomaz commented 8 years ago

In sass you can use the nth position syntax to find an element in a list... What is the equivalent for this functionality if exists?

$list: "item-1", "item-2", "item-3";
nth($list, 1) -> "item-1"
diverent2 commented 5 years ago

Looking at the respective plugins this doesn´t seem to be part of any of the included plugins. This postcss plugin seems to allow for the expected behaviour: postcss-nth-list. However it´s quite old (just like this issue 😅).

Is there still a demand for it? Have you found any solutions, alternatives for this feature, whatsoever?