I have somthing like this, this is just simple example what i need it much more different.
p:nth-child(1) {
content :"1";
}
p:nth-child(2) {
content :"2";
}
p:nth-child(3) {
content :"3";
}
p:nth-child(4) {
content :"4";
}
p:nth-child(5) {
content :"5";
}
How to make sass funtion to generate like this css, this is what i have for now but i dont like how it looks :)
$content-list: 1 2 3 4 5;
@each $current-content in $content-list {
$i: index($content-list, $current-content);
p:nth-child(#{$i}) {
content: "#{$i}";
}
}