Skip to content

Commit 99b9fd5

Browse files
committed
🐛(frontend) fix editor canvas background and dropdown check in dark mode
Setting the BlockNote CSS var lost to BlockNote's own .bn-root[data-color-scheme=dark] rule, so the editor kept Mantine's dark surface. Set the background directly on .bn-root .bn-editor (which outranks BlockNote's .bn-editor rule) so the canvas shares the page background in any theme. Also make the dropdown selected-check use the theme-aware neutral text colour instead of a fixed gray that was invisible on the dark menu. Signed-off-by: MashdorDev <dorzairi@ymail.com>
1 parent 80846f4 commit 99b9fd5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/frontend/apps/impress/src/components/dropdown-menu/DropdownMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export const DropdownMenu = ({
287287
<Icon
288288
iconName="check"
289289
$size="20px"
290-
$theme="gray"
290+
$color="var(--c--contextuals--content--semantic--neutral--primary)"
291291
aria-hidden="true"
292292
/>
293293
)}

src/frontend/apps/impress/src/features/docs/doc-editor/styles.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ export const DocsEditorStyle = createGlobalStyle`
88
* Token Blocknote
99
*/
1010
.bn-root[data-color-scheme] {
11-
/* Let the editor share the page background instead of BlockNote's own
12-
(Mantine) light/dark surface, so the canvas matches the app in any theme. */
13-
--bn-colors-editor-background: transparent;
1411
--bn-colors-editor-text: var(
1512
--c--contextuals--content--semantic--neutral--primary
1613
);
@@ -24,8 +21,11 @@ export const DocsEditorStyle = createGlobalStyle`
2421
}
2522
2623
.bn-root {
24+
/* Editor shares the page background rather than BlockNote's Mantine
25+
surface, so the canvas matches the app background in any theme. */
2726
.bn-editor {
2827
height: 100%;
28+
background-color: transparent;
2929
}
3030
3131
.mantine-Menu-itemLabel,

0 commit comments

Comments
 (0)