I want to add a :hover style to an element using Elm's HTML library. I could do it using Signals and Sets to keep track of selected nodes, but that would bloat my code with unecessary state for something trivial. I could do it by adding an external stylesheet, but I still didn't figure how to do it using elm-reactor.
So, how can I add a :hover style to an element using Elm?
It looks like the 'identicalsnowflake/elm-dynamic-style' library might help:
http://package.elm-lang.org/packages/identicalsnowflake/elm-dynamic-style/1.1.0
div (hover [("color","blue","lightblue")]) [text "so cool!"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With