Answer the question
In order to leave comments, you need to log in
How to override sass variable in vue component?
There is a global _variables.scss
where the variable is defined. $var: 0;
How can I redefine the value of this variable in the view component?
Tried so, in the forehead, but does not take off
<style scoped lang="scss">
$var: 10;
</style>
Answer the question
In order to leave comments, you need to log in
sass variables disappear when sass is converted to css, so it won't come out.
But you can use css variables
you can't do that with scss variables. but with regular css variables you can. google about them
If you do not need the value of this variable, then why are you declaring it again at all? Apparently, it doesn’t matter to you what it will be called, it will have a completely different meaning, so does it make sense? Maybe it's easier to create a variable with a different name? $locVar: 10 ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question