I have a div like this:
<div class="center small-top-margin">
<%= rails code %>
</div>
where `small-top-margin' is as follows:
.small-top-margin {
margin-top: 2em;
}
Is there a way to pass an argument to a css class such that
class="top-margin(2)
#=> margin-top: 2em;
class="top-margin(5)
#=> margin-top: 5em;
etc..
or even better
class="margin(top, 2)
#=> margin-top: 2em;
I've included Rails
tags in case there's a way to do this through rails, although a purely css/sass solution would be better.