Skip to content

style(docs): prose polish, Algolia modal, tabs pill, 404 cards, footer chips#1345

Open
sserrata wants to merge 12 commits into
masterfrom
style/prose-polish
Open

style(docs): prose polish, Algolia modal, tabs pill, 404 cards, footer chips#1345
sserrata wants to merge 12 commits into
masterfrom
style/prose-polish

Conversation

@sserrata

@sserrata sserrata commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

Continues the visual refresh started in #1344. Pure CSS + one small React tweak in the doc footer.

Prose surfaces

  • Blockquotes — subtle gray background, 3px accent border-left, rounded right side.
  • Inline code — lighter tint than pre blocks, subtle border, tighter padding. Scoped to .markdown :not(pre) > code so OpenAPI/Explorer code surfaces are untouched.
  • Admonitions — thinner accent (border-left only), rounded right side, softer dark-mode background. Uses [class*=] prefix matching for the css-module internals so it survives theme version bumps.
  • Prose <details> — same border-left accent + rounded right as admonitions. Scoped away from API-doc details via :not(.theme-api-markdown *).

Headings

  • Scroll-margin — deep links no longer hide under the sticky navbar.
  • Hover anchor polish — the # anchor Docusaurus already reveals on hover now uses gray-500 idle → primary on hover, in both themes.

Code block titles

  • Dark bg + light text in both themes so the title bar visually attaches to the (always-dark) code area below. Rounded top corners match --ifm-code-border-radius.

Tabs → primary-tinted pill

  • Code-language tabs and MIME tabs get rounded corners, muted default color, and an emphasis-100 hover tint.
  • Active tab: primary-blue text + soft primary-tinted background (color-mix), dropping the default underline in favor of the pill.
  • MIME tabs (openapi-docs request-body variants) switched to [class*="mimeTabActive_"] prefix match so it survives openapi-docs version bumps.
  • Response tabs (200/400/etc.) left alone — they already use a primary-outlined pattern that reads well.

Algolia DocSearch modal

  • Rides on top of DocSearch's own --docsearch-* variables so modal/searchbox/footer/kbd all track site tokens (--ifm-color-*, --ifm-background-color) in both themes instead of raw hex.
  • Modal uses --ifm-background-color; overflow: hidden clips the searchbox/footer to the rounded corners so they no longer bleed past the border-radius.
  • Selected result uses a neutral emphasis-200 tint (gray in both themes) instead of a full primary fill — subtler, closer to Spotlight / Raycast conventions. Matched-text <mark> stays primary blue so hits are still easy to spot.
  • Backdrop gets a subtle blur; navbar trigger button picks up the same rounded/bordered treatment as the search input.

404 page

  • Frames the inline DocSearch trigger so it doesn't render as a bare full-width bar mid-sentence.
  • Algolia suggestion rows now render as cards using the shared --pan-card-* tokens for hover consistency with pagination and the homepage.

Footer chip row + FloatingIsland

  • Doc footer's Copy / Edit / Report links become sibling pill chips using the --pan-card-border token and primary-tint hover; flex-wrap + gap so labels never break mid-word. Below the 996px mobile breakpoint they collapse to 36px circular icon-only buttons so all three sit on one row on tablet/phone.
  • FloatingIsland (visible when the footer scrolls off-screen) rewritten as a single glass pill — content-driven width, backdrop blur, per-icon circular hover targets in primary tint. All three legacy width variants share the same treatment.
  • Drops the empty layout column in the footer so the chip row can flex across the full width; neutralizes base styles of the Copy and Issue components so the containing surface (chip row or island) controls color and spacing.

Card tokens (supporting)

  • Adds --pan-card-* variables in :root (radius, border, shadow, shadow-hover, transition, hover-lift) with a dark-theme override that strengthens the border and deepens the shadow. Consumed by the 404 cards and footer chips above; kept minimal so future card surfaces can adopt the same tokens.

OpenAPI fix (scope-adjacent)

  • Schema summary flex — with openapi-docs 5.1.2's new schema-depth toggle, the header's h3/strong was wrapping the "required" chip to a new line. Force nowrap on the header, wrap on the summary itself so the toggle drops below only when there's truly no horizontal room.

Test plan

  • Visual: light + dark mode — blockquotes, inline code, all admonition variants, prose <details> render as expected
  • Visual: fenced code blocks — new dark title bar with rounded top corners
  • Visual: deep-link to a heading anchor — heading sits below navbar with breathing room
  • Visual: code-language tabs + MIME tabs — active state is a primary-tinted pill (no underline); hover state has emphasis-100 tint
  • Visual: open Algolia modal — modal/footer/kbd track site tokens; selected result is neutral gray with primary-blue matched text; backdrop has subtle blur
  • Visual: 404 page — inline DocSearch trigger is framed; suggestion rows render as cards with hover lift
  • Visual: doc footer chip row (desktop) → three pill chips with icons + labels; resize below 996px → chips collapse to circular icon-only buttons on one row
  • Visual: scroll past the footer → FloatingIsland appears as a single glass pill with backdrop blur; hover each icon to see circular primary-tint target
  • Regression: OpenAPI Explorer + API doc pages — inline code, <details>, schema summaries look correct (title + required chip on same line); response tabs unchanged
  • Regression: markdown tables from style(docs): modernize markdown table styling #1344 unchanged
  • Cross-browser: Chrome + Safari

🤖 Generated with Claude Code

@sserrata sserrata requested a review from a team as a code owner July 13, 2026 18:19
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 9ba163f):

https://pan-dev-f1b58--pr1345-rimjixnz.web.app

(expires Wed, 22 Jul 2026 20:10:57 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 9359a9fa100d5fdb082f75280473a90b1f96eb51

@sserrata sserrata changed the title style(docs): modernize prose surfaces (blockquotes, inline code, admonitions) style(docs): prose polish (blockquotes, code, admonitions, details) + code-block title bar + schema summary fix Jul 13, 2026
@sserrata sserrata changed the title style(docs): prose polish (blockquotes, code, admonitions, details) + code-block title bar + schema summary fix style(docs): prose polish, code-block title, sidebar API pills, schema summary fix Jul 13, 2026
sserrata and others added 6 commits July 15, 2026 13:25
…nitions)

Continues the visual refresh started in #1344. Three additions:

- Blockquotes: subtle gray background, 3px accent border-left, rounded
  right side. Matches the muted palette used by the new table style.
- Inline code: lighter tint than pre blocks so it stops competing with
  fenced code, with subtle border and tighter padding. Scoped to
  markdown prose so OpenAPI/Explorer code surfaces are untouched.
- Admonitions: thinner accent (border-left only), rounded right side,
  softer dark-mode background. Selectors use [class*=] prefix matching
  for the css-module admonition internals so they survive theme
  version bumps.

Pure CSS — no component changes.
Round two of the visual refresh. Same file (custom.scss), same theme
as the previous commit — pure CSS, no component changes.

Additions:

- Heading scroll-margin: deep links to h1..h6 no longer hide under the
  sticky navbar. Uses calc(navbar-height + 1rem) for breathing room.
- Heading hover anchor color polish: gray-500 idle, primary on hover,
  in both themes. Docusaurus already handles the opacity/reveal.
- Code block title bar: dark bg + light text in both themes so it
  visually attaches to the (always-dark) code area instead of clashing.
  Rounded top corners match --ifm-code-border-radius. Uses !important
  to defeat CSS-module specificity from Docusaurus.
- Prose <details> polish: border-left accent + rounded right, matching
  the admonition treatment. Scoped to .markdown ... :not(.theme-api-markdown *)
  so API-doc details keep their existing .theme-api-markdown styling
  (the .markdown wrapper is a shared ancestor).
- Schema summary flex fix (openapi-docs 5.1.2): when the schema-depth
  toggle is present, the title's h3/strong was wrapping the "required"
  chip to a new line. Force nowrap on the header, wrap on the summary
  itself so the toggle drops below only when there's truly no room.
Ride on top of DocSearch's own --docsearch-* CSS variables so the modal,
searchbox, footer, and kbd keys all track site tokens (--ifm-color-*,
--ifm-background-color) in both themes instead of raw hex values.

- Modal background uses --ifm-background-color in both themes; overflow:
  hidden clips the searchbox/footer to the rounded corners so they no
  longer bleed past the border-radius.
- Dark-mode overrides scoped to html[data-theme="dark"] .DocSearch to
  match the specificity of DocSearch's own dark block; a :root-level
  selector loses to it.
- Selected result uses a neutral emphasis-200 tint (gray in both themes)
  instead of a full primary-color fill — subtler, closer to macOS
  Spotlight / Raycast conventions. Matched-text <mark> stays primary
  blue so hits are still easy to spot.
- Backdrop gets a subtle blur; navbar trigger button picks up the same
  rounded/bordered treatment as the search input.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Bring code-language tabs and MIME tabs in line with the pill-and-tint
treatment now used by sidebar, TOC, and breadcrumbs so the active state
reads consistently across every navigation surface.

- Every .tabs__item gets rounded corners, a muted default color, and a
  smooth emphasis-100 hover tint.
- Active tab: primary-blue text + soft primary-tinted bg (color-mix),
  dropping the default bottom-border underline in favor of the pill.
- MIME tabs (openapi-docs request-body variants) switched from the
  CSS-module-hashed selector to a [class*="mimeTabActive_"] prefix
  match — survives openapi-docs version bumps.
- Response tabs (200/400/etc.) left alone; they already use a
  primary-outlined pattern that reads well.
- Dropped the dark-mode raw gray-800 !important overrides for tabs
  and MIME tabs — the color-mix + primary vars handle both themes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Frame the inline DocSearch trigger so it doesn't render as a bare
full-width bar mid-sentence, and turn the algolia suggestion rows into
cards using the shared --pan-card-* tokens for hover consistency with
pagination and the homepage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Unify the doc footer's Copy / Edit / Report links as sibling pill
chips using the pan-card border token and primary-tint hover, and
switch to flex-wrap with gap so labels never break mid-word. Below
the 996px mobile breakpoint the chips collapse to 36px circular
icon-only buttons so all three sit on one row on tablet/phone.

The floating island (visible when the footer scrolls off-screen)
is rewritten as a single glass pill — content-driven width, backdrop
blur, per-icon circular hover targets in primary tint. All three
legacy width variants now share the same treatment.

Drop the empty layout column in the footer so the chip row can
flex across the full width, and neutralize the base styles of the
Copy and Issue components so the containing surface (chip row or
island) controls color and spacing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@sserrata sserrata force-pushed the style/prose-polish branch from 4ced4f7 to c48eb1a Compare July 15, 2026 18:27
…4 cards

The footer chip row and 404 result cards reference --pan-card-border,
--pan-card-radius, --pan-card-shadow, --pan-card-shadow-hover,
--pan-card-transition, and --pan-card-hover-lift. Define them in :root
with a dark-theme override that strengthens the border and deepens the
shadow so those surfaces render with the intended elevation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@sserrata sserrata changed the title style(docs): prose polish, code-block title, sidebar API pills, schema summary fix style(docs): prose polish, Algolia modal, tabs pill, 404 cards, footer chips Jul 15, 2026
The nested .menu__list used padding-left: 1.1rem, so the child border
sat ~0.15rem left of the parent chevron's visual center (chevron pseudo
is 1.5rem wide with 1rem of left padding, background-centered → center
lands at ~1.25rem from the item edge). Derive the padding from
--ifm-menu-link-padding-horizontal so the border tracks any future
change to the menu padding token instead of drifting again.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This reverts the calc(var + 0.25rem) attempt. Infima's default
--ifm-menu-link-padding-horizontal is 0.75rem, so the calc resolved to
1.0rem — smaller than the original 1.1rem, shifting the border further
left instead of right. Restore the prior value; a proper fix needs a
browser to verify the target.
Nest padding was 1.1rem, which placed the child border a few pixels
left of the parent caret's visible chevron center. 1.4rem lines them
up. Value chosen empirically — the exact number depends on box-sizing,
the chevron pseudo's background-position, and the outer menu list
padding cascade, so a calc() from any single token would be misleading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant