I need help with a code that I have, here's the structure:
<div className="site-col-1">
content 1
</div>
<div className="site-col-2">
content 2
</div>
Here is how the corresponding CSS file looks...
.site-col-1 {
grid-column: span 1;
}
.site-col-2 {
grid-column: span 2;
}
.site-col-3 {
grid-column: span 3;
}
Is there a way I can simplify this by passing the number as an argument from the div rather than creating individual CSS classes for each? Something like this:
.site-col-ARG {
grid-column: span ARG
}