diff --git a/packages/core/useCssVar/index.ts b/packages/core/useCssVar/index.ts index 943408e35b5..752d1401b0b 100644 --- a/packages/core/useCssVar/index.ts +++ b/packages/core/useCssVar/index.ts @@ -30,7 +30,7 @@ export function useCssVar( [elRef, () => unref(prop)], ([el, prop]) => { if (el && window) { - const value = window.getComputedStyle(el).getPropertyValue(prop) + const value = window.getComputedStyle(el).getPropertyValue(prop).trimStart().trimEnd() variable.value = value || initialValue } },