# Upgrade a site to the Marques design

**Goal:** upgrade a site built on `@recit/site` to the Marques design, see what changes on screen
across every surface, restore a previous look where configuration keys, props or CSS tokens allow
it, and check the built pages in light and dark mode.

The Marques design is the default visual direction of `@recit/site` and `@recit/theme` (there is no
intermediate named theme). Upgrading changes the default neutral palette, corner radii, embedded
fonts, header active state, sidebar chrome, borderless page components, footer alignment, `split`
landing page hero, home page sections, deck cover and toolbar, banners, and single-column reading
layout.

## Shared tokens and fonts

Across the whole site, surfaces move to pure white (`--recit-surface-0`, `--recit-surface-1`) and
`#f2f2f3` (`--recit-surface-2`; dark `#0b0b0f`, `#15151a`, `#1c1c22`), body text and the default
brand move to `#0b0b0f` (`--recit-text`, `--recit-brand`; dark `#fafafa`) with `#55555e` for muted
text (`--recit-text-muted`; dark `#a1a1aa`), corner radii tighten from `10–14px` to `8–10px`
(`--radius: 0.5rem` and `--recit-radius-lg: calc(var(--radius) + 2px)`), and `@recit/theme` embeds
**Red Hat Display** (`--recit-font-heading`), **Red Hat Text** (`--recit-font-sans`) and **Red Hat
Mono** (`--recit-font-mono`) in place of Inter and JetBrains Mono.

**What does not revert, and how to substitute fonts or tokens:**

- **Red Hat is the only bundled font family.** Inter and JetBrains Mono are no longer shipped in
  `@recit/theme/fonts.css`. To keep them on a site via Google Fonts, set `theme.fonts` in
  `recit.config.ts` (`theme: { fonts: { sans: "Inter", mono: "JetBrains Mono" } }`, allowing Google
  Fonts origins when `security.csp` is `"strict"`; setting `theme.fonts.sans` also points
  `--recit-font-heading` back to `var(--recit-font-sans)`). If you load self-hosted `@font-face`
  files in `styles.css` instead, override `--recit-font-sans`, `--recit-font-heading` and
  `--recit-font-mono` together—setting `--recit-font-sans` alone in CSS leaves headings in Red Hat
  Display.
- **Restore the previous neutrals, site aliases and `14px` radius in `styles.css`.** Because
  `--recit-radius-lg` now computes `calc(var(--radius) + 2px)`, setting `--radius: 0.625rem` alone
  stops at `12px`; override `--recit-radius-lg` alongside `--recit-*`, `--secondary` and `--accent`:

```css title="styles.css"
:root {
  --recit-font-sans: "Lorem Sans", system-ui, sans-serif;
  --recit-font-heading: var(--recit-font-sans);
  --recit-font-mono: "Lorem Mono", ui-monospace, monospace;
  --radius: 0.625rem;
  --recit-radius-lg: 0.875rem;
  --recit-brand: oklch(0.21 0.006 285.885);
  --recit-on-brand: oklch(0.985 0 0);
  --recit-focus-ring: oklch(0.705 0.015 286.067);
  --recit-surface-2: oklch(0.967 0.001 286.38);
  --recit-text: oklch(0.141 0.005 285.82);
  --recit-text-muted: oklch(0.552 0.016 285.94);
  --recit-on-surface-1: oklch(0.141 0.005 285.82);
  --secondary: oklch(0.967 0.001 286.375);
  --secondary-foreground: oklch(0.21 0.006 285.885);
  --accent: oklch(0.967 0.001 286.375);
  --accent-foreground: oklch(0.21 0.006 285.885);
}

[data-mantine-color-scheme="dark"] {
  --recit-brand: oklch(0.92 0.004 286.32);
  --recit-on-brand: oklch(0.21 0.006 285.885);
  --recit-focus-ring: oklch(0.552 0.016 285.938);
  --recit-surface-0: oklch(0.141 0.005 285.82);
  --recit-surface-1: oklch(0.21 0.006 285.89);
  --recit-surface-2: oklch(0.274 0.006 286.03);
  --recit-surface-3: oklch(0.21 0.006 285.89);
  --recit-text-muted: oklch(0.705 0.015 286.07);
  --recit-border: oklch(0.274 0.006 286.03);
  --recit-text: oklch(0.985 0 0);
  --recit-on-surface-1: oklch(0.985 0 0);
  --secondary: oklch(0.274 0.006 286.033);
  --secondary-foreground: oklch(0.985 0 0);
  --accent: oklch(0.274 0.006 286.033);
  --accent-foreground: oklch(0.985 0 0);
}
```

