Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Mantine setting global styles #525

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions packages/react/src/editor/styles.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,59 @@
@import url("@mantine/core/styles.css");
@import url("@blocknote/core/style.css");

/* Move Mantine global styles to the scope of bn-container */
body, html {
height: unset;
}

*, :after, :before {
box-sizing: unset;
}
.bn-container *, .bn-container :after, .bn-container :before {
box-sizing: border-box;
}

button, input ,select ,textarea {
font: unset;
}

button, select {
text-transform: unset;
}
.bn-container button, .bn-container select {
text-transform: none;
}

body {
-webkit-font-smoothing: unset;
-moz-osx-font-smoothing: unset;
background-color: unset;
color: unset;
font-family: unset;
font-size: unset;
line-height: unset;
margin: unset
}
.bn-container {
-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: unset;
}
.bn-container body {
-webkit-text-size-adjust: 100%
}
}

/* Default theme params */
.bn-container {
--bn-colors-editor-text: #3F3F3F;
Expand Down
Loading