Answer the question
In order to leave comments, you need to log in
Vue 3 experimental attr vars in style not working?
Hello. I'm picking vue 3. I really liked the new feature with the ability to pass data to a block with styles in single-file components.
Decided to use this in my project and something went wrong.
We have a component
export default {
props: {
val: {
type: String,
default: '100px'
}
}
}
<style vars="{ val }" scoped>
.el {
height: var(--val);
}
</style>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question