|
|
@@ -288,7 +288,10 @@ export default {
|
|
|
@return $string;
|
|
|
}
|
|
|
@function ls-icon($color, $inner) {
|
|
|
- @return url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='#{str-replace($color, '#', '%23')}' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E#{$inner}%3C/svg%3E");
|
|
|
+ // Dart Sass: $color 为 Color 类型,str-index/str-replace 只接受字符串。
|
|
|
+ // inspect() 先转 hex 字符串(如 #4f46e5),再编码 # 为 %23(SVG data-URI 合法)。
|
|
|
+ $hex: inspect($color);
|
|
|
+ @return url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='#{str-replace($hex, '#', '%23')}' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E#{$inner}%3C/svg%3E");
|
|
|
}
|
|
|
// 图标路径(feather 线性几何,24×24;只编码 < > 与 #,空格/单引号合法)
|
|
|
$ls-i-search: "%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E";
|