W3C home > Mailing lists > Public > public-respimg@w3.org > December 2015

Re: Fluid Image properties

From: Simon Bächler <b@chler.com>
Date: Thu, 10 Dec 2015 23:37:03 +0100
To: public-respimg@w3.org
Cc: Michael Scharnagl <mich.scharnagl@googlemail.com>
Message-ID: <etPan.5669fe9e.146b4617.248@MacProSimon.fritz.box>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:06:18 UTC