{"action":"created","issue":{"url":"https://api.github.com/repos/scottjehl/picturefill/issues/557","labels_url":"https://api.github.com/repos/scottjehl/picturefill/issues/557/labels{/name}","comments_url":"https://api.github.com/repos/scottjehl/picturefill/issues/557/comments","events_url":"https://api.github.com/repos/scottjehl/picturefill/issues/557/events","html_url":"https://github.com/scottjehl/picturefill/issues/557","id":97430022,"number":557,"title":"Don't set explicit width","user":{"login":"cmeeren","id":7766733,"avatar_url":"https://avatars.githubusercontent.com/u/7766733?v=3","gravatar_id":"","url":"https://api.github.com/users/cmeeren","html_url":"https://github.com/cmeeren","followers_url":"https://api.github.com/users/cmeeren/followers","following_url":"https://api.github.com/users/cmeeren/following{/other_user}","gists_url":"https://api.github.com/users/cmeeren/gists{/gist_id}","starred_url":"https://api.github.com/users/cmeeren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmeeren/subscriptions","organizations_url":"https://api.github.com/users/cmeeren/orgs","repos_url":"https://api.github.com/users/cmeeren/repos","events_url":"https://api.github.com/users/cmeeren/events{/privacy}","received_events_url":"https://api.github.com/users/cmeeren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-27T10:10:51Z","updated_at":"2015-07-27T11:25:15Z","closed_at":null,"body":"I have an image I would like to fit within a container. I'm doing this with ``max-height: 100%`` and ``max-width: calc(100% - 8em - 10px)``. This works at least in Firefox and Chrome. But in IE, picturefill sets the ``width`` attribute on the ``img`` element explicitly based on the ``sizes`` attribute, which overrides ``max-width`` and ``max-height`` resulting in the image filling the container horizontally and having a (potentially wildly) incorrect aspect ratio.\r\n\r\nFirefox and Chrome seems to adhere to ``max-width`` and ``max-height`` when rendering the picture using ``sizes`` and ``srcset``, making sure the aspect ratio is preserved (since no explicit ``width`` or ``height`` is given). Shouldn't picturefill also do this?"},"comment":{"url":"https://api.github.com/repos/scottjehl/picturefill/issues/comments/125172111","html_url":"https://github.com/scottjehl/picturefill/issues/557#issuecomment-125172111","issue_url":"https://api.github.com/repos/scottjehl/picturefill/issues/557","id":125172111,"user":{"login":"cmeeren","id":7766733,"avatar_url":"https://avatars.githubusercontent.com/u/7766733?v=3","gravatar_id":"","url":"https://api.github.com/users/cmeeren","html_url":"https://github.com/cmeeren","followers_url":"https://api.github.com/users/cmeeren/followers","following_url":"https://api.github.com/users/cmeeren/following{/other_user}","gists_url":"https://api.github.com/users/cmeeren/gists{/gist_id}","starred_url":"https://api.github.com/users/cmeeren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmeeren/subscriptions","organizations_url":"https://api.github.com/users/cmeeren/orgs","repos_url":"https://api.github.com/users/cmeeren/repos","events_url":"https://api.github.com/users/cmeeren/events{/privacy}","received_events_url":"https://api.github.com/users/cmeeren/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T11:25:15Z","updated_at":"2015-07-27T11:25:15Z","body":"Thanks. Since I already found a workaround, I think I'll stick with that - unless PF3.0 alpha is production ready (I guess not)?"}}