Cover example: ``` img { object-fit: cover; } ``` Contain example, margin/border/padding fitted to grid slot and image proportionally sized into it: ``` img { object-fit: contain; } ``` Contain example, margin/border/padding fitted to proportionally scaled-down image: ``` img { justify-self: center; align-self: center; min-width: 100%; min-height: 100%; box-sizing: border-box } ``` Contain example with future syntax, margin/border/padding fitted to proportionally scaled-down image: ``` img { foo-self: center; max-size: fill; } ``` -- GitHub Notification of comment by fantasai Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/523#issuecomment-249164569 using your GitHub accountReceived on Friday, 23 September 2016 11:09:32 UTC
This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:03 UTC