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

[BUG] - Some styling are off when combined with Tailwind CSS style #821

Closed
KevinYobeth opened this issue Oct 13, 2022 · 1 comment
Closed
Labels
🐛 Type: Bug Something isn't working

Comments

@KevinYobeth
Copy link

Describe the bug

Does nextUI works with tailwind? When I enable tailwind's @tailwind base; nextUI button's style is gone, but when I disable tailwind's @tailwind base, it show correct styling

@tailwind base;
@tailwind components;
@tailwind utilities;
import { Input, Button } from '@nextui-org/react';

const { Password } = Input;

export default function LoginPage() {
  return (
    <div className='h-screen bg-gray-800 p-20'>
      <div className='flex w-2/5 flex-col gap-5'>
        <Input label='Email' />
        <Password label='Password' />
        <Button shadow color='gradient'>
          Login
        </Button>
      </div>
    </div>
  );
}

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Create nextjs app and follow NextUI guideline
  2. Install tailwind css
  3. Add component
  4. Comment and uncomment @tailwind base config

Expected behavior

I expect it to work together with tailwind CSS

Browser Used: Brave Browser

Screenshots or Videos

image

Operating System Version

Windows 11

Browser

Other (add additonal context)

@KevinYobeth KevinYobeth added the 🐛 Type: Bug Something isn't working label Oct 13, 2022
@KevinYobeth
Copy link
Author

Closing since it has been answered before. Apparently nextui has their own CSS base reset that conflicted with tailwind's.

#429
https://github.com/nextui-org/nextui/blob/main/examples/with-tailwindcss/src/index.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant