mdgriffith / elm-ui

What if you never had to write CSS again?

Home Page:https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make text unselectable?

mitchellwrosen opened this issue · comments

Hi, is it possible to make text unselectable using this library?

From a cursory google search it looks like user-select: none CSS is the trick. However, I couldn't figure out how to accomplish that with the external API.

Thanks!

Yes, you can disable selection with this attribute:

Element.htmlAttribute (Html.Attributes.style "user-select" "none")

Nice, I missed that. Thanks.