TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.
https://www.blocknotejs.org/
Mozilla Public License 2.0
5.91k stars 386 forks source link

fix: Remove `data-mantine-color-scheme` attribute #790

Closed matthewlipski closed 1 month ago

matthewlipski commented 1 month ago

Closes #651 Closes #523

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview May 31, 2024 5:10pm
blocknote-website ✅ Ready (Inspect) Visit Preview May 31, 2024 5:10pm
matthewlipski commented 1 month ago

We refer to data-mantine-color-scheme in our CSS. is this not an issue?

Ah yeah we do indeed - it's because mantineStyles.css contains Mantine global styles that are scoped to the editor, and so includes some things used by Mantine themes which we don't use since we have our own theme API. I think it's ok to keep it as is for maintainability, since we can just copy the Mantine global styles and change CSS rules for html/body/#root to .bn-container, kind of how we do with Ariakit.

YousefED commented 1 month ago

Ah yeah we do indeed - it's because mantineStyles.css contains Mantine global styles that are scoped to the editor, and so includes some things used by Mantine themes which we don't use since we have our own theme API. I think it's ok to keep it as is for maintainability, since we can just copy the Mantine global styles and change CSS rules for html/body/#root to .bn-container, kind of how we do with Ariakit.

Got it! Sounds good unless mantine-dark-hidden (or light-hidden) is used in the default components that we use, but I doubt that. Ok to merge if you can do some testing with both themes :)