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
89 stars 5 forks source link

"border-transparent" missing from intellisense (upd: all border colors are missing) #57

Closed alex-jitbit closed 2 months ago

theron-wang commented 2 months ago

Sorry about the delay; thanks for reporting! I'll take a look into this and hopefully get a bug fix soon.

theron-wang commented 2 months ago

@alex-jitbit I'm not able to reproduce this issue - could you please send your tailwind.config.js file and the affected HTML file content and type (i.e. .razor, .html, etc.)? Thanks.

alex-jitbit commented 2 months ago

Sure

/** @type {import('tailwindcss').Config} */
module.exports = {
    content: ["./Views/**/*.cshtml"],
    theme: {
        extend: {
            fontFamily: {
                sans: ['InterVariable, sans-serif'],
            },
            colors: {
                'new-color': 'rgb(var(--new-color) / <alpha-value>)',
                'new-color-dark': 'rgb(var(--new-color-dark) / <alpha-value>)',
                'tech-color': 'rgb(var(--tech-color) / <alpha-value>)',
                'tech-color-dark': 'rgb(var(--tech-color-dark) / <alpha-value>)',
                'cust-color': 'rgb(var(--cust-color) / <alpha-value>)',
                'cust-color-dark': 'rgb(var(--cust-color-dark) / <alpha-value>)',
                'fortech-color': 'rgb(var(--fortech-color) / <alpha-value>)',
                'fortech-color-dark': 'rgb(var(--fortech-color-dark) / <alpha-value>)',
            }
        },
        borderColor: ({ theme }) => ({
            ...theme('colors'),
            DEFAULT: theme('colors.zinc.200', 'currentColor'),
        }),
    },
    darkMode: 'selector',
    plugins: [],
    safelist: ["rotate-90"] //do not purge this class from CSS (used in js)
}

Any html/cshtml file is affected.

I just realized that the extension breaks becasue I added some custom borderColors.

This:

borderColor: ({ theme }) => ({
            ...theme('colors'),
            DEFAULT: theme('colors.zinc.200', 'currentColor'),
        }),
theron-wang commented 2 months ago

Thanks! I don’t think the extension is handling DEFAULT correctly at the moment, so I’ll try to get a fix for that soon.

theron-wang commented 2 months ago

Sorry about the delayed fix; this should be fixed in 1.4.7. Thanks!

alex-jitbit commented 2 months ago

Thanks!