Bootstrap 4 SCSS编译:错误:无效的US-ASCII字符"\ xE2" [英] Bootstrap 4 SCSS compilation: Error: Invalid US-ASCII character "\xE2"
问题描述
编译一些bootstrap 4模块(从beta3更新)时遇到问题.
虽然可以通过在 _hover.scss
mixin部分上设置 @charset:'UTF-8';
来解决问题(在文件中已弃用),为什么考虑到它应该像以前的beta版本一样开箱即用的原因,则需要这样做.
_hover.scss
中的代码:
@mixin悬停{&:hover {@content;}}@mixin悬停焦点{& ;:悬停,&:focus {@内容;}}@mixin Plain-Hover-focus {& ;,& ;:悬停,&:focus {@内容;}}@mixin hover-focus-active {& ;:悬停,& ;:重点,& ;:活动{@内容;}}
浏览完SCSS文件后,无法确切找出问题所在,引用似乎还可以.
详细阅读它后,似乎是顶部评论中的-
字符("iOS-一个问题.").
一个人可以将其替换为自己的-
字符,并且应该可以正常编译(或只需在顶部添加
混合文件). @charset:'UTF-8';
> _hover.scss
问题报告:
Having issues compiling some bootstrap 4 modules (updating from beta3).
While the issue can be solved by setting @charset: 'UTF-8';
on _hover.scss
mixin partial (which is noted as deprecated within the file), why would that be needed considering it should compile out of the box as previous beta versions.
Code in _hover.scss
:
@mixin hover {
&:hover { @content; }
}
@mixin hover-focus {
&:hover,
&:focus {
@content;
}
}
@mixin plain-hover-focus {
&,
&:hover,
&:focus {
@content;
}
}
@mixin hover-focus-active {
&:hover,
&:focus,
&:active {
@content;
}
}
After going through SCSS files can't figure exactly what's wrong, quotes seem ok.
After going through it in detail seems to be the -
character on top comments ("iOS-an issue..").
One can replace it for their own -
character and should compile fine (or just add @charset: 'UTF-8';
at the top of the _hover.scss
mixin file).
Issue report: https://github.com/twbs/bootstrap/issues/25391
这篇关于Bootstrap 4 SCSS编译:错误:无效的US-ASCII字符"\ xE2"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!