Skip to content

Commit

Permalink
start adding tests for functions
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Feb 11, 2024
1 parent 54ce126 commit 80b84aa
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Tests/syntax_test_scss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -764,3 +764,20 @@ nav ul {
}
}

//=============================================================================
// Function
// https://sass-lang.com/documentation/at-rules/function/
//=============================================================================
@function fibonacci($n) {
$sequence: 0 1;
@for $_ from 1 through $n {
$new: nth($sequence, length($sequence)) + nth($sequence, length($sequence) - 1);
$sequence: append($sequence, $new);
}
@return nth($sequence, length($sequence));
}

.sidebar {
float: left;
margin-left: fibonacci(4) * 1px;
}

0 comments on commit 80b84aa

Please sign in to comment.