Essentially, can this css be represented in either library:
.child { display: none; } .parent:hover .child { display: block; }
I’ve used elm-ui a lot, but haven’t used elm-css at all, but in looking at the docs in both cases, it seems like hover rules can only be applied to the element you’re styling? I can’t figure out a way to refer to if a parent is being hovered over.
elm-ui
elm-css
In elm-css you can do this using the Css.Global module.
Css.Global
We use elm-css, but we prefer to do this with plain CSS. We have a global CSS file with:
.displayOnParentHover { display: none; } *:hover > .displayOnParentHover { display: block; }
And then add class "displayOnParentHover" to the element.
class "displayOnParentHover"
As hovering over elements is a behavior I prefer to handle that in elm
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.