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

Extended / Overridden classes work but marked as error in Deno (Fresh) #11

Open
JasperSurmont opened this issue Jul 15, 2022 · 1 comment

Comments

@JasperSurmont
Copy link

In the automatically generated twind config file I add the following extend:

export const config: Configuration = {
  darkMode: "class",
  mode: "silent",
  theme: {
    extend: {
        fontFamily: {
            'hairline': "Bungee Hairline"
        }
    }
  }
};

In a component I do:

<div className={ tw`font-hairline` } >
   ...
</div>

The result is that the compiler correctly compiles the tailwind, but the vscode extension marks font-hairline as an error saying:
Unknown utility "font-hairline"ts(-2020)
Unknown theme value "fontWeight[hairline]"ts(-2022)

Is this a bug or did I do something wrong?

@hanayashiki
Copy link

putting a twind.config.ts and export default works for me

the default location is not sensed by the plugin, i guess

/** @type {import('twind').Configuration} */
export default {
  darkMode: "class",
  mode: "silent",
  theme: {
    colors: {
      primary: '#6392E7',
    },
  },
};

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

2 participants