Sass 将变量转换为字符串
Sass convert variable to string
我有这样的东西
$theme: "default";
@import "styles/themes/#{$theme}/main";
但是它不起作用,也许在导入时 sass 有问题?
根据 Sass @import docs 它不工作:"Imports may contain #{} interpolation, but only with certain restrictions. It’s not possible to dynamically import a Sass file based on a variable; interpolation is only for CSS imports. As such, it only works with url() imports."
我有这样的东西
$theme: "default";
@import "styles/themes/#{$theme}/main";
但是它不起作用,也许在导入时 sass 有问题?
根据 Sass @import docs 它不工作:"Imports may contain #{} interpolation, but only with certain restrictions. It’s not possible to dynamically import a Sass file based on a variable; interpolation is only for CSS imports. As such, it only works with url() imports."