Resizing on Click - Without JavaScript
published on
I came across this on Twitter:
> I was curious if a picture could be resized (with a click) without JavaScript.https://t.co/9ZxWp29gv3
— CSS-Tricks (@css) August 29, 2019
(The trick? details/summary)
This codepen is a pretty interesting technique. Not sure if this is something suitable to use in production, but a cool thought experiment and result for sure. I like it 👍🏼
I’m thinking it could be quite a nice way to create a CSS light box or something similar without the need for JS. It might not be the best technique for light boxes, since it’s probably impossible to manage focus state on the page and to make it properly accessible. Still, I think it’s a neat idea and I want to have a closer look at it. It might be good for some use case.