In my app.vue I want to include bootstrap.css but with a scoped wrapper.
<style lang="scss">
#voucher-mailing-vue-wrapper {
@import "~bootstrap/scss/bootstrap.scss";
@import "~bootstrap-vue/src/index.scss";
}
@import "styles/app";
</style>
When I watch it in chrome you can see that the first import for the css is empty but the second import for bootstrap-vue seems to work.
<style type="text/css">#voucher-mailing-vue-wrapper {
/*!
* Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
**HERE SHOULD THE BOOTSTRAP FILES BE INCLUDED**
}
</style>
<style type="text/css">#voucher-mailing-vue-wrapper {
#voucher-mailing-vue-wrapper :root {
--blue: #007bff;
--indigo: #6610f2;
--purple: #6f42c1;
--pink: #e83e8c;
--red: #dc3545;
--orange: #fd7e14;
--yellow: #ffc107;
--green: #28a745;
--teal: #20c997;
--cyan: #17a2b8;
--white: #fff;
--gray: #6c757d;
--gray-dark: #343a40;
--primary: #007bff;
--secondary: #6c757d;
--success: #28a745;
--info: #17a2b8;
--warning: #ffc107;
--danger: #dc3545;
--light: #f8f9fa;
--dark: #343a40;
--breakpoint-xs: 0;
--breakpoint-sm: 576px;
--breakpoint-md: 768px;
--breakpoint-lg: 992px;
--breakpoint-xl: 1200px;
--font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
#voucher-mailing-vue-wrapper *,
#voucher-mailing-vue-wrapper *::before,
#voucher-mailing-vue-wrapper *::after {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#voucher-mailing-vue-wrapper html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
</style>
What is wrong here ? As I read some other answers regarding to bootstrap, vue and imports, it should be fine this way?
Thanks in advance.
151