相关疑难解决方法(0)

在 SASS 中通过引用传递函数或 mixin

有没有办法通过引用SASS中的另一个函数或mixin来传递函数或mixin,然后调用引用的函数或mixin?

例如:

@function foo($value) {
    @return $value;
}

@mixin bob($fn: null) {
    a {
        b: $fn(c); // is there a way to call a referenced function here?
    }
}

@include bob(foo); // is there any way I can pass the function "foo" here?
Run Code Online (Sandbox Code Playgroud)

css sass

3
推荐指数
1
解决办法
3197
查看次数

标签 统计

css ×1

sass ×1