Skip to content

Instantly share code, notes, and snippets.

@lgh06
Last active October 9, 2015 08:26
Show Gist options
  • Save lgh06/ca237ee76ecd03a6ee05 to your computer and use it in GitHub Desktop.
Save lgh06/ca237ee76ecd03a6ee05 to your computer and use it in GitHub Desktop.
less-loop-1
.generate-columns(9);
.generate-columns(@n, @i: 1) when (@i =< @n) {
.float@{i} {
animation: ~'float@{i}' 5s ease-in-out infinite;
}
.generate-columns(@n, (@i + 1));
}
result :
.float1 {
animation: float1 5s ease-in-out infinite;
}
.float2 {
animation: float2 5s ease-in-out infinite;
}
.float3 {
animation: float3 5s ease-in-out infinite;
}
.float4 {
animation: float4 5s ease-in-out infinite;
}
.float5 {
animation: float5 5s ease-in-out infinite;
}
.float6 {
animation: float6 5s ease-in-out infinite;
}
.float7 {
animation: float7 5s ease-in-out infinite;
}
.float8 {
animation: float8 5s ease-in-out infinite;
}
.float9 {
animation: float9 5s ease-in-out infinite;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment