svelte-add / windicss

A command to add Windi CSS to your Svelte project
MIT License
5 stars 1 forks source link

Sveltekit with windi extended colors is not working. #5

Open moisesbites opened 3 years ago

moisesbites commented 3 years ago

I wrote this colors in windi.config.cjs:

module.exports = {
  theme: {
    container: {
      center: true
    },
    extend: {
      colors: {
        white: '#ffffff',
        'gray-lightest': '#f8f8f9',
        'gray-lighter': '#e4e4e5',
        'gray-light': '#d0d1d1',

        gray: '#bebebf',
        'gray-dark': '#969697',
        'gray-darker': '#6e6f6f',
        'gray-darkest': '#484849',
        black: '#202021',

        'primary-light': '#cacfe3',
        primary: '#1a4c8f',
        'primary-dark': '#192846',

        'secundary-light': '#eac7c0',
        secundary: '#8f231a',
        'secundary-dark': '#481911',

        'info-light': '#d7eff9',
        info: '#33bee8',
        'info-dark': '#275b6d',

        'warning-light': '#faeed1',
        warning: '#dbbd45',
        'warning-dark': '#695a27',

        'success-light': '#d7f3d6',
        success: '#47cc5d',
        'success-dark': '#2b6131',

        'danger-light': '#fed2d1',
        danger: '#dd4054',
        'danger-dark': '#6a262c'
      }
    }
  },
  variants: {},
  plugins: []
};```

In `sevelte.config.cjs`:
```JS
/** @type {import('@sveltejs/kit').Config} */
module.exports = {
    preprocess: [
        windicss({
            kit: true,
            config: "windi.config.cjs",
        }),
    ],
    kit: {
.....

When I need to use text-primary the extended color is not working:

But, in Code editor, the colors is not presente in the list: image

moisesbites commented 3 years ago

https://github.com/windicss/windicss-intellisense/issues/92

moisesbites commented 3 years ago

After some tests, now it's working. After I restart the application with 'npm run dev'. Just WindiCSS Intellisense extension is now not working. But, I think that windi.config.cjs is not reloading/recompiling after it is changed.

moisesbites commented 3 years ago

windicss/windicss-intellisense#92

The extension is updated, but, the problem persist in the sveltekit project.

babichjacob commented 3 years ago

I don't use Windi CSS so I am ending support for this project. I am sorry for the time you've wasted trying to use it thus far.

After the svelte-add rewrite, someone who can be trusted to set it up correctly and maintain it can contribute it to the svelte-add repository.