Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

Adopt shared typeset.css for chat markdown - #14

Open
heyinterspace wants to merge 1 commit into
mainfrom
astro/typeset-adoption
Open

Adopt shared typeset.css for chat markdown#14
heyinterspace wants to merge 1 commit into
mainfrom
astro/typeset-adoption

Conversation

@heyinterspace

Copy link
Copy Markdown
Owner

What

Replaces the hand-coded prose typography in the chat renderer with a single, shared typeset.css system, following shadcn/typeset. Add class="typeset" to a container and everything inside (headings, paragraphs, lists, blockquotes, tables, inline code) is styled from one place.

Changes

  • Add app/styles/typeset.css — the shared system. Portable by design: colors default to currentColor and derive muted/border/code tones with color-mix, so it reads correctly on any background. Fonts and colors come from --typeset-* variables, so it inherits each project's look. Three knobs per context: --typeset-size, --typeset-leading, --typeset-flow. Streaming-safe (> * + * spacing). A trailing block maps the variables to exobase's own faces (Archivo / Outfit / Space Mono) and shadcn tokens.
  • app/root.tsx — import and register typeset.css as a stylesheet link.
  • app/components/chat/Markdown.tsx — the message container now carries typeset typeset-chat.
  • app/components/chat/Markdown.module.scss — slimmed to only chat-specific concerns: streaming line breaks (white-space: pre-wrap), artifact spacing, and the shiki code-block frame. All generic prose type now lives in typeset.

Why this is better

  • One source of truth for typography instead of per-component CSS.
  • Fixes a real dark-mode bug: the old table styles hardcoded light cells (#f6f8fa / #dfe2e5) that looked wrong in exobase's dark-only UI. Tables now use theme colors.
  • typeset's streaming design is purpose-built for the assistant chat.

To verify before merge

  • Chat markdown: headings, lists, blockquotes, tables, inline code render as expected in dark mode.
  • Fenced code blocks (shiki via <CodeBlock>) are unchanged and not double-framed.
  • Quick-action buttons and artifacts still render correctly.

Part of a cross-project rollout. The same typeset.css core ships to interspace; the trailing theme block is the only per-project difference (a shadcn registry can formalize this later so it is pulled once, not copied).

Replace the hand-coded prose typography in Markdown.module.scss with the
shared typeset system (app/styles/typeset.css). The chat message container
now carries `typeset typeset-chat`; typeset owns headings, paragraphs, lists,
blockquotes, tables and inline code, mapped to exobase's own faces (Archivo/
Outfit/Space Mono) and shadcn tokens. This also fixes the dark-mode table bug
(hardcoded light #f6f8fa/#dfe2e5 cells) since tables now use theme colors.

Markdown.module.scss keeps only chat-specific behavior: streaming line breaks,
artifact spacing, and the shiki code-block frame.
@github-actions

Copy link
Copy Markdown

ℹ️ Preview deployment not configured

Name Info
Latest commit 30cee4e
Status Preview deployment requires Cloudflare secrets

To enable preview deployments, repository maintainers can add:

  • CLOUDFLARE_API_TOKEN secret
  • CLOUDFLARE_ACCOUNT_ID secret

Built with ❤️ by bolt.diy

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant