Commits
Tarun Sukhani authored aa65a8d04e2
fix: style the dev-mode error pages
The 404 and 500 error pages rendered as raw, unstyled HTML. Not a missing
asset: the framework's error tags emit Tailwind-classed markup
(templates/tags/404.html uses "p-5 border-b border-gray-400 bg-yellow-100",
tags/500.html the red variant), and those classes are present in the shipped
play-tailwind.css -- the tailwind build already scans framework templates. What
was missing is a link to it. The error views are standalone documents that do
not go through main.html, and their <head> carried only a title and a charset
meta, so the classes had no stylesheet to resolve against.
Only templates/tags/welcome.html linked play-tailwind.css, which is why the
scaffolded home page looked right while every error page did not.
Adds the link to all four error templates -- the two the skel scaffolds into an
application and the two framework fallbacks used when an application has none.
Scoped to the DEV branch on purpose, not added unconditionally to <head>.
play-tailwind.css ships Tailwind's preflight, whose h1..h6 { font-size: inherit }
would have stripped the prod branch's plain <h1>Not found</h1> of its heading
styling -- making production error pages worse while fixing development ones.
The condition mirrors the one already wrapping the tags themselves.
Verified against a scaffolded app from the built distribution: the dev 404 and
500 now render with their intended header bands, and the 500 gets its
syntax-highlighted source excerpt; the prod 404 emits no stylesheet link at all
and is byte-for-byte the plain page it was before. Both the skel views and the
framework fallbacks were exercised, the latter by deleting the application's own
error views.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JTvjeSmGVe7RFyx8ZJXRAx