-
Notifications
You must be signed in to change notification settings - Fork 46
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
Uncaught Error with parseColor using OKLCH color format in Next.js #153
Comments
I also experienced the same issue when using Disqus + daisyUI 4.7.0, and after I investigated, the cause was found to be in that latest version of daisyUI. The temporary solution was that I used is using daisyUI version 3.9.4. After I downgraded, the error disappeared, but it should be noted that some features in daisyUI 4.7.0 stopped working. In my case, it wasn't a problem because I hadn't yet used the latest components from daisyUI. Hope this helps. |
thank you. The daisyUI version downgrade issue has been resolved. |
This issue arises from Disqus not being able to parse the background color in JavaScript code due to the lack of support for OKLCH. Since version 4 of DaisyUI, browsers that support OKLCH use it, so I am encountering the same issue. A temporary workaround to keep using version 4 while making Disqus work is to directly specify the background color as follows: :root[data-theme="light"] {
background-color: // light bg color
color: // light content color
}
:root[data-theme="dark"] {
background-color: // dark bg color
color: // dark content color
} |
It works. Thanks! |
It didn't work for me. Maybe, I am doing something wrong? I created a new file named styles.css and imported it into the Disqus component file. Am I doing something wrong? |
Hello,
I'm currently developing a project using Next.js and encountered an issue with parsing colors in the OKLCH format. The exact error message I received is:
my code is:
I've checked the color value format and it seems to be correct according to the OKLCH color specification. However, the parser seems unable to recognize or parse this format correctly.
Has anyone encountered a similar issue or does anyone know why this specific color format is causing an error? I'm wondering if there's a specific library or plugin that I need to use to support OKLCH color parsing in Next.js, or if there's a workaround for this issue.
Any advice or suggestions would be greatly appreciated. Thank you in advance for your help
Environment Details:
Next.js version: 14.1.0
Additional libraries/plugins used (if any): daisyUI 4.7.0
Looking forward to any insights or solutions from the community. Thank you!
The text was updated successfully, but these errors were encountered: