creativetimofficial / material-tailwind

@material-tailwind is an easy-to-use components library for Tailwind CSS and Material Design.
https://material-tailwind.com/
MIT License
3.75k stars 321 forks source link

Input does not work well with @tailwindcss/forms #527

Open don-esteban opened 9 months ago

don-esteban commented 9 months ago

Hi all,

@tailwindcss/forms together with Material Tailwind has issues. I observed them with the <Input> component if it is focused. I'm on the latest macOS testing with FF, Chrome, Safari and Edge.

With @tailwindcss/forms

Bildschirmfoto 2023-12-10 um 12 10 22

Without @tailwindcss/forms

Bildschirmfoto 2023-12-10 um 12 09 56

tailwind.config.ts

Commenting out require('@tailwindcss/forms') resolves the issue.

import type { Config } from 'tailwindcss'
import withMT from '@material-tailwind/react/utils/withMT'

const config: Config = {
  content: [
    './pages/**/*.{js,ts,jsx,tsx,mdx}',
    './components/**/*.{js,ts,jsx,tsx,mdx}',
    './app/**/*.{js,ts,jsx,tsx,mdx}',
  ],
  theme: {
    extend: {
      fontFamily: {
        sans: ['var(--font-inter)']
      },
    },
  },
  plugins: [
//    require('@tailwindcss/forms'),
  ],
}

export default withMT(config)