From 90e1bc4552d353ebe8105028a43813e1d561aa4f Mon Sep 17 00:00:00 2001 From: hiyouga Date: Wed, 20 May 2026 13:51:59 +0800 Subject: [PATCH] docs: add html2canvas export notes --- AGENTS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 45da681..58f4674 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -70,6 +70,8 @@ This is the reusable content component layer. ## `src/styles/` - `global.css`: Global styles, theme variables, slide layout, reusable block styling, top-right abstract mark styling, and export canvas styling. +- Avoid modern CSS color functions in export-visible pseudo-elements because `html2canvas` cannot reliably parse computed values such as `color(srgb ...)`; use `rgb(...)`, `rgba(...)`, or hex instead. +- Avoid small standalone SVG connector graphics in export-visible slide content because `html2canvas` may drop them during PDF export; prefer full-region SVG overlays with paths positioned in the shared viewBox. Theme styling is mainly controlled through CSS variables: