html icon indicating copy to clipboard operation
html copied to clipboard

There is no picture tag

Open Johann-Goncalves-Pereira opened this issue 3 years ago • 2 comments

I try to find the picture tag, but It doesn't exist in the Elm html package.

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"
            ]
            []
        ]

mbucc avatar Mar 11 '23 15:03 mbucc

Yes, Html Node is useful as well.