## Header and search

When `site.logo.label` is set, the site name appears after the logo images in `--recit-text-muted`
(truncating with an ellipsis on narrow screens), and the active top-navigation tab renders in bold
ink (`--recit-text`, weight `700`) with a `3px` underline while reserving its bold width so adjacent
tabs never shift. Below `30em`, the header search trigger shrinks to a `44 × 44 px` magnifier
button, and matched `<mark>` terms in Pagefind search results render in bold on an `18%` tint of
`--recit-brand` instead of a solid highlight.

The header links are now 16 px, weight 500, and two new options follow the mockups:
`header.placements.tabs: "bar"` puts the tabs in the bar instead of their own row, and
`header.placements.search: "end"` puts the search pill after the links (the magnifier alone below
`80em`). Both are off by default. A site can also tint the background of the header search pill by
setting `--recit-search-bg` and `--recit-search-bg-hover` in its `styles.css` (falling back to
`--recit-surface-2` and `--recit-surface-3`).

The header draws a 1 px bottom rule (`--recit-border`) in light and dark mode; redefine
`--recit-border` on the header (for example to `transparent`) or add a `border-bottom: 0` rule in
`styles.css` to remove it.

**How to keep the previous look:**

- Omit `site.logo.label` in `recit.config.ts` (it is absent by default) to render only the logo
  images, and keep using `header.navigation` and `header.placements` (`search`, `navigation`,
  `tabs`) as before; `@recit/site` adds no format menu bar unless `header.formats` is configured
  ([Header](/theme/header)).
- Tune `--recit-text-muted` and `--recit-brand` in `styles.css` to adjust the logo label color and
  the search `<mark>` tint; the `3px` active underline, bold active tab weight and `44 × 44 px`
  mobile search button do not revert.

```css title="styles.css"
:root {
  --recit-brand: #2563eb;
  --recit-text-muted: #71717a;
}

/* Your sheet sits outside the theme's layer: redefine each token in dark
   mode too, or the light value stays there */
[data-mantine-color-scheme="dark"] {
  --recit-brand: #60a5fa;
  --recit-text-muted: #a1a1aa;
}
```

## Sidebar

The desktop sidebar narrows from `288px` to `272px` (`--side-nav-width: 17rem`) and, together with
the `320px` mobile navigation drawer, now rests on `--recit-surface-2`; the current page sits on a
filled `--recit-surface-0` pill in bold ink (`--recit-text`, weight `700`) instead of
primary-colored text, category rows use regular casing without letter-spacing, and the mobile drawer
adds a `60px` `--recit-surface-0` header with the site name (`site.logo.alt`, `site.logo.label`, or
`site.title`) and a `44 × 44 px` close button. The collapse button on the sidebar edge is now a
`28px` ink circle (`44 × 44 px` click target) placed `20px` from the top by default
(`site.sidebar.togglePosition: "top"`).

The "On this page" table of contents no longer shows a header icon, vertical rail or sliding
indicator; its current entry renders in bold (weight `700`), mixed with the site's primary color
(`color-mix(in oklab, var(--mantine-primary-color-filled) 80%, var(--recit-text))`), while other
entries use `--recit-text-muted`.

**How to keep the previous look:**

- Restore the `288px` desktop sidebar width with `:root { --side-nav-width: 18rem; }` in your site's
  `styles.css`.
- Set `site.sidebar.togglePosition` to `"bottom"` (`85%` from the top, the previous placement) or
  `"center"` in `recit.config.ts`—or set `--sidebar-toggle-y` in `styles.css`—and keep
  `site.sidebar.collapsible` and `site.sidebar.toggleVisibility` (`"always"` or `"hover"`).
- The filled `--recit-surface-0` active pill, non-uppercase section labels, `60px` mobile drawer
  header, and the "On this page" table of contents without its icon, rail or sliding indicator have
  no revert option; note that changing `--recit-surface-2` in `styles.css` affects callouts, code
  blocks and the footer as well as the sidebar.

