Saying Goodbye to CSS Classes: Building a Classless Website

2025-09-18
Saying Goodbye to CSS Classes: Building a Classless Website

Following a previous post advocating for leveraging browser built-in elements, the author put this philosophy into practice by completely removing all CSS classes from his personal website. He experimented with more granular default styles, nested selectors, modern CSS features like `:where()` and `:has()`, and custom elements and attributes as replacements. While this requires more careful planning and isn't suitable for all projects, the experiment led the author to question the necessity of CSS classes and has had a lasting influence on his future work. A small concession was made for a syntax highlighting plugin which utilizes classes.

Read more
Development Custom Elements