image
avatar
Published 2025-12-27 by Isaac French Updated On 2025-12-28

Does anyone else think this is insane?


This is insane to me.

Honestly, I just needed to get this out of my head. I recently went to my friends house, and they have got 3 light switches hooked up to one light. That is fine, however when all of the switches are off, the light is on...

And thats just crazy. Why would all of the switches being off, mean that its on! And as I was standing there, all I could think is that there is an odd number of light switches, so it must be possible to fix it by flicking them on and off again... 

You cannot. And it saddens me deeply.

Making the problem above

I spent a good couple hours making this, and it basically amounted to nothing, so here is how I did it, so at least something comes out of this pure misery.

 

I had a look around for if people had done this kinda thing before, and they have. CodePen is a wonderful place, with lots of cool stuff. This is the one I found. Really cool, works well, but I mostly liked the switch. The switch looks great, so I just stole that for the above.

The lightbulb was way more complicated than I thought. Basically all of the examples and setups available rely heavily on the body element and ::before statements, and I wanted something much simpler. So its a bootstrap svg lightbulb with an overlay. The overlay has a yellow background and a yellow box shadow, with a shape that fits... well enough in the lightbulb. And thats about it.

The lightbulbs adjust themselves using the onclick and this. object, and the onclick also adds the yellow shadow and colour to the lightsource overlay.

 

I don't think theres much to say to be honest. I'm just upset by this, and needed some lightswitches to test some theories against, and I couldn't really ask my friend if I could have access to their house so I can flick lightswitches and run up and down the stairs like a mad man!