```css title="styles.css"
:root {
  --side-nav-width: 18rem;
  --sidebar-toggle-y: 85%;
}
```

## Page components

Callouts (`Callout`, `:::tip`, `:::note`…) drop their outer border and `4px` side bar for a
borderless tinted surface (`--recit-info-bg`, `--recit-success-bg`, `--recit-warning-bg`,
`--recit-danger-bg`, or `--recit-surface-2` when neutral) with a bold ink title; code blocks and
table headers (`thead th`) sit borderless on `--recit-surface-2` (with default `github-light` tokens
mixed with `12%` of `--recit-text` for contrast); inline code uses a borderless `6%` tint of
`currentColor` in `--recit-font-mono`; and previous/next pagination links become filled
`--recit-surface-2` cards with no top rule.

**How to keep the previous look:**

- Pick explicit Shiki themes in `syntaxHighlighting.themes` (`light` and `dark` in
  `recit.config.ts`) if you want code blocks to keep their own theme background instead of
  `--recit-surface-2`.
- Override `--radius` and `--recit-radius-lg` in `styles.css` to restore wider corners on callouts,
  code blocks and pagination cards; the removed borders, `4px` callout bar and pagination rule do
  not revert.

```css title="styles.css"
:root {
  --radius: 0.625rem;
  --recit-radius-lg: 0.875rem;
}
```

## Footer

The site footer sits on a borderless `--recit-surface-2` band with no top divider, its link columns
align to the inline start across the full container width with bold ink titles (`--recit-text`), and
the bottom copyright and social row is separated by vertical spacing alone. On a multilingual site
with a footer, the language switcher moves from the header to the footer (`footer-after`), beside
the light/dark switch; on a phone the footer row wraps instead of overflowing.

**How to keep the previous look:**

- Set `position: "center"` in `site.footer` in `recit.config.ts` (and `position: "center"` on
  individual items of `site.footer.columns` when needed) to center the footer columns as before:

```ts title="recit.config.ts"
site: {
  footer: {
    position: "center",
    columns: [
      {
        title: "Lorem",
        links: [{ label: "Ipsum dolor", href: "/lorem" }],
      },
    ],
  },
}
```

- The removed horizontal rules above the footer and above its bottom row cannot be restored through
  configuration.

## Landing page

In the `split` variant of `<LandingPage>`, the `aside` content is now placed inside `<SlantedBlock>`
by default—a full-height block in the site's primary color (`--recit-brand`, or a palette hue
`--recit-hue-<name>` via `color` on `<SlantedBlock>`) with a `15°` slanted leading edge and upright
content inside a `5fr 7fr` desktop grid.

**How to keep the previous look:**

- Pass `slanted={false}` to `<LandingPage variant="split" slanted={false} … />` to render `aside`
  directly without the slanted color block; the default `variant="hero"` is unaffected.
- When `<SlantedBlock>` is kept, its `15°` slope cannot be turned off or flattened; only its fill
  color changes through `--recit-brand` (or `color` / `--recit-hue-<name>`).

```css title="styles.css"
:root {
  --recit-brand: #0f766e;
  --recit-on-brand: #ffffff;
}

[data-mantine-color-scheme="dark"] {
  --recit-brand: #2dd4bf;
}
```

## Home page rhythm

Home pages follow a steady rhythm below the hero. Each section holds one idea: a heading, a short
text, and at most one action. Sections are separated by background, alternating page and surface
(`#f2f2f3` in light mode), edge to edge, never by a rule line. The hero fits in the first screen, at
about 85% of the visible height. Every section below keeps a constant 96 px vertical spacing on
desktop and 64 px on phones, within one screen of content, and direct paragraphs and lists keep
about 70 characters of reading width (`70ch`).

The usual order is: hero, the format in action, the formats, how it works (the code), proof, and a
last call to action. Each site may add bands in its own color, light or solid.

`<PageSection>` (available in MDX and exported from `@recit/site/components`) applies this spacing,
edge-to-edge background and reading width. Pass `label` to name the `<section>` (`region` role via
`aria-label`) and `id` for anchor links; omit `label` for an unnamed `<section>`. Under
`forced-colors: active`, where backgrounds disappear, it adds a `1px solid CanvasText` block border
instead. Bands run edge to edge only on a full-width page: set `fullWidth: true` and `toc: false` in
the front matter of a home page, or the band also paints behind the table of contents column.

```mdx
<PageSection tone="surface" label="How it works">

## How it works

Lorem ipsum dolor sit amet.

</PageSection>
```

| `tone`              | Background and text                                                                                                          |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `"plain"` (default) | Page background (`var(--recit-surface-0)`).                                                                                  |
| `"surface"`         | Surface band (`var(--recit-surface-2)`, `#f2f2f3` in light mode).                                                            |
| `"tint"`            | Light tint of the site color (`var(--mantine-primary-color-light)`).                                                         |
| `"solid"`           | Solid site color (`var(--mantine-primary-color-filled)`), contrast text and links (`var(--mantine-primary-color-contrast)`). |

With `tone="tint"`, `hue` paints the band in the tint of a format instead of the site's color: a
palette hue (`blue`, `sky`, `green`, `violet`…), mixed at 9 % over the page (16 % in dark mode). The
home of recit.dev sets "One source" in blue (`hue="blue"`), "Getting started" in sky (`hue="sky"`)
and "Go further" without a tint (`tone="plain"`):

```mdx
<PageSection tone="tint" hue="sky" label="Getting started">
```

Inside a `<PageSection tone="tint" hue="…">`, links, buttons and accents follow the band's hue
(mixed toward ink to keep a 4.5:1 contrast ratio).

## Deck

In `@recit/deck`, the player toolbar places a `15°` slanted pill in `--recit-hue-blue` (falling back
to `--recit-brand`) before the deck title and uses that accent for the current section and progress
bar. In `@recit/theme/deck.css`, the default `layout=cover` slide aligns its text to the start and
draws a `15°` slanted block in `--recit-deck-accent` on the trailing side—or along the bottom on
`4:5`, `1:1` and `9:16` slides, and hidden when `bg` sets a background—while `layout=section` drops
its background gradient.

On `.slide`, `--recit-deck-accent` is
`var(--recit-theme-primary, var(--recit-hue-blue, var(--recit-brand)))`: the deck format's blue by
default, the theme's primary color when the deck chooses one. The slide lost its border and its
shadow, and sits on a stage read from `--recit-deck-stage` (`--recit-surface-2` in light mode,
`--recit-surface-0` in dark mode). On a desktop window and in fullscreen, the player's `76px` bottom
bar sits in the flow below the slide and stays visible instead of floating over its foot.

Where that bottom bar stays in view with its own progression (a tall window, fullscreen, a deck in a
page, a phone) and under the current slide of the presenter console, the slide's `4px` progress line
(`.slide-progress`) is hidden: the place in the deck is said once. It stays on an embedded deck
whose bar lies over the slide, on a short landscape window and on a deck without controls. It is no
longer printed, so an exported PDF does not carry it.

**How to keep the previous look:**

- Use `layout=center` (`--- layout=center`) on an opening slide when you want centered cover text
  without the slanted block, or set a slide `bg` image, which hides the cover block automatically.
- Override `--recit-brand` (and `--recit-hue-blue` for the player toolbar) on `:root` and
  `[data-mantine-color-scheme="dark"]`—or `--recit-deck-accent` on `.slide` and
  `[data-mantine-color-scheme="dark"] .slide` in `theme.customCss`—to change the accent color; the
  `15°` slope of the toolbar pill and of `layout=cover` (mirrored to `skewX(15deg)` in `rtl`) does
  not revert.
- Show the slide's progress line everywhere again with
  `.slide-progress { display: block !important; }` in `theme.customCss`.

```css title="styles.css"
:root {
  --recit-brand: #1e293b;
  --recit-hue-blue: #1e293b;
}

[data-mantine-color-scheme="dark"] {
  --recit-brand: #cbd5e1;
  --recit-hue-blue: #cbd5e1;
}

.slide {
  --recit-deck-accent: #1e293b;
}

[data-mantine-color-scheme="dark"] .slide {
  --recit-deck-accent: #cbd5e1;
}
```

## Films

In `@recit/motion`, a film that names no theme now takes `marques`: an ink frame, white titles in
Red Hat Display and text in Red Hat Text. Before, it took `warm-editorial` (a cream frame and a
serif). The `marques` theme draws the film's display title at weight `800` via a named theme's
`motion.displayWeight` (`400` otherwise). The default is written once, `DEFAULT_FILM_THEME` of
`@recit/motion`; `@recit/motion-blocks` (`DEFAULT_THEME_ID`), the starter of
`recit init --format motion` and the atlas bridge read it. A film that already names a theme does
not change, and `warm-editorial` stays a named theme.

**How to keep the previous look:** write `theme: warm-editorial` in the front matter of the film, or
set it once for every film of the project in `recit.config.ts`:

```ts
export default defineConfig({
  motion: { theme: "warm-editorial" },
});
```

## Banners

Named `site.banner.color` presets (`info`, `note`, `tip`, `caution`, `danger`) now use the
borderless status surface and text tokens of `@recit/theme` (`--recit-info-bg` and
`--recit-info-text`, `--recit-surface-2` and `--recit-text`, `--recit-success-bg` and
`--recit-success-text`, `--recit-warning-bg` and `--recit-warning-text`, `--recit-danger-bg` and
`--recit-danger-text`) instead of saturated solid fills, while a banner without `color` uses
`--recit-brand` and `--recit-on-brand`.

**How to keep the previous look:**

- Pass a custom CSS color string in `site.banner.color` to keep a solid background, with white text
  in both modes. Do not override the status tokens (`--recit-info-bg` and the others) for a banner:
  callouts and badges read them too.

```ts title="recit.config.ts"
export default defineConfig({
  site: {
    banner: { message: "Lorem ipsum dolor sit amet.", color: "#1d4ed8" },
  },
});
```

## Reading column

On wide screens (`80em` and above), a Markdown or MDX page without a table of contents (`toc: false`
or no headings) now uses a single-column layout instead of reserving an empty right-hand track, so a
centered article (`centered: true` by default) sits in the middle of the page rather than against
its start edge.

**How to keep the previous look:**

- Set `centered: false` in the page front matter or in `docs.defaultOptions.centered` in
  `recit.config.ts` to keep pages without a table of contents aligned to the inline start, or keep
  `toc: true` (the default in `docs.defaultOptions.toc` and front matter) on pages with headings so
  the right-hand table of contents column remains present (`fullWidth: true` still spans the full
  width):

```ts title="recit.config.ts"
docs: {
  defaultOptions: {
    toc: true,
    centered: false,
  },
}
```

## Neutrals: Verre by default

The neutrals of the site chrome now default to Verre (`theme.neutrals`, written on `<html>` as
`data-recit-neutrals`): a very soft field of the site color behind the page, a frosted glass header,
sidebar and footer, the page read on a nearly opaque sheet, and code blocks dark and sharp. Under
`prefers-reduced-transparency`, or without `backdrop-filter`, the glass falls back to opaque
surfaces. A site on the flat named theme `traits` keeps Marques.

`theme.neutrals` is a site option: in a config that sets only `theme` (a deck config, with no site
options such as `navigation` or `publish`), it has no effect. To keep the look of before in your
site's `recit.config.ts`, set the old direction alongside your site options:

```ts title="recit.config.ts"
import { defineConfig } from "recit/config";

export default defineConfig({
  site: { title: "Lorem Ipsum" },
  navigation: [{ type: "doc", file: "index" }],
  theme: { neutrals: "marques" },
});
```

Three other directions can be chosen: `"acier"` (cool grays, an ink footer and dark code blocks on
ink), `"teinte"` (grays with a hint of the site color, a deep footer in that color) and `"console"`
(the header, sidebar and footer always dark on a fine grid). See
[`theme.neutrals`](/documentation/configuration/recit-config).

## Check the result

1. Run `pnpm build` and confirm that your site builds cleanly with no configuration or stylesheet
   error.
2. Open the landing page in your browser and check the header logo, any `<LandingPage>` hero
   (`split` or `hero`), `<PageSection>` bands, and the footer columns.
3. Open a documentation page—including callouts, code blocks, inline code, tables, banners and any
   page with `toc: false`—and check the sidebar, toggle button and reading column alignment.
4. Toggle dark mode on a page (and check any embedded deck) to confirm contrast and custom
   `--recit-*` overrides under `[data-mantine-color-scheme="dark"]`.
