Including referenced color variables from cli #17106
Replies: 3 comments 4 replies
-
How are you referencing the CSS variables? Could you share an exact code snippet or a git repo that reproduces the behavior please? |
Beta Was this translation helpful? Give feedback.
-
I have a prefix of tw set: |
Beta Was this translation helpful? Give feedback.
-
I am experiencing the same thing I believe. I have a In the file I have a color: @utility bg-black-gradient {
background: radial-gradient(
circle,
var(--color-x3dark) 0%,
rgba(27, 29, 31, 1) 35%,
rgba(37, 40, 43, 1) 100%
);
} However, when inspecting the page, the I.e.: /*! tailwindcss v4.0.13 | MIT License | https://tailwindcss.com */
@layer theme, base, components, utilities;
@layer theme {
:root, :host {
--color-indigo-200: oklch(0.87 0.065 274.039);
--color-gray-200: oklch(0.928 0.006 264.531);
--color-gray-400: oklch(0.707 0.022 261.325);
--color-gray-500: oklch(0.551 0.027 264.364);
--color-gray-700: oklch(0.373 0.034 259.733);
--color-black: #000;
--color-white: #fff;
--spacing: 0.25rem;
--container-sm: 24rem;
I have no idea why say |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This probably just isn't supposed to work, but I am attempting to reference a color variable (e.g. --color-blue-100) from one of my source files. That does not cause that color variable to be included in the output css generated by tailwind. If I add a comment in my code that uses a class that uses that variables (e.g. ), then the color is included as expected.
Is there any way to include referenced color variables from the tailwind cli?
Thanks,
Eric
Beta Was this translation helpful? Give feedback.
All reactions