我想使用 Bootstrap 的 variables.less 文件来设置一些网格宽度,但我希望使用 SASS 而不是 LESS。
以下是我的代码:
jqGrid.scss
@import url('../../Content/bootstrap/bootstrap-ui/less/variables.less');
@mixin colWidthPercent($columnNum, $widthPercent) {
width: @screen-sm-min;
}
它不喜欢 @screen-sm-min,我猜是因为它是LESS格式。
有没有办法混合使用 .less 文件和 .sass 文件?
rake
自动将 LESS 转换为 SCSS。请参见 "Upstream Converter" 和其 源代码。 Bootstrap 4 只使用 SCSS 编写。 - Philipp Bammes