- Added secondary FAB button 'Печать' with printer icon (window.print)
- Created printer.svg icon for the print button
- Added .fab-secondary__ico--print CSS class
- Fixed html2pdf color-mix() issue: buildCleanClone() creates a deep clone
with all computed styles inlined, all stylesheets removed, and
pseudo-elements converted to real DOM elements before passing to html2pdf
- Two separate handlers: pdfBtn for download, printBtn for print dialog
html2canvas (bundled in html2pdf.js) can't parse CSS color-mix()
function regardless of onclone workarounds. Using window.print()
which leverages the browser's native renderer with full CSS support.
In Chrome/Edge the print dialog defaults to 'Save as PDF' destination.
- Delete all CSS rules via sheet.deleteRule(0) loop (not just clear textContent)
- Remove all <style> and <link rel=stylesheet> elements from clone
- Convert ::before/::after pseudo-elements into real DOM elements with inline styles
- All computed styles inlined on every element in the clone
- This ensures html2canvas never encounters color-mix() in any stylesheet
Previous flattenColors approach failed because html2canvas reads CSS
rules from stylesheets, not computed styles. Now in the onclone callback:
1. Walk all elements, get computed styles from original doc
2. Set every property as inline style on cloned elements
3. Remove all <style> tags and <link rel=stylesheet> from clone
This ensures html2canvas never encounters raw color-mix() in stylesheets.
html2canvas can't parse CSS color-mix() function. Before rendering,
walk the DOM tree and inline computed styles (with color-mix resolved
by the browser) as inline styles. Restore originals after save.
- New partial fab-stack-resume.html with PDF download button
- Button shows spinner during PDF generation
- Photo converted to dataURL before rendering
- html2pdf.js loaded from CDN on first click only
- CSS for fab--pdf button and loading spinner