Skip to content

Commit 80b84aa

Browse files
committed
start adding tests for functions
1 parent 54ce126 commit 80b84aa

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Tests/syntax_test_scss.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,3 +764,20 @@ nav ul {
764764
}
765765
}
766766

767+
//=============================================================================
768+
// Function
769+
// https://sass-lang.com/documentation/at-rules/function/
770+
//=============================================================================
771+
@function fibonacci($n) {
772+
$sequence: 0 1;
773+
@for $_ from 1 through $n {
774+
$new: nth($sequence, length($sequence)) + nth($sequence, length($sequence) - 1);
775+
$sequence: append($sequence, $new);
776+
}
777+
@return nth($sequence, length($sequence));
778+
}
779+
780+
.sidebar {
781+
float: left;
782+
margin-left: fibonacci(4) * 1px;
783+
}

0 commit comments

Comments
 (0)