Skip to content

Print-friendly stylesheet for classroom distribution #30

@bster

Description

@bster

Problem

Educators may want to print individual sections as handouts or PDFs for students. The current site renders poorly when printed — the sticky nav, indigo backgrounds, and screen-optimized layout don't translate to paper.

Suggested approach

Add a @media print block (inline in index.html's <style> tag or as a separate print.css) that:

  • Hides the nav, footer, <Arrows> navigation, and <TryIt> blocks (or renders TryIt prompts as plain block quotes)
  • Expands all accordions (override display: none on closed panels)
  • Sets text to black on white, removes background colors
  • Forces single-column layout at full width
  • Shows the full URL next to each <Ref> link (using CSS a::after { content: " (" attr(href) ")"; })
  • Adds a printed-at URL/date in the footer using @page margin content

Scope note

This is a CSS-only change with no React modifications needed. A @media print stylesheet in index.html or Vite's CSS pipeline would suffice.

Acceptance criteria

  • Ctrl+P / Cmd+P on any section page renders a clean, readable single-column layout
  • Accordion content is fully visible (not collapsed)
  • External links show their full URL
  • Nav and interactive chrome are hidden

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions