nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
4.08k stars 529 forks source link

How to enable responsive media queries? #2107

Closed BeatBroccoli closed 2 months ago

BeatBroccoli commented 2 months ago

Description

Hi, media queries are not working. I have this in nuxt.config.js My project is based on https://github.com/atinux/atidone/ Is there some flag to enable suppor for sm:w-1/2 etc?

export default defineNuxtConfig({
  compatibilityDate: '2024-07-30',
  future: { compatibilityVersion: 4 },
  modules: [
    '@nuxthub/core',
    'nuxt-auth-utils',
    '@nuxtjs/i18n',
    '@nuxt/ui',
    '@nuxtjs/tailwindcss'
  ],
  hub: {
    database: true
  },
  devtools: {
    enabled: true
  }
})
BeatBroccoli commented 2 months ago

solved by adding

export default defineNuxtConfig({
  ...
  tailwindcss: {
    config: {
      variants: {
        extend: {
          width: ['responsive']
        }
      }
    }
  }
 ...
})