<input type="range" v-model="safariTrue" >
<style>
h1{
margin: {{safariTrue}};
}
</style>
h1 {
font-size: var(--h1-font-size);
}
<input v-model="fontSize" type="range">
<h1>hello, world!!</h1>
data: () => ({
fontSize: 24,
}),
mounted() {
this.$watch(
'fontSize',
val => this.$el.style.setProperty('--h1-font-size', `${val}px`),
{ immediate: true }
);
},