To lightbox, or not to lightbox

Much to my annoyance, lightboxes have become pretty ubiquitous on the internet. I’m bored of seeing them and bored of making them. And the more I use my phone for viewing websites, I’m frustrated that the vast majority of sites use them regardless of the device accessing the site.

For Facebook Stories I decided I would act upon my frustrations. When building the site I included simple conditionals in the JavaScript that enabled the lightbox, based on screen size and if the device was a touch screen.

I decided that any screen that was less than 1000px wide and 650px tall it wasn’t worth seeing the lightbox, as it would be too small to use. So instead of opening the lightbox the browser just goes to the permalink page instead.

I also decided that lightbox’s aren’t so hot on touch screen devices; accidental touches on the mask closed the lightbox and the responsive views for the permalink pages was much nicer than trying to fit a lightbox into the screen.

Now I just wish my banks website would do the same…