gpt4 book ai didi

css - sass中列表分隔符的类型

转载 作者:太空宇宙 更新时间:2023-11-04 10:24:57 25 4
gpt4 key购买 nike

我知道 SASS 中的三种分隔符,逗号,空格和自动,但是逗号和自动之间有什么区别,因为我可以看到如果我不使用 LIST 作为分隔符,它需要逗号,对于逗号,它接受逗号,对于auto 它接受自动。

$listUnquote:One, Two Three, Four;
$listSpaceSapareted:"One" "Two" "Three" "Four";
jointAuto{join:join($listUnquote, $listSpaceSapareted, auto)}
jointComma{join:join($listUnquote, $listSpaceSapareted, comma)}
jointblank{join:join($listUnquote, $listSpaceSapareted)}

上面的代码吐出相同的值。提前致谢!

最佳答案

我认为这是 auto 行为:

Unless $separator is passed, if one list is comma-separated and one is space-separated, the first parameter’s separator is used for the resulting list. If both lists have fewer than two items, spaces are used for the resulting list.

只需改变列表的顺序,改变输出:

$commaList: One, Two, Three, Four;
$spaceList: "One" "Two" "Three" "Four";

@warn(join($commaList, $spaceList, auto));
@warn(join($spaceList, $commaList, auto));

Pen

关于css - sass中列表分隔符的类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36858530/

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