RootCauseunvalidated
Route-specific styling tied to pathname is only easily available client-side (usePathname), while server-only layouts can't directly know the target route without additional routing constructs or dynamic data. Next.js renders layouts on the server for static pages, so coordinating server-rendered <body> classes per route is non-trivial without client code or layout groups.
35136b37-4b5f-4024-a69c-d812fb8a70be
Route-specific styling tied to pathname is only easily available client-side (usePathname), while server-only layouts can't directly know the target route without additional routing constructs or dynamic data. Next.js renders layouts on the server for static pages, so coordinating server-rendered
classes per route is non-trivial without client code or layout groups.