Skip to content

Commit

Permalink
Add sizes attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyWebb committed Jun 15, 2022
1 parent 08044f5 commit 6c34c9d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Html/Attributes.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`.
Expand Down

0 comments on commit 6c34c9d

Please sign in to comment.