From 73fb65d74fdda219b8c96a44d95612a0051ee4cb Mon Sep 17 00:00:00 2001 From: Casey Webb Date: Wed, 15 Jun 2022 00:02:12 -0500 Subject: [PATCH] Add sizes attribute --- src/Html/Attributes.elm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Html/Attributes.elm b/src/Html/Attributes.elm index 7f48b34..c35da82 100644 --- a/src/Html/Attributes.elm +++ b/src/Html/Attributes.elm @@ -10,7 +10,7 @@ module Html.Attributes exposing , cols, rows, wrap , href, target, download, hreflang, media, ping, rel , ismap, usemap, shape, coords - , src, srcset, height, width, alt + , src, srcset, height, width, sizes, alt , autoplay, controls, loop, preload, poster, default, kind, srclang , sandbox, srcdoc , reversed, start @@ -355,6 +355,11 @@ width : Int -> Attribute msg width n = Elm.Kernel.VirtualDom.attribute "width" (String.fromInt n) +{-| Declare the final rendered sizes of a picture `source` for a set of media queries +-} +sizes : String -> Attribute msg +sizes = + stringProperty "sizes" {-| Alternative text in case an image can't be displayed. Works with `img`, `area`, and `input`.