Open zmzlois opened 3 weeks ago
I can't reproduce this issue. The issue of tailwind css has nothing to do with Rspress. You can check related issue of tailwind maybe.
I can't reproduce this issue. The issue of tailwind css has nothing to do with Rspress. You can check related issue of tailwind maybe.
Is it possible to give variable values with rgba colors or hsl colors rather than hex?
atm in tailwind we can do inlinetext-[var(--rp-c-brand)]
and this would work,
but if I am extending the colors in tailwind config say
extend: {
colors: {
background: {
DEFAULT: "hex(var(--rp-c-bg)/<alpha-value>)", // this won't work
light: "hsl(var(--rp-c-bg)/<alpha-value>)", // this would work if `--rp-c-bg` is hsl value
dark: "#1a1a1a", // this would
},
"soft-background": {
DEFAULT: "#f9f9f9",
}
}
},
The default theme color variants can be customized via globalStyles
Version
Details
As title stated
tailwind colors don't work until they are explicitly configured in
tailwind.config.ts
, thought this might be a bug?any documentation on incorporating rspress exposed brand assets to be used with tailwind variables?
On tailwind docs (I tried it a couple times hex colors doesn't work at all) it didn't specify how should hex colors be used https://tailwindcss.com/docs/customizing-colors#using-css-variables
Reproduce link
https://github.com/zmzlois/docs/tree/homepage-change
Reproduce Steps
tailwind.config.ts
npm i && npm run dev