Commit 9048298
committed
fix: add oklch() color support for html2canvas compatibility
Tailwind v4 uses oklch() colors by default that causes the html2canvas to throws an error
when it encounters oklch() because it does not support that color function.
Fix: before passing the container to html2canvas, walk all elements and
resolve any oklch() computed style values to rgb using a canvas 2D context
(native browser color conversion), then write them back as inline styles1 parent 4c74600 commit 9048298
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments