vueuse / motion

🤹 Vue Composables putting your components in motion

Home Page:https://motion.vueuse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSS Custom properties support?

Matoseb opened this issue · comments

System info

  • Operating System: Darwin
  • Node Version: v19.5.0
  • Nuxt Version: 3.8.1
  • CLI Version: 3.9.1
  • Nitro Version: 2.7.2
  • Package Manager: yarn@1.22.21
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

<div
v-motion="{
  initial: {
      '--progress': 0,
  },
  enter: {
      '--progress': 1,
  },
}">
</div>

--progress is inserted but stuck at initial state (value: 0).

Describe the bug

CSS Custom properties are inserted, but they do not update.

Additional context

No response

Logs

No response

+1

const { style } = useElementStyle(target)

style.setProperty('--color', '#000') 

this also not working.