error stylesheets/scss/index.scss (Line 19: Invalid CSS after "...l>li:nth-child(": expected expression (e.g. fr, 2n+1), was "$child) {border...")
$tertiaryColor: white;$navitems: 11;@mixin mleftborder { @if $navitems > 7 { @if $navitems % 2 == 0 { $child: ($navitems / 2) + 1; #site>ul>li:nth-child($child) {border-left: 1px solid $tertiaryColor;} } }}
#{$child}
#site>ul>li:nth-child(#{$child})
I have a variable in my .scss file that I'd like to use in a pseudo selector, :nth-child(), I tried it and it didn't go so well. I recieved the error
Here's roughly what I want to do.
Is this at all possible or do I have to find another way?
#{$child}:#site>ul>li:nth-child(#{$child})