In elm-css you can do this using the Css.Global
module.
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.