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.86k stars 323 forks source link

Class bg-sky-500 not working when install material-tailwind in nextjs #329

Open i-am-nikola opened 1 year ago

i-am-nikola commented 1 year ago

I have a button with the class bg-sky-500, but it's not working when I install and configure @material-tailwind/react in my project. It seems like any classes with 'sky' in tailwind css aren't working. Can you please help me check? Thank you!"

jeremyhaile commented 1 year ago

We also found that when we installed our class bg-ruby-400 (and others) doesn't work in next.js.

kandalgaonkarshubham commented 1 year ago

I also encountered this issue, and after some investigation, I discovered that Material-Tailwind's Default Color Pallete may ignore the original Tailwind's color classes and instead use its own. This is simply my assumption.

sinianzhiren commented 1 year ago

I also noticed this issue, it seems that the material tailwind uses its own color and is not compatible with more tailwind CSS colors

sinianzhiren commented 1 year ago

tailwind.config.css ` import type {Config} from 'tailwindcss'; import { sky } from 'tailwindcss/colors'; import withMT from "@material-tailwind/react/utils/withMT";

export default withMT( { content: ["./app/*/.{js,jsx,ts,tsx}"], theme: { screens: { 'sm': {'min': '320px', 'max': '767px'}, 'md': {'min': '768px', 'max': '1023px'}, 'lg': '1024px', }, extend: { colors: { sky: sky, } }, }, plugins: [], } satisfies Config ) `, can from tailwindcss/colors import myself color