tailwind-variants icon indicating copy to clipboard operation
tailwind-variants copied to clipboard

When applying the className generated using the `tv` function, the color is not applied to the `::after` pseudo text.

Open Codiving opened this issue 8 months ago • 0 comments

Describe the bug

When applying the className generated using the tv function, the color is not applied to the ::after pseudo text. However, the color is applied when the text is written as is.

To Reproduce Steps to reproduce the behavior:

  1. Applying color using the tv function.
  2. Write the class name directly.

Expected behavior Even when using the tv function, the color is applied to the ::after text.

Screenshots

  • bug Image Image

  • normal
    Image Image

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Version: 133.0.6943.127

Additional context

"tailwind-variants": "^0.3.1"
"postcss": "^8",
"tailwindcss": "^3.4.1"
// typography tv function
const typography = tv({
  base: "text-inherit",
  variants: {
    color: {
      primary: "text-neutral-1000",
      secondary: "text-metal-700",
      disabled: "text-neutral-300",
      focus: "text-teal-600",
      reversed: "text-white-100",
      error: "text-orange-700",
      skyblue: "text-skyblue-700",
      gold: "text-yellow-800",
    },
  },
});

Codiving avatar Feb 27 '25 08:02 Codiving