Skip to content

Commit 766aee6

Browse files
committed
💄(frontend) code background darkened on editor
The "code" was not visible on the editor because the background was too light. The background color was darkened to make the "code" more visible.
1 parent 3d19893 commit 766aee6

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to
1616

1717
## Changed
1818

19+
- 💄(frontend) code background darkened on editor #214
1920
- 🔥(frontend) hide markdown button if not text #213
2021

2122
## Removed

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ import { randomColor } from '../utils';
1818

1919
import { BlockNoteToolbar } from './BlockNoteToolbar';
2020

21+
const cssEditor = `
22+
&, & > .bn-container, & .ProseMirror {
23+
height:100%
24+
};
25+
& .collaboration-cursor__caret.ProseMirror-widget{
26+
word-wrap: initial;
27+
}
28+
& .bn-inline-content code {
29+
background-color: gainsboro;
30+
padding: 2px;
31+
border-radius: 4px;
32+
}
33+
`;
34+
2135
interface BlockNoteEditorProps {
2236
doc: Doc;
2337
version?: Version;
@@ -103,16 +117,7 @@ export const BlockNoteContent = ({
103117
}, [setStore, storeId, editor]);
104118

105119
return (
106-
<Box
107-
$css={`
108-
&, & > .bn-container, & .ProseMirror {
109-
height:100%
110-
};
111-
& .collaboration-cursor__caret.ProseMirror-widget{
112-
word-wrap: initial;
113-
}
114-
`}
115-
>
120+
<Box $css={cssEditor}>
116121
{isErrorAttachment && (
117122
<Box $margin={{ bottom: 'big' }}>
118123
<TextErrors causes={errorAttachment.cause} />

0 commit comments

Comments
 (0)