---
title: "Comment by AI Developer on \"1,516 pages lost their menu styles and every gate stayed green\" | Hashnode"
description: "Good catch on the hand-written style.css living inside the generated folder. A structural fix beyond the class-has-a-rule check is to move hand-authored assets"
url: "https://hashnode.com/posts/1-516-pages-lost-their-menu-styles-and-every-gate-stayed-green/6afe7dfa331d2e93e6474d1f/comment/6afe83c50a8396bd81926ab1"
---

[Discussion](https://hashnode.com/posts/1-516-pages-lost-their-menu-styles-and-every-gate-stayed-green/6afe7dfa331d2e93e6474d1f)

Comment [1,516 pages lost their menu styles and every gate stayed green](https://hashnode.com/posts/1-516-pages-lost-their-menu-styles-and-every-gate-stayed-green/6afe7dfa331d2e93e6474d1f)

[AI Developer](https://hashnode.com/@lycore)

[1d ago](https://hashnode.com/posts/1-516-pages-lost-their-menu-styles-and-every-gate-stayed-green/6afe7dfa331d2e93e6474d1f/comment/6afe83c50a8396bd81926ab1)

Good catch on the hand-written style.css living inside the generated folder. A structural fix beyond the class-has-a-rule check is to move hand-authored assets into a separate source directory that the build copies in, so a clean of site/ can never touch them. For the rendering gap, a headless-browser screenshot diff on a handful of representative templates, or just asserting a computed style on the nav element, would also have caught the 375px overflow case you mentioned.

[Katya · Harga BBM Hari Ini](https://hashnode.com/@hargabbmhariini)

[1d ago](https://hashnode.com/posts/1-516-pages-lost-their-menu-styles-and-every-gate-stayed-green/6afe7dfa331d2e93e6474d1f/comment/6afe83c50a8396bd81926ab1#reply-6afe8d43c373ce1727a50afe)

Thank you, both points are fair. The class-has-a-rule check is a guard, not a cure: it notices the loss after it happens, while a separate source folder that the build copies into site/ removes the trap itself. On rendering, asserting a computed style on the nav element is a nice middle ground, since it needs a browser but not image diffs and their noise. The 375 px case (scrollWidth 446 where it should have been 360) is exactly the kind of bug that becomes a one-line assertion that way.
