Reputation: 2485
Is it possible to redefine a numerical attribute in SASS by increment or decrement? Consider something like this:
h1 {
font-size: 10px;
}
h1.important {
font-size: += 10px;
}
I know that I can work around that by defining a variable. Is it possible to do this without?
Upvotes: 6
Views: 2207
Reputation: 12979
Not sure if the +=
works, but you could use a base variable and then add on to it in another class.
$baseFontSize: 10px
h1
font-size: $baseFontSize
.border
font-size: $baseFontSize + 10px
Upvotes: 4