react-tailwindcss-datepicker icon indicating copy to clipboard operation
react-tailwindcss-datepicker copied to clipboard

Tailwind styles overridden by adding component to tailwind configuration

Open AidanRoessler opened this issue 2 years ago • 1 comments

Upon adding './node_modules/react-tailwindcss-datepicker/dist/index.esm.js' to my tailwindconfig.js's content array some of my custom tailwind styles in separate files from where I'm calling the Datepicker component were overriden.

This seems to only apply custom bg and bg-opacity tailwind classes. For example the badge under account used to have a bg-emerald-100 class and seems to be overriden by the date picker styles changing it to have a bg-zinc-100 class. It also overrides the background opacity by setting it to bg-opacity-100, but this is not an issue on this specific component because it already had that class in place.

Before: before

After: after

Related to issue #135

AidanRoessler avatar Jul 20 '23 17:07 AidanRoessler

Hello, I have the same issue: as soon as I add a style to my tailwind.config.ts, for example if I extend colors : colors: { transparent: 'transparent', current: 'currentColor', white: '#ffffff', purple: '#3f3cbb', midnight: '#121063', metal: '#565584', tahiti: '#3ab7bf', silver: '#ecebff', 'bubble-gum': '#ff77e9', bermuda: '#78dcca', },

All the styles of the date picker disappear, even if there is no overlap between the newly extended styles from my end and the library styling...

zacBkh avatar Nov 15 '23 09:11 zacBkh