Re: Fluid Image properties

Hi Michael

Actually object-fit and object-position would do exactly that. I didn’t know those. They are already supported by Chrome and Firefox. (object-fit is supported by Safari, too). Thank you for pointing this out. 

@Daniel 
I was not just referring to ad banners but more general an image which is much wider than tall. Walmart labs uses this technique for their hero images and they have a great talk about it here. But it’s true, the fluidity is pure styling sugar and doesn’t add to the content.

Modern Javascript module bundlers such as Webpack or jspm make it easily possible to bundle rarely used javascript and css into different files and have them loaded on demand, e.g. if an element with a certain id is present in the DOM. 


Regards

Simon


Am 10. Dezember 2015 bei 18:32:12, Michael Scharnagl (mich.scharnagl@googlemail.com) schrieb:

Hi Simon,

not sure if I understand you correctly, but do you want something along this: http://jsbin.com/kodevoqiqa/edit?html,css,output  With object-fit you can kinda do it already but I guess you want more precise ways to define how the image should be fitted in a box?

Best,
Michael

Received on Thursday, 10 December 2015 22:37:45 UTC