My grid has different gutters for different breakpoints and I would have liked to generate my .row
classes dynamically by passing to it predefined variables such as:
@grid-gutter-xs: 10px;
@grid-gutter-sm: 20px;
...
Then I have some mixins within which one that generates the row negative margins by dividing the gutter size in half:
.grid-row(@class) {
.row {
margin-right: -( @{grid-gutter-@{class}} / 2);
margin-left: -( @{grid-gutter-@{class}} / 2);
}
}
Which is later called like
@media (min-width: @screen-sm-min) {
.grid-row(sm);
}
This is a code excerpt and I can simply do this another way and escape the headache but I just curious if it's simply not working like this (and why) or I am missing something in the syntax?