Unify document artifact backgrounds to the off-white content color

markdown/html_fragment (report, tasks, base themes) and the json/csv viewers
each used their own near-white background (cream #fffaf0, light-blue
#f7fbff, or plain white). They now all use #faf9f6 — the same off-white the
preview area uses for image/binary artifacts — so browsing across kinds is
visually consistent.

Left as-is on purpose: deck (intentional dark slide background; switching it
would require reworking its light text colors), html_full (served verbatim,
poster owns styling), and pdf (the browser's own viewer chrome). Existing
json/csv artifacts keep their baked-in #fffaf0, which is visually
indistinguishable from #faf9f6; only new ones get the exact value.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
peter 2026-09-03 13:30:36 +01:00
parent 5fd97a29a1
commit 95b159c0df
4 changed files with 5 additions and 4 deletions

View file

@ -840,7 +840,7 @@ def wrap_json_viewer(content, title, request):
<title>{html.escape(title)}</title> <title>{html.escape(title)}</title>
<script src="{renderjson_src}"></script> <script src="{renderjson_src}"></script>
<style> <style>
body {{ margin: 0; padding: 1.2rem; background: #fffaf0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; }} body {{ margin: 0; padding: 1.2rem; background: #faf9f6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; }}
</style> </style>
</head> </head>
<body class="artifact"> <body class="artifact">
@ -884,7 +884,7 @@ def wrap_csv_viewer(content, title, request):
<link rel="stylesheet" href="{gridjs_css}"> <link rel="stylesheet" href="{gridjs_css}">
<script src="{gridjs_js}"></script> <script src="{gridjs_js}"></script>
<style> <style>
body {{ margin: 0; padding: 1.2rem; background: #fffaf0; }} body {{ margin: 0; padding: 1.2rem; background: #faf9f6; }}
</style> </style>
</head> </head>
<body class="artifact"> <body class="artifact">

View file

@ -1,4 +1,5 @@
body.artifact { body.artifact {
background: #faf9f6;
box-sizing: border-box; box-sizing: border-box;
color: #1d2528; color: #1d2528;
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

View file

@ -1,7 +1,7 @@
@import url("/static/themes/base.css"); @import url("/static/themes/base.css");
body.artifact { body.artifact {
background: #fffaf0; background: #faf9f6;
color: #1e2b2f; color: #1e2b2f;
font-family: Georgia, "Times New Roman", serif; font-family: Georgia, "Times New Roman", serif;
font-size: 1.08rem; font-size: 1.08rem;

View file

@ -1,7 +1,7 @@
@import url("/static/themes/base.css"); @import url("/static/themes/base.css");
body.artifact { body.artifact {
background: #f7fbff; background: #faf9f6;
color: #17202a; color: #17202a;
max-width: 760px; max-width: 760px;
} }