BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

TailwindCSS classes conflicting with Mantine styles

Open steven-tey opened this issue 2 years ago • 6 comments

Probably need to persist hover-state classes and show them in the active state as well:

CleanShot 2023-03-24 at 19 05 43

steven-tey avatar Mar 25 '23 00:03 steven-tey

I think this is probably caused by the added Tailwind styles, there must be a conflict going in. Any thoughts what it could be? I think I'm able to reproduce, so will check as well

YousefED avatar Mar 25 '23 01:03 YousefED

Good point, since it doesn't seem to be happening in https://blocknote-main.vercel.app/...

However, on closer look, even if I removed the Tailwind styles (editorDOMAttributes and defaultStyles override), the bug is still there :thonkhard:

steven-tey avatar Mar 25 '23 03:03 steven-tey

What if you remove the tailwind stylesheets? Maybe some globals are affected

YousefED avatar Mar 25 '23 03:03 YousefED

Ahh yup, you're right! Some of the Tailwind globals are conflicting with the Mantine classes

steven-tey avatar Mar 25 '23 03:03 steven-tey

Another odd thing is if I set prose-h1:text-2xl, the font size changes but the transition/resulting div doesn't change with it:

CleanShot 2023-03-24 at 22 35 36

Should I open up a new issue for this?

steven-tey avatar Mar 25 '23 03:03 steven-tey

Ahh yup, you're right! Some of the Tailwind globals are conflicting with the Mantine classes

+1

This style from @tailwind base overrides the Mantine class:

button, [type='button'], [type='reset'], [type='submit'] {
    -webkit-appearance: button;
    background-color: transparent; /* this one */
    background-image: none;
}`

sasa95 avatar Apr 07 '23 12:04 sasa95