Skip to content

Any way not to have Mantine set styles globally? #546

Description

@vincaslt

Describe the bug

BlockNote styles are importing Mantine styles which set a bunch of global styles. Maybe makes sense if your whole project is using Mantine, but mine doesn't and these things interfere with existing custom styles in my project (see below).

Additionally Mantine sets a bunch of color variables that I don't know if even BlockNote is using, so it's a bunch of extra useless css in the bundle.

*,:after,:before {
    box-sizing: border-box
}

button,input,select,textarea {
    font: inherit
}

button,select {
    text-transform: none
}

body {
    -webkit-font-smoothing: var(--mantine-webkit-font-smoothing);
    -moz-osx-font-smoothing: var(--mantine-moz-font-smoothing);
    background-color: var(--mantine-color-body);
    color: var(--mantine-color-text);
    font-family: var(--mantine-font-family);
    font-size: var(--mantine-font-size-md);
    line-height: var(--mantine-line-height);
    margin: 0
}

@media screen and (max-device-width: 500px) {
    body {
        -webkit-text-size-adjust:100%
    }
}

@media (prefers-reduced-motion:reduce) {
    [data-respect-reduced-motion] [data-reduce-motion] {
        animation: none;
        transition: none
    }
}

[data-mantine-color-scheme=dark] .mantine-dark-hidden,[data-mantine-color-scheme=light] .mantine-light-hidden {
    display: none
}

To Reproduce
<links to a sandbox or clear steps to reproduce are super helpful!>

Misc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions