I was having some weird problems with the omega()
function of Bourbon Neat, and so I looked into the source code, where I saw the use of the nth()
function.
After trying out nth
in SassMeister I see that all Sass engines produce the same weird output:
input.scss
.foo {
content: nth(5n + 3, 1 );
}
will produce
output.css
.foo {
content: 8n;
}
As you can see, it does some strange "math" with my expression. It seems as if Sass is trying to combine the two elements, although it mathematically does not make sense.
This has some bad consequences for mixins using this function, as I would expect @include omega(4n+4)
to create a pseudo-selector of 4n+4
(skip the first 4, then apply to every 4,8,12...), but it creates 8n
instead (applying to every 8th element).
Is there a logical reason for why this should be so or is this just an early bug that became the spec? And can it be avoided?