Skip to content

Commit dfd1347

Browse files
committed
Another fix for modularscale#65, Libsass doesn’t support negitive nth() values
1 parent 4c196d5 commit dfd1347

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

stylesheets/modular-scale/_function.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
$Value: $Value + 1;
3737
}
3838
@else {
39-
$Value: $Value - 1;
39+
$Value: abs($Value - 1) + $Value;
4040
}
41-
41+
4242
// Find the correct value in the list
4343
$Return: nth($Return, $Value);
4444

test-node-sass/sass/style.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
@import "../../stylesheets/modular-scale";
22

33
foo {
4-
@warn ms-calc(3, 10px 16px, $major-third);
5-
// @warn ms-calc(-4, 10px, $major-third);
6-
// @warn ms-pow(16, -2);
4+
@warn ms(-1, 10px 16px, $major-third);
75
}

0 commit comments

Comments
 (0)