Skip to content

Commit

Permalink
fix(useCssVar): remove spaces at both ends
Browse files Browse the repository at this point in the history
fix #1738
  • Loading branch information
murongg committed Jul 4, 2022
1 parent 9c72a78 commit 673d689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useCssVar/index.ts
Expand Up @@ -25,7 +25,7 @@ export function useCssVar(
[elRef, () => unref(prop)],
([el, prop]) => {
if (el && window)
variable.value = window.getComputedStyle(el).getPropertyValue(prop)
variable.value = window.getComputedStyle(el).getPropertyValue(prop).trimStart().trimEnd()
},
{ immediate: true },
)
Expand Down

0 comments on commit 673d689

Please sign in to comment.