Reputation: 61606
I have the following CSS code, which hides rows 8 and on:
table tr:nth-child(n+8) {
display: none;
}
However, I would like numbers 8 to be calculated, since it might change. Specifically, I'd like it be 6 + myOffset
So in SASS, I am trying the following:
$myOffset: 2;
/* try 1 */
table tr:nth-child(n+6+$myOffset) {
display: none;
}
/* try 2 */
table tr:nth-child(n+6+{$myOffset}) {
display: none;
}
/* try 3 */
table tr:nth-child(n+6+#{$myOffset}) {
display: none;
}
None of these seem to work. Is this possible with SASS?
Upvotes: 0
Views: 85