AI, CSS, and Accessibility

I used GitHub Copilot to help create a custom dark theme for a MkDocs Material site. Copilot did a good job interpreting CSS selectors (the rules that target specific HTML elements for styling), but the resulting theme’s accessibility was poor. Even when I nudged it toward better choices, some text ended up barely readable with low contrast to the background. I took this on as an experiment because I’m not great at choosing color palettes, the MkDocs Material theme exposes a lot of selectors for customization, and I’ve built a custom dark theme for MkDocs before and remember it being tricky. After sharing the experience on LinkedIn, I found I wasn’t alone. Others had run into similar issues but were able to improve things with trial and error. ...

June 26, 2025 · 4 min · Chris Grobauskas