html
html copied to clipboard
There is no picture tag
Until this is merged, a work around is to use the attribute function in Html.Attributes.
I compiled but have not tested this example.
import Html.Attributes exposing (..)
logo : Html msg
logo =
a
[ img
[ src "logo-medium.webp"
, attribute "srcset" "/img/logo-small.webp 384w, /img/logo-medium.webp 683w, /img/logo-large.webp 1280w"
, attribute "sizes" "(min-width: 2,048px) 1280px, (min-width: 768px) 683px, 25vw"
]
[]
]
Yes, Html Node is useful as well.