xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

vue scss @import scoped bug All In One

vue scss @import scoped bug All In One

scoped solutions

  1. ❌ 不好使
<style lang="scss" scoped>
  @import "sample.scss";
</style>

https://stackoverflow.com/questions/59722165/how-to-use-external-scoped-scss-in-vue

  1. ✅ 好使 ???

<style lang="scss" scoped src="~bootstrap/dist/css/bootstrap.css">
    //
</style>

<style lang="scss" scoped src="~bootstrap-vue/dist/bootstrap-vue.css">
   //
</style>


https://stackoverflow.com/questions/49653931/scope-bootstrap-css-in-vue

❌ 测试失败

实际上,还是全局样式 ???


<style lang="scss" scoped src="./styles/creative-add-group-container.scss"></style>
<style lang="scss" scoped src="./styles/text-add-group-container.scss"></style>
<style lang="scss" scoped src="./styles/text-warning.scss"></style>


css in js & style src ???

https://github.com/vuejs/vue-loader/issues/138#issuecomment-436847816

js import css

css style src

https://github.com/xgqfrms/vue/issues/32

https://www.cnblogs.com/xgqfrms/p/9927590.html

refs

https://developer.mozilla.org/en-US/docs/Web/CSS/@import



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2021-08-11 10:52  xgqfrms  阅读(194)  评论(6编辑  收藏  举报