How can a signal update a class style? #1800
Replies: 1 comment
-
Using CSS variables is a good solution here, and they can be set with the
with the CSS button {
width: var(--width);
height: var(--height);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Reading through the book I can see you can update any individual element's
style
orclass
.However I have many elements which all use the same class. I would like to modify the class's style rather than all of those elements.
I can't figure out how to do this. I found there are several different ways to tell Leptos about a class style. One way is with
leptos_meta::Style
. I tried to use a signal in that string:This doesn't work. the signals seem to be ignored..
I also tried using
stylers
andstyled
crates. In both cases, they don't seem to support a closure in their macro.So, I am unclear, how can I dynamically update the class?
Beta Was this translation helpful? Give feedback.
All reactions