Sometime I prototype UI for like illustrating a new workflow on an existing website. I would prefer coding rather than launching mockup tools like sketch. When placing images on a particular ratio, usually we leverage placeholder services like placekitten. But here I will introduce my way, adding a responsive placeholder block with constrainted ratio, leveraging scss.
Usage
12345
<!-- generate a 4:3 placeholder block --><divclass="_i4_3"></div><!-- similar for 16:9 --><divclass="_i16_9"></div>
The scss
12345678910111213141516171819202122
// add a diagonal line to our placeholder block[class^="_i"]{border:1pxsolid#aaa;background:linear-gradient(totopleft,white0%,white49.9%,#eee50%,white50.4%,white100%);}// generate classes for having responsive height@each$iin3,4,5,12,16{@for$kfrom1through$i{._i#{$i}_#{$k}{height:0;padding-bottom:percentage($k/$i);}}}