CSS variables initial values via class #2393
Unanswered
fullyherge
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I have a case of needing responsive animations - my element should pop in from the right to left on desktop, bottom to top on mobile. I solved this at first by having two different elements that switched display based on media query, but I figured I could try moving the animated variables into CSS variables. Now I'm struggling to find a way of having the initial values be responsive. This is required since the origin of the animation is a big part of the responsive difference.
Loosely based on this video.
This is what I have currently:
CSS
Component
The errors
I understand what this is asking for, but setting the initial values in the
style
prop won't make the initial values responsive... Am I missing something obvious?Beta Was this translation helpful? Give feedback.
All reactions