csstools/postcss-advanced-variables

Upgrading from v3.0.1 to v4.0.0 triggers warnings in Nuxt

t0byman opened this issue · 1 comments

Upgrading from v3.0.1 to v4.0.0 triggers these warnings in Nuxt

WARN  [vite:css] Nested CSS was detected, but CSS nesting has not been configured correctly.                                             8:34:19 PM
Please enable a CSS nesting plugin *before* Tailwind in your configuration.
See how here: https://tailwindcss.com/docs/using-with-preprocessors#nesting

When I downgrade back to v3.0.1 the warnings go away.

Relevant parts of my nuxt.config.ts:

modules: [
    '@nuxtjs/tailwindcss',
],
postcss: {
    plugins: {
      'postcss-advanced-variables': {},
      '@csstools/postcss-global-data': {
        files: ['assets/css/base/custom-media.css'],
      },
      'postcss-preset-env': {
        stage: 1,
        features: {
          'relative-color-syntax': { preserve: true },
        },
      },
    },
  },

I know that I don't have tailwindcss/nesting and tailwindcss in my postcss plugins but that shouldn't be necessary because of the nuxtjs/tailwindcss module. I tried adding them anyway just to see what would happen but the warnings didn't go away.

postcss-advanced-variables is unrelated to nested CSS.

Closing as this is not an issue here.
Happy to re-open if you can provide a minimal reproduction that does prove the issue is with this plugin.