A lot of people looking for a criminal defense lawyer are reading at night. Someone gets a call from the county jail at 2 a.m. and starts searching on a phone that has been set to dark mode for months. When they tap a result and land on a bright white page, the contrast is harsh enough that some readers back out before reading the first line.
Supporting dark mode on a law firm site is a small project. Done badly, it produces gray text on gray backgrounds, invisible logos and phone buttons that disappear. This article covers how to build it with plain CSS, how to keep it readable, and which parts of a law firm site need special attention.
Start with color tokens
The cleanest approach is to define every color once as a custom property and swap the values in a prefers-color-scheme media query.…