Answer the question
In order to leave comments, you need to log in
How to use SASS mixins and variables in all Vue components?
If I include global styles in the component:
<style lang="scss">
@import "./sass/main.scss";
.bs-navbar-nav{
background-color: $bg_color; /*переменная из main.scss */
}
</style>
Answer the question
In order to leave comments, you need to log in
This can be done via webpack and the sass-resource-loader plugin. Pass a file with variables into it, as a result they will be available everywhere.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question