We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b5ff2b commit 44e6da1Copy full SHA for 44e6da1
packages/runtime-dom/src/helpers/useCssVars.ts
@@ -5,7 +5,8 @@ import {
5
watchEffect,
6
warn,
7
VNode,
8
- Fragment
+ Fragment,
9
+ unref
10
} from '@vue/runtime-core'
11
import { ShapeFlags } from '@vue/shared/src'
12
@@ -45,7 +46,7 @@ function setVarsOnVNode(
45
46
if (vnode.shapeFlag & ShapeFlags.ELEMENT && vnode.el) {
47
const style = vnode.el.style
48
for (const key in vars) {
- style.setProperty(`--${prefix}${key}`, vars[key])
49
+ style.setProperty(`--${prefix}${key}`, unref(vars[key]))
50
}
51
} else if (vnode.type === Fragment) {
52
;(vnode.children as VNode[]).forEach(c => setVarsOnVNode(c, vars, prefix))
0 commit comments