screenshot of a toggle switch on codepen
screenshot of a toggle switch on codepen

Based on input element type checkbox, styled with CSS pseudo-elements ::before and ::after and pseudo-class :checked

Goal


Two Powerpuff Girls avatars of the author, overlapped by little code snippets
Two Powerpuff Girls avatars of the author, overlapped by little code snippets

and dusted off my Photoshop skills along the way

What changed?

Elly Pirelly

Frontend Engineer. Berlin.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store