/* ============================================================================ */ /* Editor chrome inside ProseMirror */ /* */ /* Editing-only visuals: math editors, placeholders, selection outlines, */ /* collaboration cursors, comment marks. None of these appear in published HTML.*/ /* ============================================================================ */ /* ---- Math editing ---- */ .tiptap [data-type="inline-math"], .tiptap [data-type="block-math"] { cursor: pointer; } .tiptap [data-type="inline-math"] .tiptap-mathematics-editor { font-family: "SFMono-Regular", "Fira Code", monospace; font-size: 0.85em; color: var(--code-text); background: var(--code-bg); padding: 0.1em 0.4em; border-radius: 3px; outline: none; } .tiptap [data-type="block-math"] .tiptap-mathematics-editor { display: block; width: 100%; font-family: var(--font-mono); font-size: 14px; line-height: 1.6; color: var(--code-text); background: var(--bg-code-block); border: 1px solid var(--border-light); border-radius: 6px; padding: var(--spacing-1) var(--spacing-3); outline: none; text-align: center; } /* ---- Selection highlights ---- */ .tiptap .selectedCell { background: var(--accent-bg); } .tiptap .ProseMirror-selectednode img { outline: 2px solid var(--accent-light); outline-offset: 2px; border-radius: 8px; } .tiptap [data-component].ProseMirror-selectednode { outline: 2px solid rgba(149, 141, 241, 0.5); outline-offset: 2px; border-radius: 8px; } /* ---- Comment marks ---- */ .comment-mark { background: var(--accent-bg); border-bottom: 2px solid rgba(149, 141, 241, 0.4); cursor: pointer; border-radius: 2px; transition: background 0.15s; } .comment-mark:hover { background: var(--accent-bg-hover); } .comment-mark.resolved { background: transparent; border-bottom: 1px dashed var(--border-color); } /* ---- Collaboration cursors ---- */ .collaboration-cursor__caret { position: relative; margin-left: -1px; margin-right: -1px; border-left: 2px solid; word-break: normal; pointer-events: none; } .collaboration-cursor__label { position: absolute; top: -1.4em; left: -1px; display: flex; align-items: center; gap: 3px; font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 0.65rem; font-weight: 600; padding: 0.1rem 0.35rem; border-radius: 3px 3px 3px 0; white-space: nowrap; color: #000; user-select: none; pointer-events: none; } .collaboration-cursor__avatar { width: 14px; height: 14px; border-radius: 50%; object-fit: cover; flex-shrink: 0; } /* When a peer also broadcasts an `agentFocus`, the AgentFocus decoration already renders a " agent" label on the working range. We hide the plain caret+label here so the same user isn't shown twice. */ .collaboration-cursor--silenced { display: none !important; } /* ---- Placeholder ---- */ .tiptap p.is-editor-empty:first-child::before { content: attr(data-placeholder); float: left; color: var(--text-faint); pointer-events: none; height: 0; }