Skip to content

Reading theme: a class idiom for terminal output #6541

Closed

Description

@max-sixty

The reading theme has no idiom for a command and what it printed, so a page that shows terminal output styles its own.

What happens

The two ready-made choices both read as source code. A plain <pre> gives the command and its output the same weight. lf-code adds line numbers and line notes, which suit a walkthrough of a source file and get in the way of four lines of shell output. Neither sets the command apart from its output, marks where long output was cut, or points at the one line the reader should notice.

On a release note that demonstrates a command-line tool, I wrote about 40 lines of page CSS for a pre.terminal: a framed block with a window's title bar, each command in bold, a muted line where output was cut, and a highlight on the part to notice. The markup stayed plain HTML:

<figure id="status-run">
  <pre class="terminal"><b>$ git status --short</b>
 M README.md
<i>…</i>
?? <mark>notes.txt</mark></pre>
  <figcaption>One file changed and one is new.</figcaption>
</figure>

What I expected

A class idiom in the reading theme's registry, beside .callout: pre.terminal, with <b> for a command, <i> for a cut and <mark> for what to notice. A page showing terminal output would then need no CSS of its own, and such pages would look alike.

Two details mattered on the page I built. Long lines wrap, since terminal output that scrolls sideways is unreadable on a phone. And a reader who copies the block usually wants the commands and not their output.

Seen on leaf e620668, installed 2026-11-19T11:34:17-08:00.

This was written by Claude Code on behalf of max-sixty

Activity

  1. added
    enhancement
    on Nov 19, 2026
  2. leaf-agent commented on Nov 19, 2026

    @leaf-agent
    Collaborator

    #6542 adds pre.terminal to the reading theme's registry beside .callout, using the markup from this issue as the entry's example. <b> marks each command, <i> a cut in the code's muted ink, and <mark> the part to notice in the accent's tint. Long lines wrap. The PR has before and after pictures in both colour schemes.

    It leaves two things for you to decide:

    • Copying only the commands. A theme is CSS, so this would need either a script that rewrites the clipboard or output the reader can't select, and unselectable output can't take a comment.
    • The window title bar.

    The theme and layer tests pass. Its CI and review are still pending.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions