Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> the only things on my site that require JS are the "Make the image bigger when you click on it" feature

You could actually do this without JS, just wrap the image in a label for an invisible input, and apply transform with a transition based on :focus or :focus-within.

It would be ugly, sure, but so much of modern front-end development is already ugly.



Couldn’t you just use a any element with a focus pseudo selector? Or is there something in an input that’s special?





Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: