4

Why do I import scoped but it still affects other components.I have consulted this article but the solutions are generating error [https://stackoverflow.com/questions/49653931/scope-bootstrap-css-in-vue]. Thanks.

<style scoped>
    @import '/public/admin/bs3/css/bootstrap.min.css';
    @import '/public/admin/css/bootstrap-reset.css';
    @import '/public/admin/font-awesome/css/font-awesome.css';
    @import '/public/admin/css/style.css';
    @import '/public/admin/css/style-responsive.css';
</style>
Megatron
  • 53
  • 2
  • `/public/admin/bs3/css/bootstrap.min.css` these look like relative URLS and they shouldn't be. They should be relative paths to local files. Like in your `node_modules` directory. – bassxzero Oct 15 '21 at 03:43
  • So the issue is, the imported CSS files are not scoped as expected? If that's the case. IIRC importing already compiled CSS files like that don't give scoped CSS. – Kunukn Oct 15 '21 at 07:21
  • @Kunukn Hi Did you find the solution for this? Because I am also facing the same issue in Vuejs/Nuxtjs and tried many things but nothing seems to work for me. – BATMAN_2008 Apr 30 '22 at 15:08

0 Answers0