Astro Components
Type to search documentation.

Styling

Match components to your site with Prosefly CSS tokens.

The components ship with fallback styles, but production documentation should set shared tokens in the site shell. This keeps callouts, cards, tabs, badges, and file trees aligned with the surrounding typography, colors, and radius.

Set tokens on :root for a full documentation site. Set them on a layout wrapper if only one section should use the Prosefly visual system.

:root {
--pl-text-strong: #18181b;
--pl-text: #3f3f46;
--pl-text-muted: #71717a;
--pl-background: #ffffff;
--pl-surface: #fafafa;
--pl-accent: #059669;
--pl-accent-soft: #d1fae5;
--pl-accent-contrast: #ffffff;
--pl-info: #2563eb;
--pl-info-soft: #dbeafe;
--pl-info-ink: #1d4ed8;
--pl-info-contrast: #ffffff;
--pl-success: #059669;
--pl-success-soft: #d1fae5;
--pl-success-ink: #047857;
--pl-success-contrast: #ffffff;
--pl-warning: #d97706;
--pl-warning-soft: #fef3c7;
--pl-warning-ink: #92400e;
--pl-warning-contrast: #1c1917;
--pl-danger: #dc2626;
--pl-danger-soft: #fee2e2;
--pl-danger-ink: #b91c1c;
--pl-danger-contrast: #ffffff;
--pl-border-subtle: #e4e4e7;
--pl-border-muted: #d4d4d8;
--pl-font-sans: ui-sans-serif, system-ui, sans-serif;
--pl-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
--pl-radius-sm: 0.25rem;
--pl-radius-md: 0.5rem;
--pl-radius-lg: 0.75rem;
--pl-radius-full: 999px;
}

Token Reference

TokenUsed For
--pl-text-strongHeadings, card titles, active labels
--pl-textBody text
--pl-text-mutedSupporting text, comments, inactive states
--pl-backgroundPage or article background
--pl-surfaceTabs, cards, and subtle grouped surfaces
--pl-accentFocus rings, active states, accent icons
--pl-accent-softSoft accent backgrounds
--pl-accent-contrastText placed on solid accent backgrounds
--pl-{info|success|warning|danger}Shared semantic colors
--pl-{info|success|warning|danger}-softShared semantic soft backgrounds
--pl-{info|success|warning|danger}-inkShared semantic icon and label text
--pl-{info|success|warning|danger}-contrastText placed on solid semantic backgrounds
--pl-callout-{note|tip|warning|danger}-{color|ink|bg}Type-specific callout overrides
--pl-border-subtleComponent borders
--pl-border-mutedActive tabs and hover borders
--pl-font-sansProse and UI labels
--pl-font-monoFile trees and code-adjacent labels
--pl-radius-smSmall controls
--pl-radius-mdButtons, triggers, compact surfaces
--pl-radius-lgCards, callouts, tabs, file trees
--pl-radius-fullPills and badges

Component Tokens

Use component tokens when a site needs layout-level tuning beyond the shared palette.

TokenUsed For
--pl-card-paddingCard inner spacing
--pl-card-layout-gapSpace between card icon and body
--pl-card-body-gapSpace between card title and content
--pl-card-icon-sizeCard icon container size
--pl-card-icon-glyph-sizeIcon size inside card icon containers
--pl-card-title-sizeCard title font size
--pl-card-title-line-heightCard title line height
--pl-card-content-sizeCard body font size
--pl-card-content-line-heightCard body line height
--pl-card-content-gapSpace between multiple body children
--pl-card-grid-gapSpace between cards in a CardGrid
--pl-card-grid-marginVertical margin around a CardGrid
--pl-file-tree-borderFile tree outer border
--pl-file-tree-lineFile tree connector lines
--pl-image-gallery-preview-widthVisible preview width for the next gallery image
--pl-image-gallery-ratioFallback gallery item aspect ratio before images are measured
--pl-steps-bullet-sizeStep marker size
--pl-steps-bullet-marginGap below a step marker before the connector line starts
--pl-steps-lineStep connector line color
--pl-steps-marker-backgroundStep marker background
--pl-steps-marker-foregroundStep marker text color
--pl-steps-startCounter starting offset for step numbering
Themeable

Lotus Projects

Lotus maps its design system to the same component expectations. In a Lotus site, start with src/theme.config.ts for accent, gray, radius, and color mode choices. Use custom CSS only when you need lower-level control than the theme configuration provides.

Last updated Jul 18, 2026