I am trying to create a set of boxes. I want to try and see if I can set the size of the box based on its position within the group.
Currently this is possible if I know the number of boxes beforehand and use the
height:calc(n * 10);
width:calc(n * 10);
In CSS Selectors Level 3, there are no methods for targeting an element then, using variables corresponding to that element's position within a group, tailoring styles for that element.
In CSS, the
calc() function does not allow variables. Only mathematical expressions with addition (+), subtraction (-), multiplication (*), and division (/) are allowed as component values.
With Sass, however, a CSS preprocessor, using variables in a
calc() function is possible.