Skip to content

Commit 73fb65d

Browse files
committed
Add sizes attribute
1 parent d851b85 commit 73fb65d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Html/Attributes.elm

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Html.Attributes exposing
1010
, cols, rows, wrap
1111
, href, target, download, hreflang, media, ping, rel
1212
, ismap, usemap, shape, coords
13-
, src, srcset, height, width, alt
13+
, src, srcset, height, width, sizes, alt
1414
, autoplay, controls, loop, preload, poster, default, kind, srclang
1515
, sandbox, srcdoc
1616
, reversed, start
@@ -355,6 +355,11 @@ width : Int -> Attribute msg
355355
width n =
356356
Elm.Kernel.VirtualDom.attribute "width" (String.fromInt n)
357357

358+
{-| Declare the final rendered sizes of a picture `source` for a set of media queries
359+
-}
360+
sizes : String -> Attribute msg
361+
sizes =
362+
stringProperty "sizes"
358363

359364
{-| Alternative text in case an image can't be displayed. Works with `img`,
360365
`area`, and `input`.

0 commit comments

Comments
 (0)