Skip to content

Blocknote's mantine styles impacting Mantine components elsewhere on the same page #2095

@dlgoodchild

Description

@dlgoodchild

Describe the bug
It looks like the blocknote mantine styles are impacting normal Mantine UI components.
The :hover styles on the Menu items that come as part of Mantine don't work when used in combination with the blocknote mantine styles. I found the impacting style:

.m_87cf2631 {
  background-color: transparent;
  cursor: pointer;
  border: 0;
  padding: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-size: var(--mantine-font-size-md);
  text-align: left;
  text-decoration: none;
  color: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent
}

Having now looked inside this style sheet, I'm a tad concerned because I see lots of styles not scoped (preceded with hierarchically by a blocknote class). Which now means we need to be cautious about the combined use of Blocknote + Mantine, unless there's some other solution that I'm unaware of.

To Reproduce
Use mantine UI library as documented. Add the blocknote mantine css as documented, add a blocknote instance.
Now add a Mantine Menu component elsewhere on the same page. You'll find the :hover styles on the menu items that come as part of Mantine don't work.

Misc

  • Node version: n/a
  • Package manager: npm
  • Browser: Firefox 142.0
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions