Skip to content

fix(docs): give the API page its own frame - #42

Merged
LKSNDRTMLKV merged 1 commit into
stagingfrom
fix/api-page-frame
Oct 27, 2026
Merged

LKSNDRTMLKV merged 1 commit into
stagingfrom
fix/api-page-frame

Conversation

@LKSNDRTMLKV

Copy link
Copy Markdown
Member

Summary

/api on staging showed a white border around the reference: the browser's default 8px body margin, with no background behind it. The page now sets its own body margin and background instead of relying on Scalar's reset.

Cause

The dependency upgrade in #38 moved @scalar/api-reference from 1.62.5 to 1.76.0. Up to 1.62, Scalar's stylesheet reset body globally (margin: 0, background-color: var(--scalar-background-1)). From 1.76 that reset is body.scalar-app inside @layer scalar-base, and this page's <body> has no scalar-app class, so neither rule applies. Production still runs 1.62 and is unaffected.

Changes

  • scalar-api-reference.css: an unlayered body { margin: 0; background-color: var(--scalar-background-1); }. The body already carries .light-mode or .dark-mode, where the token is defined, so the background follows the current mode.

Checklist

  • pnpm --filter dpp-docs build
  • Checked in a local preview of the build, both modes: body margin is 0px; the dark background is rgb(23, 24, 28), the same as production; the light background matches Scalar's own; the header sits at the top-left corner
  • No secrets, credentials, or .env files in the diff
  • Founder review on the branch preview

Signed-off-by: chillin_since_26 <aleksandar.temelkov@live.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying odal-node-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: aa733bb
Status: ✅  Deploy successful!
Preview URL: https://e6d8d4db.odal-node-docs.pages.dev
Branch Preview URL: https://fix-api-page-frame.odal-node-docs.pages.dev

View logs

@LKSNDRTMLKV
LKSNDRTMLKV merged commit 2550e9b into staging Oct 27, 2026
2 checks passed
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