Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using string interpolated variables in twind.config.ts breaks some functionality #13

Open
kveeti opened this issue Aug 2, 2022 · 0 comments

Comments

@kveeti
Copy link

kveeti commented Aug 2, 2022

This config will break plugin intellisense:

import { blue } from "twind/colors";

const config: Configuration = {
  mode: "strict",
  theme: {
    extend: {
      boxShadow: {
        test: `0 0 0 4px ${blue[400]}`,
      },
    },
  },
  plugins: {
    btn: `
      bg-blue-700
      hover:shadow-test
      p-3
      rounded-md
      text-white
      transition-shadow
    `,
  },
};

image

If the test boxShadow is changed to

boxShadow: {
  test: `0 0 0 4px blue`,
}, 

plugin intellisense starts working again.

image

Even when the intellisense thinks something's wrong, the shadow will have the right color. And it doesn't matter if the shadow is used in any plugin, as long as it's in the config, it breaks the intellisense.

Here's a repro repo: https://github.com/veeti-k/twind-intellisense-repro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant