我写了一个sass函数,它会抛出一个错误:
Syntax error: Invalid CSS after "...nth($sites, $i)": expected "}", was ": ("
我的代码如下:
@function sites-state-maps($sites, $state){
$sites-index: 10;
$state-index: 3;
@for $i from 1 through $sites-index {
@return nth($sites, $i): (
@for $j form 1 through $state-index {
@return nth($state, $j): state-position($j) site-position($i) @if $j < $state-index {,}
}
) @if $i < $sites-index {,}
}
@return false;
}
$background-position: (
sites-state-maps((aa, bb, cc, dd, ee, ff, gg, hh, ii, jj), (active, hover, current))
);
我不知道这有什么问题?