{"id":267,"date":"2012-06-01T06:10:09","date_gmt":"2012-06-01T06:10:09","guid":{"rendered":"http:\/\/www.w3.org\/community\/respimg\/?p=267"},"modified":"2012-06-01T06:10:09","modified_gmt":"2012-06-01T06:10:09","slug":"a-new-proposal-in-the-whatwg-mailing-list-featuring-both-advantages","status":"publish","type":"post","link":"https:\/\/www.w3.org\/community\/respimg\/2012\/06\/01\/a-new-proposal-in-the-whatwg-mailing-list-featuring-both-advantages\/","title":{"rendered":"A new proposal in the WHATWG Mailing List featuring both advantages"},"content":{"rendered":"<p>Kornel Lesinski just published a new proposal on the WHATWG mailing list this morning. He proposes a new element in HTML called &lt;pic&gt; which is shorter to write than &lt;picture&gt; would be.<\/p>\n<p>This solution combines the advantages of our proposal of the picture-element and the proposal of the resolution based srcset approach by the WHATWG published recently.<\/p>\n<p>The syntax also can be written in a short way and in a long way. This is good for developers because normal developers can write it the common HTML-like way while advanced developers are provided with a short-syntax.<br \/>\nAlso the syntax is able to use @media-queries as well as resolutions.<\/p>\n<p>In short syntax the code could look:<\/p>\n<pre>&lt;pic src=\"small.jpg (max-width:320px), medium.jpg (max-width:768px), large.jpg\"&gt;alt text&lt;\/pic&gt;\r\n\r\n&lt;pic src=\"portrait.jpg (orientation:portrait), landscape.jpg\"&gt;alt text&lt;\/pic&gt;\r\n\r\n&lt;pic src=\"small.jpg 0.5x, medium.jpg 1x, large.jpg 2x\" style=\"width:100%\"&gt;alt text&lt;\/pic&gt;<\/pre>\n<p>While the long syntax could be like that:<\/p>\n<pre>&lt;pic&gt;\r\n       &lt;source src=\"large.jpg\" media=\"(min-width:1024px)\" width=\"1024\" height\"=\"300\"&gt;\r\n       &lt;source src=\"medium.jpg\" media=\"(min-width:768px)\" width=\"768\" height=\"200\"&gt;\r\n       &lt;img src=\"small.jpg\" width=\"320\" height=\"100\"&gt;\r\n       alt text\r\n&lt;\/pic&gt;<\/pre>\n<p>This of course is a first proposal to which I already replied with several improvements but it looks like we finally get in the right direction where we will get the best approach we can find together. And I am super happy that this has been proposed.<\/p>\n<p>Here is <a title=\"[whatwg] The &lt;pic&gt; element\" href=\"http:\/\/lists.whatwg.org\/pipermail\/whatwg-whatwg.org\/2012-May\/036242.html\" target=\"_blank\" rel=\"nofollow\">the full description<\/a> and here the <a title=\"Thread to pic-element\" href=\"http:\/\/lists.whatwg.org\/pipermail\/whatwg-whatwg.org\/2012-May\/thread.html#36242\" target=\"_blank\" rel=\"nofollow\">link to the thread<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kornel Lesinski just published a new proposal on the WHATWG mailing list this morning. He proposes a new element in HTML called &lt;pic&gt; which is shorter to write than &lt;picture&gt; would be. This solution combines the advantages of our proposal &hellip; <a href=\"https:\/\/www.w3.org\/community\/respimg\/2012\/06\/01\/a-new-proposal-in-the-whatwg-mailing-list-featuring-both-advantages\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1287,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"yes","footnotes":""},"categories":[1],"tags":[],"class_list":["post-267","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/posts\/267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/users\/1287"}],"replies":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/comments?post=267"}],"version-history":[{"count":4,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/posts\/267\/revisions"}],"predecessor-version":[{"id":271,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/posts\/267\/revisions\/271"}],"wp:attachment":[{"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/media?parent=267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/categories?post=267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/tags?post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}