theron-wang / VS2022-Editor-Support-for-Tailwind-CSS

Unofficial VS2022 Tailwind CSS extension for IntelliSense, linting, sorting, and more to enhance the development experience in Visual Studio 2022.
https://marketplace.visualstudio.com/items?itemName=TheronWang.TailwindCSSIntellisense
MIT License
86 stars 5 forks source link

[Bug] Not all added get colors parsed in Intillisense #36

Closed Lepidopteran closed 6 months ago

Lepidopteran commented 6 months ago

Hi there,

When creating a theme built with css variables for my site, I noticed not all the colors appear in Intillisense.

The colors with 2 variants the main color and there content color get shown correctly. But colors with a range of colors for example primary does not get showed correctly, instead of showing range of colors and content color it only shows the content color.

I've attached a screen shot of what is happening: image

Tailwind config:

export default {
    ...
    theme: {
        ...
        extend: {
            colors: {
                error: "rgb(var(--error) / <alpha-value>)",
                "error-content": "rgb(var(--error-content) / <alpha-value>)",
                success: "rgb(var(--success) / <alpha-value>)",
                "success-content": "rgb(var(--success-content) / <alpha-value>)",
                warning: "rgb(var(--warning) / <alpha-value>)",
                "warning-content": "rgb(var(--warning-content) / <alpha-value>)",
                info: "rgb(var(--info) / <alpha-value>)",
                "info-content": "rgb(var(--info-content) / <alpha-value>)",
                primary: {
                    100: "rgb(var(--primary-100) / <alpha-value>)",
                    200: "rgb(var(--primary-200) / <alpha-value>)",
                    300: "rgb(var(--primary-300) / <alpha-value>)",
                    400: "rgb(var(--primary-400) / <alpha-value>)",
                    DEFAULT: "rgb(var(--primary-100) / <alpha-value>)",
                },
                "primary-content": "rgb(var(--primary-content) / <alpha-value>)",
                secondary: {
                    100: "rgb(var(--secondary-100) / <alpha-value>)",
                    200: "rgb(var(--secondary-200) / <alpha-value>)",
                    300: "rgb(var(--secondary-300) / <alpha-value>)",
                    400: "rgb(var(--secondary-400) / <alpha-value>)",
                    DEFAULT: "rgb(var(--secondary-100) / <alpha-value>)",
                },
                "secondary-content": "rgb(var(--secondary-content) / <alpha-value>)",
                accent: {
                    100: "rgb(var(--accent-100) / <alpha-value>)",
                    200: "rgb(var(--accent-200) / <alpha-value>)",
                    300: "rgb(var(--accent-300) / <alpha-value>)",
                    400: "rgb(var(--accent-400) / <alpha-value>)",
                    DEFAULT: "rgb(var(--accent-100) / <alpha-value>)",
                },
                "accent-content": "rgb(var(--accent-content) / <alpha-value>)",
                main: {
                    100: "rgb(var(--main-100) / <alpha-value>)",
                    200: "rgb(var(--main-200) / <alpha-value>)",
                    300: "rgb(var(--main-300) / <alpha-value>)",
                    400: "rgb(var(--main-400) / <alpha-value>)",
                    DEFAULT: "rgb(var(--main-100) / <alpha-value>)",
                },
                "main-content": "rgb(var(--main-content) / <alpha-value>)",
            },
            ...
        },
    },
  ...
};

Any help will be greatly appreciated. Thanks.

theron-wang commented 6 months ago

Sorry about the late response, but the latest update should fix this issue. Thanks for reporting the bug!