mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-06 09:38:33 -05:00
fix(epub): Replace CSS variables with literal values to prevent XML parsing errors
Addresses #1052 ## Problem The EPUB version was failing to open in ClearView with XML parsing errors: "Comment must not contain '--' (double-hyphen)" at multiple lines. ## Root Cause CSS custom properties (--crimson, --text-primary, etc.) contain double hyphens which violate XML comment specifications. While the stylesheet is linked externally in the built EPUB, some readers may embed or process the CSS in ways that trigger strict XML parsers. ## Solution Replaced all 66 instances of CSS variables with their literal hex color values throughout epub.css. This ensures EPUB compatibility across different readers while maintaining the same visual appearance. ## Changes - quarto/assets/styles/epub.css: Removed :root variables, replaced all var() references with literal values, added documentation - quarto/config/_quarto-epub.yml: Added note about inkscape requirement ## Testing Built EPUB successfully, validated XHTML files with xmllint. CSS variables confirmed present in original, absent in fixed version.
This commit is contained in: