Skip to content

Losing color preview when using css custom property default value + <alpha-value> as stated on the tailwind docs #604

@crammag

Description

@crammag

What version of Tailwind CSS IntelliSense are you using?

v0.8.7

What version of Tailwind CSS are you using?

v3.1.8

What package manager are you using?
yarn

What operating system are you using?

Linux

Reproduction URL

https://play.tailwindcss.com/

image
EDIT: adding the config as text, to make it easy to copy:

/** @type {import('tailwindcss').Config} */
module.exports = {
  theme: {
    extend: {
      // ...
      colors: {
        primary: 'rgb(var(--primary, 66 66 66) / <alpha-value>)'
      }
    },
  },
  plugins: [],
}

check the text-primary and bg-primary on this image:
image

Describe your issue

When we use the default value for CSS custom properties + "<alpha-value>" as it's stated on the official documentation, we lose the color preview provided by this plugin :(. Is there any way to make it work with both the opacity and the color preview?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions