#CSS

CSS only dark mode - made simple in 2023

Author's picture
Lindus One
Author
Lindus One
Publication date:
last update:

A short guide about building dark/light mode (theme) comprising prefers-color-scheme property and the ability for the user to manually override. Properly structured HTML, CSS custom properties in respective scope, two radio buttons, SVG icons, and general sibling combinator will do the job! This is CSS-only approach.

Zooming image (simple lightbox - medium.com style)

Author's picture
Lindus One
Author
Lindus One
Publication date:
last update:

∼ 20 lines of vanilla javascript with no additional libraries, and we have image zooming similar to medium.com with a fallback when javascript is not present. A few zoom alternatives transition styles. Ultra light lightbox as an example of combining javascript with CSS.