Is this possible to pass the the number from class name to LESS ?
I would like to pass the number (1, 2, 3, 4...) as a variable to my LESS file. Then use this number to generate CSS.
Here is the example:
<div class="flex">
<div class="flex-1">
FLEX 1
</div>
<div class="flex-2">
FLEX 2
</div>
</div>
I would like to receive the CSS like below:
flex-NUMBER{
flex: NUMBER
}
Where NUMBER is the number from my class name.
If this is possible, could you please tell me how I can do that ?