Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isue with DaisyUI plugin #3130

Open
dovaldev opened this issue Nov 15, 2023 · 15 comments
Open

Isue with DaisyUI plugin #3130

dovaldev opened this issue Nov 15, 2023 · 15 comments

Comments

@dovaldev
Copy link

dovaldev commented Nov 15, 2023

Bug reports:

I have been using html2canvas for a while and everything was working fine, until I tried DaisyUI and then I started having a rendering issue with the color. If you use that library, you will encounter problems when generating the canvas:

Attempting to parse an unsupported color function oklch ...

Specifications:

  • html2canvas version tested with: 1.4.1
  • Browser & version: Las version Chrome
  • Operating system: Android and MacOS
@thelfensdrfer
Copy link

The unsupported color function is oklch. Don't know why you decided to leave out the most important part 😉

@aksar9211
Copy link

Facing the same issue.

Have you got any workarounds?

@dovaldev
Copy link
Author

dovaldev commented Dec 1, 2023

The unsupported color function is oklch. Don't know why you decided to leave out the most important part 😉

Updated. Thanks! :)

@dovaldev
Copy link
Author

dovaldev commented Dec 1, 2023

Facing the same issue.

Have you got any workarounds?

I uninstalled DaisiUI and installed another alternative Tailwind library.

@thelfensdrfer
Copy link

Have you got any workarounds?

The best solution I could come up with was using a simplified stylesheet without daisyui. So same as @dovaldev.

@aksar9211
Copy link

I've downgraded the DaisyUI version from 4x to 3.9.4. Now everything is working fine.

@iyansr
Copy link

iyansr commented Dec 5, 2023

I've downgraded the DaisyUI version from 4x to 3.9.4. Now everything is working fine.

Thanks, working for me

@brerdem
Copy link

brerdem commented Dec 28, 2023

When I installed 3.9.4 instead of 4.x, it worked for me too but it would be great if the maintainers add support for new color specs. Downgrading isn't an ideal solution

@yosefebrahimi7
Copy link

hi please help me toooo!

**Uncaught (in promise) Error: Attempting to parse an unsupported color function "oklch"**

@semiautomatix
Copy link

Really? DaisyUI is basically my only option?

@sksizer
Copy link

sksizer commented Feb 22, 2024

I have got a branch that has a patch applied in source code that deals and converts the oklch values, that is working but I haven't done any of the work to add unit testing and the like.

@yorickshan
Copy link

yorickshan commented Mar 11, 2024

The unsupported color function is oklch. Don't know why you decided to leave out the most important part 😉

use https://www.npmjs.com/package/html2canvas-pro, it supports color function oklch!

@sksizer
Copy link

sksizer commented Mar 11, 2024

The unsupported color function is oklch. Don't know why you decided to leave out the most important part 😉

use https://www.npmjs.com/package/html2canvas-pro, it supports color function oklch!

Awesome!

@NgallaJuke
Copy link

Instead of install html2canvas, install htmlcanvas-pro
It support the oklch just like @yorickshan said
But I'm facing another issue.
I have a simple div with a paragraph in it.
when the pdf is generated, the paragraph is pushed down outside the div

<div class="bg-blue-50">
        <p class="text-xs">
          Placeholder for PDF Page BODY
        </p>
</div>

How it looks on the page
image

how it looks on the pdf
image

@yorickshan
Copy link

Instead of install html2canvas, install htmlcanvas-pro It support the oklch just like @yorickshan said But I'm facing another issue. I have a simple div with a paragraph in it. when the pdf is generated, the paragraph is pushed down outside the div

<div class="bg-blue-50">
        <p class="text-xs">
          Placeholder for PDF Page BODY
        </p>
</div>

How it looks on the page image

how it looks on the pdf image

I didn't reproduce the issue using the latest version (1.5.6). Please feel free to submit a detailed issue to html2canvas-pro, preferably with a minimal demo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants