Skip to content

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

Merged
matthewlipski merged 1 commit into
mainfrom
data-mantine-color-scheme-fix
Jun 4, 2024
Merged

fix: Remove data-mantine-color-scheme attribute#790
matthewlipski merged 1 commit into
mainfrom
data-mantine-color-scheme-fix

Conversation

@matthewlipski

Copy link
Copy Markdown
Collaborator

Closes #651
Closes #523

@vercel

vercel Bot commented May 31, 2024

Copy link
Copy Markdown

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

@YousefED YousefED left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@matthewlipski

Copy link
Copy Markdown
Collaborator Author

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

YousefED commented Jun 4, 2024

Copy link
Copy Markdown
Collaborator

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 :)

@matthewlipski
matthewlipski merged commit c7954d9 into main Jun 4, 2024
@nperez0111
nperez0111 deleted the data-mantine-color-scheme-fix branch October 21, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mantine adding data-mantine-color-scheme to the html tag Importing react style.css is breaking our own CSS

2 participants