gpt4 book ai didi

sass - 将 sass 转换为 scss

转载 作者:行者123 更新时间:2023-12-02 05:02:44 25 4
gpt4 key购买 nike

嗨,我有这个 sass mixin,我想把它改成 SCSS mixin,我真的很接近,有人能帮忙吗?

SASS
=animate($name: fadeIn, $duration: 1s, $delay: .2s, $function: ease, $mode: both)
+experimental(animation, $name $duration $delay $function $mode)

What iv done so far in SCSS
@mixin animate($name, $duration, $delay, $function, $mode) {
animation: {
name: $name;
duration: $duration;
delay: $delay;
function: $function;
mode: $mode;
}
}

最佳答案

我想这就是您想要做的。

混合:

@mixin animate($name, $duration, $delay, $function, $mode) {
name: $name;
duration: $duration;
delay: $delay;
function: $function;
mode: $mode;
}

包括:

// SELECTOR TO ADD ANIMATION TO
.animation {
@include animate(fadein, 1s, .2s, ease, both);
}

关于sass - 将 sass 转换为 scss,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14860952/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com