Closed gaurangrshah closed 1 year ago
Cannot reproduce. Are you using the latest version?
Cannot reproduce. Are you using the latest version?
Yes. This was a first time install attempt. I'll try to create a reproduction and will share back here.
I'm encountering this when I use custom colors along with this plugin:
/** @type {import('tailwindcss').Config} */
module.exports = {
// ...
theme: {
extend: {
colors: {
secondary: "var(--gray11)",
},
},
},
plugins: [require("tailwindcss-radix-colors")],
};
I'm encountering this when I use custom colors along with this plugin:
/** @type {import('tailwindcss').Config} */ module.exports = { // ... theme: { extend: { colors: { secondary: "var(--gray11)", }, }, }, plugins: [require("tailwindcss-radix-colors")], };
In previous versions, the plugin cannot handle custom colors, as it only expected Radix colors as all of its input.
In v0.5.0, this issue is addressed. Try it out and let me know if you have any problems!
Speaking the original issue on new installation, I still can't locate the problem. Waiting for a reproduction example. :)
I am having the same issue.
Here's the sandbox : https://codesandbox.io/p/sandbox/vibrant-buck-87h9tn?file=%2Ftailwind.config.js%3A21%2C3
It works but not for from which I was trying to extend white and black.
The error occurs because it's already defined in the plugin file.
Can you update the color list as here there is not white or black (generic colors)
then I updated my tailwind.config:
We ended up going another route, we're now using shadcn-ui - which uses radix under the hood. The issue never presented itself afterwards.
Fixed in v0.5.1.
I see the point. The plugin is generating component classes for black
and white
, which works well if the colors are not extended (thus not including black and white). But after extension, the plugin tries to find black.[x]
and white.[x]
, and the problem starts here.
The error occurs because it's already defined in the plugin file.
Can you update the color list as here there is not white or black (generic colors)
Thanks for pointing out! However, black
and white
are not going to be removed from the color list, because blacka
and whitea
are still radix-ui's official colors, and we will still be generating component classes for them.
Let me know if there is any problem left!
I have a nextjs typescript project and I get the errors below after installing the package:
then I updated my tailwind.config:
This is the erorr in my tw:build script terminal:
This is the error in my node terminal: