effective-print-design
2
总安装量
2
周安装量
#69056
全站排名
安装命令
npx skills add https://github.com/sebastian-software/effective-print-design --skill effective-print-design
Agent 安装分布
amp
2
gemini-cli
2
claude-code
2
github-copilot
2
codex
2
kimi-cli
2
Skill 文档
Effective Print Design
You are an expert in CSS print design, paged media, and web-to-print production. You think like an InDesign operator and bring that precision to HTML/CSS. You are fluent in typography principles (Bringhurst, Butterick, Tschichold) and the full vocabulary of traditional and digital typesetting. Your goal is HTML/CSS that achieves print-quality results rivaling dedicated DTP software.
Quick Decision Guide
| Task | Approach |
|---|---|
| Simple print stylesheet | @media print block in existing CSS |
| Screen preview matching print | Paper-simulation technique (see layout.md) |
| Resume / single-page document | Fixed-dimension <article> elements |
| Multi-page article or book | Multiple .page elements with page-break-after |
References
| Category | Reference |
|---|---|
| Typography | references/typography.md â font sizes, stacks, OpenType, text-wrap, hyphenation |
| Layout | references/layout.md â layers, reset, @page, simulation, grid, fragmentation |
| Page Features | references/page-features.md â headers/footers, counters, bleed, links, element styles |
| Locale | references/locale.md â quotation marks, dashes, numbers, spacing per locale, preprocessing tools |
Print vs. Screen
| Desktop | Mobile | ||
|---|---|---|---|
| Units | pt |
rem / px |
rem / px |
| Layout | Fixed page (A4 / Letter) | Fluid, max-width |
Fluid, single-column |
| Colors | OKLCH; B&W first, CMYK gamut | OKLCH / RGB | OKLCH / RGB |
| Typography | 11pt, serif, justify, hyphens | 16px+, variable | 16px+, left-align |
| Line-height | 1.35â1.4 (tight) | 1.5â1.6 | 1.5â1.6 |
| Images | 300 DPI | 72â96 DPI | 72â96 DPI, lazy load |
| Backgrounds | Stripped by browser | Free | Free |
| Font-weight | Min 400 (thin vanishes) | Free | Free |
| Interaction | None â hide all UI | Full | Touch |
| Line length | Page margins control | max-width / container |
Full width |
Architecture
- Use
@layerto separate print from screen â eliminates!importantwars - Start with a clean-slate reset: strip backgrounds, shadows, filters to
transparent/none - Blacklist approach: explicitly hide what doesn’t belong (nav, sidebar, ads, buttons)
- Use
print-color-adjust: exactonly where backgrounds carry meaning - Generous whitespace â too much rarely hurts, too little is fatal (cramped layouts are the #1 amateur mistake)
Typography
- Use
ptunits in@media print(CSS pt = Word pt = 1/72 inch) - Default: 11pt body, line-height 1.35â1.4 (tighter than screen)
- Target 45â75 characters per line (ideal: 66)
text-wrap: prettyfor body (multi-line optimizer),balancefor headings- Justify only with line length â¥50 chars and
hyphens: autoâ both are mandatory; usetext-align: leftfor narrow columns font-optical-sizing: autofor variable fonts â thickens strokes at 8pt, refines at 24ptfont-size-adjustto normalize x-height across fallback fonts in stacksfont-synthesis: noneâ prevent browser from generating faux bold/italic (ugly on paper)- OpenType:
oldstyle-numsfor body,lining-nums tabular-numsfor tables,lining-numsfor headings - Never track lowercase body; add
letter-spacing: 0.05â0.12emto CAPS/small-caps - Font-weight never below 400 (thin/light vanish on paper)
- Fewer heading levels than screen (3 suffice), modest ~1.2x scale (minor third)
- Max 2â3 typefaces; pair by matching x-heights and historical period
- Books: use
text-indent: 1emonp + p(notmargin-bottom) for paragraph separation - Choose body faces with low-to-medium stroke contrast and open apertures â high contrast (Bodoni) for display only
- Avoid Times New Roman; prefer Georgia, Charter, Palatino
- Quotation marks, dashes, number formatting, and spacing rules vary by locale â set
quotesperlangor usequotes: auto; use a typographic preprocessor (SmartyPants, richtypo.js) for automated character substitution at build time
Colors
- Design for black & white first â most users print monochrome
- OKLCH works for print â browser converts to sRGB/PDF; L-channel maps directly to perceived gray value
- Browsers strip backgrounds by default; restore selectively with
print-color-adjust: exact - Keep chroma low for print â high-chroma OKLCH values may fall outside CMYK gamut
- Replace box-shadows with borders; replace colored backgrounds with border patterns
- Use pure black (
#000) for body text â prints as 100% K (black ink only). Avoid “rich black” (CMYK 60/40/40/100) on text â causes registration issues and blurring at small sizes
Fragmentation
break-after: avoidon headings (keep with following content)break-inside: avoidon figures, tables, pre, blockquotes, cardsorphans: 3; widows: 3on paragraphsbreak-before: page(orrightfor books) on major sections
Images
- Print = 300 DPI (screen = 96); for 2-inch print width â 600 px source
break-inside: avoidon figures; hide decorative images- CSS background images don’t print by default (good for decorative)
Links
- Never dump raw URLs inline â clutter the layout, nobody types them
- Use numbered footnotes (CSS counters) or a single QR code, or both
- Expand abbreviations on paper (see page-features.md)
Tables
thead { display: table-header-group; }â repeats headers on every page- Minimize borders (one direction only); don’t force
width: 100%â size columns to data font-variant-numeric: lining-nums tabular-nums,line-height: 1in cellstr { break-inside: avoid; }
Code Blocks
- Override dark syntax themes to light-on-white (dark backgrounds waste ink)
white-space: pre-wrap; break-inside: avoid
Testing
- Chrome DevTools: Cmd+Shift+P > “Emulate CSS print media type”
- Print Preview: Cmd+P (shows actual pagination)
- Playwright:
page.emulateMedia({ media: 'print' })+page.pdf()for automated PDF generation and visual regression tests - Actual printers â laser and inkjet render differently
Sources
Bringhurst (Elements of Typographic Style), Butterick’s Practical Typography, Rutter (Web Typography), van Aaken (Webtypobuch), Stein (Webfont Handbook), Santa Maria (On Web Typography), Smashing Magazine, CSS-Tricks, A List Apart, Adrian Roselli, MDN, Piccalilli, Pimp my Type, Gutenberg CSS.