Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(web): align editor placeholder typography

tianma-iff35573015303
diff --git a/apps/web/src/styles/editor-typography.test.mjs b/apps/web/src/styles/editor-typography.test.mjs
index c1e4cb42..e015399a 100644
--- a/apps/web/src/styles/editor-typography.test.mjs
+++ b/apps/web/src/styles/editor-typography.test.mjs
@@ -35,6 +35,17 @@ describe("editor typography contract", () => {
expect(markdownLinkRules).toMatch(/text-decoration\s*:\s*underline/);
});
+ test("keeps the rich-editor placeholder aligned with body typography", () => {
+ const globals = readStyle("./globals.css");
+ const placeholderRules = declarationsForSelector(
+ globals,
+ ".ProseMirror.edgeever-note-rich-editor p.is-empty::before",
+ );
+
+ expect(placeholderRules).toMatch(/font-size\s*:\s*inherit/);
+ expect(placeholderRules).toMatch(/line-height\s*:\s*inherit/);
+ });
+
test("keeps bold text visibly distinct across platform font fallbacks", () => {
const globals = readStyle("./globals.css");
const defaultBoldRules = declarationsForSelector(globals, ".ProseMirror strong");
diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.css
index d765d0e9..73a8e4c8 100644
--- a/apps/web/src/styles/globals.css
+++ b/apps/web/src/styles/globals.css
@@ -1173,7 +1173,9 @@ textarea {
color: #94a3b8;
content: attr(data-placeholder);
float: left;
+ font-size: inherit;
height: 0;
+ line-height: inherit;
pointer-events: none;
}