@import "prosemirror-view/style/prosemirror.css"; @import "prosemirror-gapcursor/style/gapcursor.css"; /* * Editor styles, tokens only ("Graphite & Highlighter", see styles.css). Light/dark is * handled by the theme variables themselves. Fallbacks are the light values. * Type: Atkinson Hyperlegible Next (UI and body), Atkinson Hyperlegible Mono (meta, keycaps, code). */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } /* ---- Keycaps (every visible command shows its shortcut as these) ---- */ .keycaps { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: 6px; vertical-align: middle; } .keycap { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border: 1px solid var(--border, #e3e5ea); border-bottom-width: 2px; border-radius: 6px; background: var(--keycap-bg, #ffffff); color: var(--muted-foreground, #5b6270); font-family: var(--font-mono, "Atkinson Hyperlegible Mono", ui-monospace, monospace); font-size: 11px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; } /* ---- Tooltips (toolbar and bubble buttons) ---- */ .tip { position: absolute; top: calc(100% + 6px); left: 50%; z-index: 40; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; max-width: 240px; padding: 4px 6px 4px 8px; border: 1px solid var(--border, #e3e5ea); border-radius: 10px; background: var(--popover, #ffffff); color: var(--popover-foreground, #16181d); box-shadow: var(--shadow-float, 0 8px 24px rgb(0 0 0 / 0.12)); font-family: var(--font-sans, "Atkinson Hyperlegible Next", sans-serif); font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, -2px); transition: opacity 150ms ease-out, transform 150ms ease-out; } .tip .keycaps { margin-inline-start: 4px; } .tip-reason { display: none; flex-basis: 100%; color: var(--muted-foreground, #5b6270); font-weight: 400; } .editor-toolbar-btn:disabled .tip-reason { display: block; } .editor-toolbar-btn:hover .tip, .editor-toolbar-btn:focus-visible .tip, .bubble-btn:hover .tip, .bubble-btn:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); transition-delay: 300ms; } .bubble .tip { top: auto; bottom: calc(100% + 6px); } /* ---- Sync status pill (in the note header's #sync-slot) ---- */ #sync-status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border: 1px solid var(--border, #e3e5ea); border-radius: 999px; background: var(--card, #ffffff); color: var(--muted-foreground, #5b6270); font-family: var(--font-mono, "Atkinson Hyperlegible Mono", ui-monospace, monospace); font-size: 12px; font-weight: 400; line-height: 16px; white-space: nowrap; transition: color 150ms ease-out; } #sync-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; } #sync-status[data-state="saved"] { color: var(--ok, #1f7a4d); } #sync-status[data-state="saving"] { color: var(--muted-foreground, #5b6270); } #sync-status[data-state="local"], #sync-status[data-state="reconnecting"] { color: var(--warn, #9a5b00); } /* ---- Note header: one row, the formatting toolbar sits inside it ---- */ #note-header { container: note-header / inline-size; } /* ---- Toolbar: compact, icons only, one line (groups drop out when the row is narrow) ---- */ .editor-toolbar { display: flex; flex: 0 0 auto; flex-wrap: nowrap; align-items: center; gap: 2px; } .editor-toolbar-group { display: flex; align-items: center; gap: 2px; } .editor-toolbar-group + .editor-toolbar-group::before { content: ""; width: 1px; height: 16px; margin: 0 4px; background: var(--border, #e3e5ea); } /* Lower-priority commands leave the bar as the header narrows, so the title keeps at least 8rem. They stay reachable through the slash menu (/) and markdown shortcuts. */ @container note-header (max-width: 879px) { .note-crumb-notebook { display: none; } } @container note-header (max-width: 779px) { .editor-toolbar-group[data-group="blocks"] { display: none; } } @container note-header (max-width: 619px) { .editor-toolbar-btn[data-command="h1"], .editor-toolbar-btn[data-command="h2"], .editor-toolbar-btn[data-command="h3"] { display: none; } } @container note-header (max-width: 559px) { #sync-status { gap: 0; padding: 0 8px; font-size: 0; } } @container note-header (max-width: 469px) { .editor-toolbar-group[data-group="history"] { display: none; } } @container note-header (max-width: 419px) { .editor-toolbar-btn[data-command="paragraph"], .editor-toolbar-group[data-group="headings"] { display: none; } .note-crumb { min-width: 6rem; } } .editor-toolbar-btn { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted-foreground, #5b6270); cursor: pointer; transition: background-color 150ms ease-out, color 150ms ease-out; } .editor-toolbar-icon { display: grid; place-items: center; } .editor-toolbar-icon svg { display: block; } .editor-toolbar-btn:hover:not(:disabled) { background: var(--sidebar-accent, #e3e6eb); color: var(--foreground, #16181d); } .editor-toolbar-btn[aria-pressed="true"] { background: var(--active-row, #d9ebd3); color: var(--active-row-foreground, #1f3d22); } .editor-toolbar-btn:disabled { opacity: 0.4; cursor: not-allowed; } .editor-toolbar-btn:focus-visible, .bubble-btn:focus-visible, .btn:focus-visible, .link-input:focus-visible, .slash-item:focus-visible { outline: 2px solid var(--ring, #8a5a00); outline-offset: 2px; } /* ---- Floating surfaces: bubble, link popover, slash menu ---- */ .bubble, .popover { position: fixed; z-index: 50; color: var(--popover-foreground, #16181d); background: var(--popover, #ffffff); border: 1px solid var(--border, #e3e5ea); border-radius: 10px; box-shadow: var(--shadow-float, 0 8px 24px rgb(0 0 0 / 0.12)); font-family: var(--font-sans, "Atkinson Hyperlegible Next", sans-serif); font-size: 14px; line-height: 20px; } .bubble[hidden], .popover[hidden], .link-view[hidden], .link-edit[hidden], .link-error[hidden] { display: none; } .bubble { display: flex; align-items: center; gap: 2px; padding: 4px; } .bubble-btn { position: relative; display: inline-grid; place-items: center; min-width: 28px; height: 28px; margin: 0; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--foreground, #16181d); font-family: var(--font-sans, "Atkinson Hyperlegible Next", sans-serif); font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; transition: background-color 150ms ease-out; } .bubble-btn:hover:not(:disabled) { background: var(--sidebar-accent, #e3e6eb); } .bubble-btn[aria-pressed="true"] { background: var(--active-row, #d9ebd3); } .bubble-btn:disabled { opacity: 0.4; cursor: not-allowed; } .bubble-btn[data-command="italic"] .bubble-glyph { font-style: italic; font-weight: 500; } .bubble-btn[data-command="bold"] .bubble-glyph { font-weight: 800; } .bubble-btn[data-command="code"] .bubble-glyph { font-family: var(--font-mono, "Atkinson Hyperlegible Mono", ui-monospace, monospace); font-size: 12px; font-weight: 500; } .link-popover { width: min(360px, calc(100vw - 16px)); box-sizing: border-box; padding: 10px; } .link-row { display: flex; gap: 6px; } .link-input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--border, #e3e5ea); border-radius: 6px; background: var(--card, #ffffff); color: var(--foreground, #16181d); font-family: var(--font-mono, "Atkinson Hyperlegible Mono", ui-monospace, monospace); font-size: 13px; } .link-input[aria-invalid="true"] { border-color: var(--bad, #b3261e); } .link-input::placeholder { color: var(--muted-foreground, #5b6270); } .link-error { margin: 6px 0 0; color: var(--bad, #b3261e); font-size: 12px; line-height: 16px; } .link-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .link-view { display: grid; gap: 2px; } .link-href { display: block; color: var(--link, #8a5a00); font-family: var(--font-mono, "Atkinson Hyperlegible Mono", ui-monospace, monospace); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; } .btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border, #e3e5ea); border-radius: 6px; background: var(--card, #ffffff); color: var(--foreground, #16181d); font-family: var(--font-sans, "Atkinson Hyperlegible Next", sans-serif); font-size: 13px; font-weight: 500; line-height: 1; cursor: pointer; transition: background-color 150ms ease-out; } .btn:hover:not(:disabled) { background: var(--sidebar-accent, #e3e6eb); } .btn:disabled { opacity: 0.45; cursor: not-allowed; } .btn-primary { border-color: transparent; background: var(--primary, #f2b600); color: var(--primary-foreground, #16181d); } .btn-primary:hover:not(:disabled) { background: var(--primary, #f2b600); opacity: 0.9; } .btn-primary .keycaps { margin-inline-start: 2px; } .btn-primary .keycap { border-color: transparent; border-bottom-color: color-mix(in srgb, var(--primary-foreground, #16181d) 35%, transparent); background: transparent; color: inherit; } .slash-menu { width: 264px; max-width: calc(100vw - 16px); box-sizing: border-box; padding: 4px; } .slash-list { max-height: 288px; overflow-y: auto; } .slash-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; padding: 0 8px; border-radius: 6px; color: var(--foreground, #16181d); cursor: pointer; } .slash-item[aria-selected="true"] { background: var(--active-row, #d9ebd3); } .slash-item .keycaps { margin-inline-start: 0; } .slash-empty { padding: 8px; color: var(--muted-foreground, #5b6270); font-size: 13px; } .slash-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-top: 4px; padding: 6px 8px 2px; border-top: 1px solid var(--border, #e3e5ea); color: var(--muted-foreground, #5b6270); font-family: var(--font-mono, "Atkinson Hyperlegible Mono", ui-monospace, monospace); font-size: 11px; line-height: 16px; } .slash-footer .keycaps { margin-inline-start: 0; } /* Note suggestions: long titles are cut with an ellipsis */ .note-menu .slash-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* ---- Editor surface ---- */ #editor { max-width: calc(68ch + 48px); margin: 0 auto; padding: 32px 24px 30vh; box-sizing: border-box; } #editor .ProseMirror { min-height: 60vh; max-width: 68ch; margin: 0 auto; outline: none; color: var(--foreground, #16181d); caret-color: var(--foreground, #16181d); font-family: var(--font-sans, "Atkinson Hyperlegible Next", sans-serif); font-size: 17px; line-height: 1.65; overflow-wrap: break-word; word-wrap: break-word; font-variant-ligatures: common-ligatures; } #editor .ProseMirror:focus, #editor .ProseMirror:focus-visible { outline: none; } #editor .ProseMirror > * + * { margin-top: 0.75em; } #editor .ProseMirror ::selection, #editor .ProseMirror::selection { background: var(--mark, #ffe08a); color: var(--foreground, #16181d); } #editor .ProseMirror p { margin: 0; } /* Placeholder: shown by the placeholder decoration while the note is empty. */ #editor .ProseMirror p.is-placeholder::before { content: attr(data-placeholder); float: left; height: 0; color: var(--muted-foreground, #5b6270); pointer-events: none; } /* Headings: 30/36, 23/30, 19/26, all bold. */ #editor .ProseMirror h1, #editor .ProseMirror h2, #editor .ProseMirror h3 { margin: 0; color: var(--foreground, #16181d); font-weight: 700; letter-spacing: -0.01em; } #editor .ProseMirror > * + h1, #editor .ProseMirror > * + h2, #editor .ProseMirror > * + h3 { margin-top: 1.4em; } #editor .ProseMirror h1 { font-size: 30px; line-height: 36px; } #editor .ProseMirror h2 { font-size: 23px; line-height: 30px; } #editor .ProseMirror h3 { font-size: 19px; line-height: 26px; } /* Lists */ #editor .ProseMirror ul, #editor .ProseMirror ol { margin: 0; padding-left: 1.6em; } #editor .ProseMirror ul { list-style: disc; } #editor .ProseMirror ol { list-style: decimal; } #editor .ProseMirror ul ul { list-style: circle; } #editor .ProseMirror ul ul ul { list-style: square; } #editor .ProseMirror li { margin: 0.2em 0; } #editor .ProseMirror li::marker { color: var(--muted-foreground, #5b6270); } #editor .ProseMirror li > p + p, #editor .ProseMirror li > * + ul, #editor .ProseMirror li > * + ol { margin-top: 0.2em; } /* Quote */ #editor .ProseMirror blockquote { margin: 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--border, #e3e5ea); color: var(--muted-foreground, #5b6270); } /* Code: mono on the background token, hairline border */ #editor .ProseMirror code { padding: 1px 5px; border: 1px solid var(--border, #e3e5ea); border-radius: 6px; background: var(--background, #f5f6f8); color: var(--foreground, #16181d); font-family: var(--font-mono, "Atkinson Hyperlegible Mono", ui-monospace, monospace); font-size: 0.88em; } #editor .ProseMirror pre { margin: 0; padding: 12px 14px; border: 1px solid var(--border, #e3e5ea); border-radius: 10px; background: var(--background, #f5f6f8); color: var(--foreground, #16181d); font-family: var(--font-mono, "Atkinson Hyperlegible Mono", ui-monospace, monospace); font-size: 14px; line-height: 22px; overflow-x: auto; white-space: pre; } #editor .ProseMirror pre code { padding: 0; border: 0; border-radius: 0; background: none; font-size: inherit; } /* Marks: search-style highlight */ #editor .ProseMirror mark { padding: 0 0.1em; border-radius: 3px; background: var(--mark, #ffe08a); color: inherit; } /* Links: accent ink with a quiet underline */ #editor .ProseMirror a { color: var(--link, #8a5a00); text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--link, #8a5a00) 45%, transparent); text-underline-offset: 3px; cursor: pointer; } #editor .ProseMirror a:hover { text-decoration-color: var(--link, #8a5a00); } /* Note links (href /notes/): a tinted chip, underlined only on hover */ #editor .ProseMirror a[href^="/notes/"] { padding: 0 0.2em; border-radius: 4px; background: color-mix(in srgb, var(--link, #8a5a00) 12%, transparent); text-decoration-line: none; box-decoration-break: clone; -webkit-box-decoration-break: clone; } #editor .ProseMirror a[href^="/notes/"]:hover { text-decoration-line: underline; } /* Horizontal rule */ #editor .ProseMirror hr { margin: 2em 0; border: 0; border-top: 1px solid var(--border, #e3e5ea); } #editor .ProseMirror hr.ProseMirror-selectednode { outline: 2px solid var(--ring, #8a5a00); outline-offset: 4px; border-radius: 2px; } /* ---- Remote cursors and selections (loro-prosemirror classes) ---- */ .ProseMirror-loro-cursor { position: relative; margin-left: -1px; margin-right: -1px; /* border-color is set inline per user */ border-left: 2px solid; word-break: normal; pointer-events: none; } /* Name label in the user's color, mono 11px. */ .ProseMirror-loro-cursor > div { position: absolute; top: -1.5em; left: -2px; padding: 0 5px; border-radius: 4px 4px 4px 0; /* background-color is set inline per user */ color: #ffffff; font-family: var(--font-mono, "Atkinson Hyperlegible Mono", ui-monospace, monospace); font-size: 11px; font-weight: 500; line-height: 16px; white-space: nowrap; user-select: none; } .loro-selection { border-radius: 2px; } @media (prefers-reduced-motion: reduce) { .editor-toolbar-btn, .bubble-btn, .btn, .tip, #sync-status { transition-duration: 0ms !important; transition-delay: 0ms !important; } } @media (forced-colors: active) { .editor-toolbar-btn[aria-pressed="true"], .bubble-btn[aria-pressed="true"], .slash-item[aria-selected="true"] { outline: 2px solid CanvasText; } }