spcss icon indicating copy to clipboard operation
spcss copied to clipboard

Add max-height cap on image

Open tpkahlon opened this issue 4 years ago • 0 comments

Setting a max-height on images will put a cap on high-res versions e.g. https://placekitten.com/300/1500. Otherwise, users will face a long scroll of lengthy image in mobile view. This change do not introduce any additional bloated CSS but makes overall user experience streamlined. Another traditional way to handle this would be using a pseudo before/after selector on figure tag, placing a shaded background behind image, setting a fixed max-height|width on image, aligning it vertically and horizontally centered with respect to image tag for linear uniformity. This one will require 4-5 lines of additional CSS, introduces bloat of box model hacks and fine tuning positioning attribute, depending upon if set rules permits.

tpkahlon avatar Dec 06 '20 12:12 tpkahlon