Documents

Code windows

One source window with named tabs, a fitted selection and an accessible copy action.

The complete source

<article class="p-card r-card b(1) b-solid b-line-divider bg-surface-raised fg-text-body">  <p class="m(0) font-mono text-xs fg-brand">FIELD NOTES / 024</p>  <h2 class="mt-sm mb-xs text-xl font-medium fg-text-strong">Room for the details</h2>  <p class="m(0) text-sm">Color, spacing and radius come from three shared project tokens.</p></article>

One palette across languages

Keywords, names, properties and values keep the same visual roles in light and dark. Comments stay quiet and readable.

// A small, reusable componenttype CardProps = { title: string; featured?: boolean }export function Card({ title, featured = false }: CardProps) {  const count = 3  return (    <article className="p-lg r-lg bg-surface-raised">      <h2>{title}</h2>      <p data-featured={featured}>{count} new ideas</p>    </article>  )}

Used on the Theme guide.

Usage and interface

The shared code window keeps source text, tab names and copy feedback together. Switch tabs with arrow keys; the selected insert keeps a stable width.

A bar appears only when it carries information: tabs that switch between sources, a real file path, or the two labels of a before/after pair. Do not name a block after its language (HTML, CSS, TypeScript) or its tool (Terminal, prompt); a lone block keeps the corner copy and no bar.

Copy shows a pending request and confirms success after the clipboard write finishes. Repeating the action while it is pending keeps one request. If you switch tabs during a write, the confirmation still names the source you copied. A denied write leaves the source selectable and explains how to copy it manually.

#Block code

<!-- A readable card in either appearance --><article class="p-lg r-lg bg-surface-raised">  <h2 class="text-2xl fg-text-strong">A place for ideas</h2>  <a class="fg-text-blue:hover@sm" href="https://rc.css.master.co/guide">Explore the guide</a></article>

#CSS and Master CSS directives

/* Shared tokens and native CSS use the same palette. */@theme {  --font-family-sans: "Inter";  --color-brand: #3764a5;  --spacing-card: 1.5rem;  --radius-card: 0.75rem;  --color-surface-card: light-dark(    var(--color-zinc-0),     var(--color-zinc-95)   );}@utility card {  padding: var(--spacing-card);  color: var(--color-brand);}.card:hover {  opacity: 0.85;  transform: translateY(-2px);}@safelist "p-lg fg-text-blue:hover@sm";

#Inline code

#Plain text

app/  globals.css  components/    Card.tsx

#Code lines added and removed

console.log('hewwo') console.log('hello') console.log('goodbye')

#Code line highlight

console.log('hewwo')console.log('hello') console.log('goodbye')

#Code line focus

console.log('hewwo')console.log('hello') console.log('goodbye')

#Code mark words

const foo = 'bar'

#Warning and error marks

<p class="(font-size:12px)">Review the text size.</p>
<p class="unknown-utility">Check the class name.</p>