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

Tailwind color codes are incompatible #2155

Closed
andreasnuesslein opened this issue May 16, 2024 · 2 comments
Closed

Tailwind color codes are incompatible #2155

andreasnuesslein opened this issue May 16, 2024 · 2 comments

Comments

@andreasnuesslein
Copy link

Hi all!, thanks for weasyprint ❤️

So, I'm using weasyprint v62.1 with Tailwind 3.4.1, and the issue that I'm having is that all the color codes Tailwind generates seem to be incompatible.

First I thought it was #1998 but it turns out the problem seems to be different.

Tailwind takes e.g. bg-red-500 and turns it into this:

background-color: rgb(239 68 68 / var(--tw-bg-opacity));

which does not render. I can however force Tailwind to put / 1 by using bg-red-500/100, which gives me:

background-color: rgb(239 68 68 / 1);

Both don't work.

The problem seems to be the format. If I manually put:

background-color: rgba(239,68,68,1);

it works.

(I'm gonna see if I can tell tailwind to use the other format.)

Thank you!

@andreasnuesslein
Copy link
Author

okay, using postcss-preset-env fixed that issue too, after all. it generates the required rgba(239, 68, 68, 1);

@liZe
Copy link
Member

liZe commented May 19, 2024

Hi!

Thank you for this report. This is actually a missing feature of tinycss2 (Kozea/tinycss2#47), and a duplicate of #1630.

@liZe liZe closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2024
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

2 participants