css-print
它能做什么
这项技能帮助为网页样式创建打印版本。适合希望打印页面整洁、易读的开发者。
适用场景
- ✓当访客经常打印你的文章、指南或收据时。
- ✓当打印页面上出现了纸质版上没有用的菜单、广告或按钮时。
- ✓当你希望打印页面上的文字易于阅读时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/css-print/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“当有人打印我的网页时,你能让它看起来整洁一些吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会添加专门针对打印的规则,隐藏纸质版上不需要的内容,并调整字体和间距。它还会让有用的链接在打印版中保持可读。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Include a print stylesheet
Print stylesheets ensure content is readable when printed—removing digital clutter and optimizing for paper saves ink and improves accessibility.
Quick Reference
- Use @media print for print-specific styles
- Hide navigation, ads, and interactive elements with .no-print
- Use serif fonts at 12pt and optimize page breaks
- Show full URLs for external links in printed output
Check
Verify that a print stylesheet is provided and properly optimized for printed pages with appropriate typography, layout, and hidden elements.
Fix
Create a print stylesheet that removes unnecessary elements, optimizes typography for print, and ensures content is readable when printed.
Explain
Explain how print stylesheets improve user experience for printed pages by optimizing layout, removing digital-only elements, and ensuring readability.
Code Review
Review stylesheets, component styles, and responsive states related to Include a print stylesheet. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
常见问题
打印网页时哪些内容会被隐藏?
导航菜单、广告和按钮等内容可以被隐藏。具体列表取决于你的页面。
我需要单独的打印页面吗?
不需要。打印规则位于同一个样式表中,只在打印时生效。
纸质版上会显示网址吗?
这项技能建议在打印输出中显示外部引用的完整链接,方便读者以后查找。
详情
作者的原始描述
Use when reviewing stylesheets, component styles, and responsive behavior related to Include a print stylesheet. Check the rendered layout across breakpoints and interaction states before proposing a fix.
热度
- GitHub 星标
- 75k
- 排名
- #2803
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。