/* SPDX-License-Identifier: AGPL-3.0-or-later */ @import "katex/dist/katex.min.css"; @import "@docwell/canvas/canvas.css"; /* Tailwind classes used by the editor's own components (menus, find bar). */ @source "./"; /* Document styles for the Docwell editor, from the design system's Document type scale. Uses tokens from @docwell/ui/theme.css. */ .dw-prose { outline: none; font-family: var(--font-sans); font-size: var(--text-doc-body); line-height: var(--text-doc-body--line-height); color: var(--color-ink); min-height: 12rem; } /* Paragraph blocks sit space-2 apart; a heading gets space-5 above it. */ .dw-prose > * + * { margin-top: 8px; } .dw-prose > :is(h1, h2, h3, h4, h5, h6) { margin-top: 20px; } .dw-prose h1 { font-family: var(--font-serif); font-size: var(--text-doc-h1); line-height: var(--text-doc-h1--line-height); font-weight: 600; } .dw-prose h2 { font-family: var(--font-serif); font-size: var(--text-doc-h2); line-height: var(--text-doc-h2--line-height); font-weight: 600; } .dw-prose h3 { font-size: var(--text-doc-h3); line-height: var(--text-doc-h3--line-height); font-weight: 600; } .dw-prose ul { list-style: disc; padding-left: 1.5rem; } .dw-prose ol { list-style: decimal; padding-left: 1.5rem; } .dw-prose a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; } .dw-prose blockquote { border-left: 3px solid var(--color-line); padding-left: 1rem; color: var(--color-ink-muted); } .dw-prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--color-code-bg); padding: 0.1em 0.3em; border-radius: var(--radius-xs); } .dw-prose pre { font-family: var(--font-mono); font-size: var(--text-code); line-height: var(--text-code--line-height); background: var(--color-code-bg); padding: 12px 16px; border-radius: var(--radius-md); overflow-x: auto; } .dw-prose pre code { background: none; padding: 0; font-size: inherit; } .dw-prose hr { border: none; border-top: 1px solid var(--color-line); margin: 24px 0; } .dw-prose ::selection { background: var(--color-selection); } .dw-prose p.is-editor-empty:first-child::before { content: attr(data-placeholder); color: var(--color-ink-faint); float: left; height: 0; pointer-events: none; } .dw-prose img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-md); } .dw-prose img.ProseMirror-selectednode, .dw-prose .dw-file-block.ProseMirror-selectednode .dw-file, .dw-prose .ProseMirror-selectednode:is(.dw-mermaid, .dw-diagram, .dw-toc, .tiptap-mathematics-render) { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; } /* A non-image attachment: a one-line download card. */ .dw-prose .dw-file { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface-raised); font-family: var(--font-sans); font-size: var(--text-ui-md); } .dw-prose .dw-file__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dw-prose .dw-file__size { color: var(--color-ink-muted); font-size: var(--text-ui-sm); } .dw-prose .dw-file__action { border: 1px solid var(--color-line); border-radius: var(--radius-sm); padding: 2px 8px; color: var(--color-ink); font-size: var(--text-ui-sm); font-weight: 600; cursor: pointer; } .dw-prose .dw-file__action:hover { background: var(--color-surface-hover); } .dw-prose .dw-file__action:disabled { cursor: progress; opacity: 0.7; } .dw-prose .dw-file__status { display: block; margin-top: 4px; color: var(--color-danger); font-family: var(--font-sans); font-size: var(--text-ui-sm); } .dw-prose .dw-file__status:empty { display: none; } /* Other editors' carets (CollaborationCaret's default render). */ .dw-prose .collaboration-carets__caret { position: relative; margin-left: -1px; margin-right: -1px; border-left: 1px solid; border-right: 1px solid; word-break: normal; pointer-events: none; } .dw-prose .collaboration-carets__label { position: absolute; top: -1.4em; left: -1px; padding: 0.1rem 0.3rem; border-radius: var(--radius-xs) var(--radius-xs) var(--radius-xs) 0; font-family: var(--font-sans); font-size: 12px; font-weight: 600; line-height: normal; color: #fff; white-space: nowrap; user-select: none; } /* "@" mentions. */ .dw-prose .dw-mention { border-radius: var(--radius-xs); background: var(--color-accent-soft); padding: 0 0.15em; font-weight: 500; white-space: nowrap; } /* Dates in the text; a reminder shows a bell, and one whose day has passed is muted. */ .dw-prose .dw-date { display: inline-flex; align-items: center; gap: 0.2em; border-radius: var(--radius-xs); background: var(--color-surface-hover); padding: 0 0.25em; font-weight: 500; white-space: nowrap; cursor: default; } .dw-prose .dw-date svg { flex-shrink: 0; color: var(--color-ink-muted); } .dw-prose .dw-date.is-reminder { background: var(--color-accent-soft); } .dw-prose .dw-date.is-past { color: var(--color-ink-muted); text-decoration: line-through; } .dw-prose[contenteditable="true"] .dw-date, .dw-prose .dw-date.is-link { cursor: pointer; } .dw-prose[contenteditable="false"] .dw-date.is-link:hover { text-decoration: underline; } .dw-date-pop__open { align-self: flex-start; border: 0; background: none; padding: 0; font: inherit; color: var(--color-accent); cursor: pointer; } .dw-date-pop__open:hover { text-decoration: underline; } .dw-date-pop { position: fixed; z-index: 60; left: 0; top: 0; display: flex; flex-direction: column; gap: 8px; width: 16rem; max-width: calc(100vw - 16px); padding: 10px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface-raised); box-shadow: var(--shadow-menu); font-family: var(--font-sans); font-size: var(--text-ui-sm); color: var(--color-ink); } .dw-date-pop__check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; } .dw-date-pop__note { margin: 0; color: var(--color-ink-muted); font-size: var(--text-ui-xs); } /* Commented text; the active comment's text stands out more. */ .dw-prose .dw-comment { background: color-mix(in srgb, var(--color-warning-soft) 70%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--color-warning) 55%, transparent); cursor: pointer; } .dw-prose .dw-comment.is-active { background: var(--color-warning-soft); border-bottom-color: var(--color-warning); } /* The "/" and "@" popups (suggestion.ts): the design system's slash menu, drawn without a framework so every host can show it. */ .dw-suggest { position: fixed; z-index: 60; left: 0; top: 0; width: 20rem; max-width: calc(100vw - 16px); max-height: 22rem; overflow-y: auto; padding: 4px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface-raised); box-shadow: var(--dw-shadow-menu); font-family: var(--font-sans); } .dw-suggest__query { padding: 8px 8px 4px; font-family: var(--font-mono); font-size: var(--text-ui-xs); color: var(--color-ink-muted); } .dw-suggest__empty { padding: 6px 8px; font-size: var(--text-ui-sm); color: var(--color-ink-muted); } .dw-suggest__item { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer; } .dw-suggest__item.is-active { background: var(--color-surface-hover); } .dw-suggest__icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-ink-muted); } .dw-suggest__text { display: flex; flex-direction: column; min-width: 0; } .dw-suggest__label { font-size: var(--text-ui-md); font-weight: 500; color: var(--color-ink); } .dw-suggest__desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-ui-xs); color: var(--color-ink-muted); } /* ---- Math (KaTeX) ---- */ .dw-prose .tiptap-mathematics-render { cursor: default; } .dw-prose.ProseMirror[contenteditable="true"] .tiptap-mathematics-render { cursor: pointer; border-radius: var(--radius-xs); } .dw-prose.ProseMirror[contenteditable="true"] .tiptap-mathematics-render:hover { background: var(--color-surface-hover); } .dw-prose [data-type="block-math"] { display: block; text-align: center; padding: 8px 0; overflow-x: auto; } /* ---- Mermaid ---- */ .dw-prose .dw-mermaid { padding: 12px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface-raised); overflow-x: auto; text-align: center; } .dw-prose.ProseMirror[contenteditable="true"] .dw-mermaid { cursor: pointer; } .dw-prose .dw-mermaid svg { max-width: 100%; height: auto; margin: 0 auto; } .dw-prose .dw-mermaid__source { margin: 0; font-family: var(--font-mono); font-size: var(--text-ui-sm); text-align: left; white-space: pre-wrap; } .dw-prose .dw-mermaid__body--error { font-family: var(--font-mono); font-size: var(--text-ui-sm); color: var(--color-danger); text-align: left; white-space: pre-wrap; } /* ---- Draw.io and Excalidraw drawings ---- */ .dw-prose .dw-diagram { position: relative; margin: 0; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: #fff; overflow: hidden; } .dw-prose .dw-diagram__img { display: block; max-width: 100%; margin: 0 auto; border-radius: 0; } .dw-prose .dw-diagram__empty { margin: 0; padding: 32px 16px; text-align: center; font-family: var(--font-sans); font-size: var(--text-ui-md); color: var(--color-ink-muted); background: var(--color-surface-raised); cursor: pointer; } .dw-prose .dw-diagram__edit { position: absolute; top: 8px; right: 8px; padding: 2px 10px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface-raised); color: var(--color-ink); font: inherit; font-size: var(--text-ui-sm); cursor: pointer; opacity: 0; transition: opacity 0.15s; } .dw-prose .dw-diagram:hover .dw-diagram__edit, .dw-prose .dw-diagram__edit:focus-visible { opacity: 1; } @media (hover: none) { .dw-prose .dw-diagram__edit { opacity: 1; } } /* The full-screen layer for the Draw.io or Excalidraw editor. */ .dw-diagram-editor { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: var(--color-surface); } .dw-diagram-editor__frame { flex: 1; width: 100%; border: 0; } .dw-diagram-editor__bar { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--color-line); } .dw-diagram-editor__canvas { flex: 1; min-height: 0; } .dw-diagram-editor__status { padding: 8px 12px; font-size: var(--text-ui-sm); color: var(--color-ink-muted); } /* ---- Table of contents ---- */ .dw-prose .dw-toc { padding: 12px 16px; border-left: 3px solid var(--color-line); font-family: var(--font-sans); font-size: var(--text-ui-md); } .dw-prose .dw-toc__title { margin: 0 0 4px; font-size: var(--text-ui-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-ink-muted); } .dw-prose .dw-toc__list { list-style: none; padding: 0; margin: 0; } .dw-prose .dw-toc__list a { color: var(--color-ink-muted); text-decoration: none; } .dw-prose .dw-toc__list a:hover { color: var(--color-ink); text-decoration: underline; } .dw-prose .dw-toc__empty { color: var(--color-ink-faint); } /* ---- Toggles ---- */ .dw-prose .dw-toggle { display: flex; gap: 4px; align-items: flex-start; } .dw-prose .dw-toggle > button { flex: none; display: grid; place-items: center; width: 24px; height: calc(var(--text-doc-body--line-height) * 1em); border: none; border-radius: var(--radius-xs); background: none; color: var(--color-ink-muted); cursor: pointer; } .dw-prose .dw-toggle > button:hover { background: var(--color-surface-hover); color: var(--color-ink); } .dw-prose .dw-toggle > button::before { content: ""; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid currentColor; transition: transform 0.12s ease; } .dw-prose .dw-toggle.is-open > button::before { transform: rotate(90deg); } .dw-prose .dw-toggle > div { flex: 1; min-width: 0; } .dw-prose .dw-toggle summary { display: block; list-style: none; font-weight: 600; } .dw-prose .dw-toggle summary::-webkit-details-marker { display: none; } .dw-prose .dw-toggle [data-type="detailsContent"] > * + * { margin-top: 8px; } .dw-prose .dw-toggle [data-type="detailsContent"] { margin-top: 4px; } .dw-prose .dw-toggle [data-type="detailsContent"][hidden] { display: none; } /* ---- Embeds and link cards ---- */ .dw-prose .dw-embed { margin: 0; } .dw-prose .dw-embed__frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface-sunken); } .dw-prose .dw-embed[data-ratio="audio"] .dw-embed__frame { aspect-ratio: auto; height: 152px; } .dw-prose .dw-embed[data-ratio="tall"] .dw-embed__frame { aspect-ratio: 4 / 5; max-height: 80vh; } .dw-prose .dw-embed__caption { margin-top: 4px; font-family: var(--font-sans); font-size: var(--text-ui-sm); color: var(--color-ink-muted); } .dw-prose .dw-embed__caption a { color: inherit; } .dw-prose .dw-linkcard { display: flex; align-items: stretch; gap: 12px; overflow: hidden; border: 1px solid var(--color-line); border-radius: var(--radius-md); color: var(--color-ink); text-decoration: none; font-family: var(--font-sans); } .dw-prose .dw-linkcard:hover { background: var(--color-surface-hover); } .dw-prose .dw-linkcard__text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; padding: 10px 14px; } .dw-prose .dw-linkcard__title { font-size: var(--text-ui-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dw-prose .dw-linkcard__desc { font-size: var(--text-ui-sm); color: var(--color-ink-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .dw-prose .dw-linkcard__site { font-size: var(--text-ui-xs); color: var(--color-ink-faint); } .dw-prose .dw-linkcard__image { flex: none; width: 30%; max-width: 200px; max-height: 120px; object-fit: cover; } .dw-prose .dw-linkcard__head { display: flex; align-items: center; gap: 8px; min-width: 0; } .dw-prose .dw-linkcard__status { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--dw-bg); color: var(--dw-c); font-size: var(--text-ui-xs); font-weight: 600; white-space: nowrap; } .dw-prose .dw-linkcard__image--avatar { width: 40px; height: 40px; margin: 12px 14px 12px 0; border-radius: var(--radius-sm); object-fit: cover; } .dw-prose .ProseMirror-selectednode:is(.dw-embed, .dw-linkcard) { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; border-radius: var(--radius-md); } /* ---- Block links ---- */ .dw-block-host { position: relative; } .dw-block-gutter { position: absolute; /* The padding covers the gap to the text, so the pointer can cross it. */ right: 100%; padding-right: 6px; display: flex; gap: 2px; } /* The block the cursor is in. */ .dw-prose.ProseMirror-focused > .dw-block-current { border-radius: var(--radius-sm); background: var(--color-surface-hover); box-shadow: 0 0 0 4px var(--color-surface-hover); } .dw-block-gutter[hidden], .dw-block-handle[hidden] { display: none; } .dw-block-handle { display: grid; place-items: center; width: 22px; height: 22px; border: none; border-radius: var(--radius-xs); background: none; color: var(--color-ink-faint); cursor: pointer; } .dw-block-handle:hover { background: var(--color-surface-hover); color: var(--color-ink); } /* Phones have no margin to spare and no hover. */ @media (max-width: 640px), (hover: none) { .dw-block-gutter { display: none; } } /* ---- The floating source editor (math, Mermaid) ---- */ .dw-source { position: absolute; z-index: 60; width: min(32rem, calc(100vw - 16px)); padding: 8px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface-raised); box-shadow: var(--dw-shadow-menu); } .dw-source__field { display: block; width: 100%; padding: 6px 8px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-ink); font: inherit; font-size: var(--text-ui-md); resize: vertical; } .dw-source__field--mono { font-family: var(--font-mono); font-size: var(--text-ui-sm); } .dw-source__field:focus { outline: 2px solid var(--color-focus-ring); outline-offset: 1px; } .dw-source__actions { display: flex; gap: 6px; margin-top: 8px; } .dw-source__btn { padding: 3px 10px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-ink); font: inherit; font-size: var(--text-ui-sm); cursor: pointer; } .dw-source__btn:hover { background: var(--color-surface-hover); } .dw-source__btn--primary { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); } .dw-source__btn--primary:hover { background: var(--color-primary-hover); } .dw-source__btn--danger { color: var(--color-danger); } /* Find in page: every match, and the one the bar is on. */ .dw-prose .dw-find { background: color-mix(in srgb, var(--color-accent) 22%, transparent); border-radius: 2px; } .dw-prose .dw-find-current { background: color-mix(in srgb, var(--color-accent) 50%, transparent); outline: 1px solid var(--color-accent); } /* The page's body font, chosen per page; headings follow it too. */ .dw-font-serif .dw-prose, .dw-font-serif .dw-prose :is(h1, h2, h3, h4, h5, h6) { font-family: var(--font-serif); } .dw-font-mono .dw-prose, .dw-font-mono .dw-prose :is(h1, h2, h3, h4, h5, h6) { font-family: var(--font-mono); } /* ---- Headings 4–6 ("Other headings") ---- */ .dw-prose h4 { font-size: var(--text-doc-body); line-height: var(--text-doc-body--line-height); font-weight: 600; } .dw-prose h5 { font-size: var(--text-ui-md); font-weight: 600; } .dw-prose h6 { font-size: var(--text-ui-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-ink-muted); } /* ---- Palette colours (colors.ts): text, highlight and callout shades ---- */ :root { --dw-c-gray: #6b6f6d; --dw-c-red: #c0392b; --dw-c-orange: #c2571a; --dw-c-yellow: #9a7400; --dw-c-green: #3d7a1f; --dw-c-teal: #1f7f79; --dw-c-blue: #2f6fbf; --dw-c-purple: #7c5cc4; --dw-c-pink: #b8327a; --dw-bg-gray: #ecece9; --dw-bg-red: #fbe3df; --dw-bg-orange: #fbe7d7; --dw-bg-yellow: #fbf1c7; --dw-bg-green: #e4f1d8; --dw-bg-teal: #d9efec; --dw-bg-blue: #dfe9f7; --dw-bg-purple: #ebe4f7; --dw-bg-pink: #f8e0ec; } .dark { --dw-c-gray: #a3a8a5; --dw-c-red: #f08a7e; --dw-c-orange: #f0a26a; --dw-c-yellow: #e5c454; --dw-c-green: #93c96b; --dw-c-teal: #6cc9bf; --dw-c-blue: #86b2ec; --dw-c-purple: #b9a2ec; --dw-c-pink: #eb8fc0; --dw-bg-gray: #34383a; --dw-bg-red: #4a2723; --dw-bg-orange: #4a3020; --dw-bg-yellow: #45391a; --dw-bg-green: #2c3f22; --dw-bg-teal: #1e3d3a; --dw-bg-blue: #22334d; --dw-bg-purple: #352b4d; --dw-bg-pink: #47263a; } [data-color="gray"] { --dw-c: var(--dw-c-gray); --dw-bg: var(--dw-bg-gray); } [data-color="red"] { --dw-c: var(--dw-c-red); --dw-bg: var(--dw-bg-red); } [data-color="orange"] { --dw-c: var(--dw-c-orange); --dw-bg: var(--dw-bg-orange); } [data-color="yellow"] { --dw-c: var(--dw-c-yellow); --dw-bg: var(--dw-bg-yellow); } [data-color="green"] { --dw-c: var(--dw-c-green); --dw-bg: var(--dw-bg-green); } [data-color="teal"] { --dw-c: var(--dw-c-teal); --dw-bg: var(--dw-bg-teal); } [data-color="blue"] { --dw-c: var(--dw-c-blue); --dw-bg: var(--dw-bg-blue); } [data-color="purple"] { --dw-c: var(--dw-c-purple); --dw-bg: var(--dw-bg-purple); } [data-color="pink"] { --dw-c: var(--dw-c-pink); --dw-bg: var(--dw-bg-pink); } .dw-prose .dw-text-color { color: var(--dw-c); } .dw-prose mark.dw-highlight { background: var(--dw-bg, var(--dw-bg-yellow)); color: inherit; border-radius: 2px; padding: 0 1px; } /* The swatches in the selection toolbar's colour panel. */ .dw-swatch { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--color-line); border-radius: var(--radius-xs); background: var(--color-surface); font-family: var(--font-sans); font-size: 12px; font-weight: 700; color: var(--dw-c, var(--color-ink)); cursor: pointer; } .dw-swatch--fill { background: var(--dw-bg); } .dw-swatch--none { background: linear-gradient(135deg, transparent 45%, var(--color-danger) 45% 55%, transparent 55%); } .dw-swatch[aria-pressed="true"], .dw-swatch:hover { outline: 2px solid var(--color-focus-ring); outline-offset: 1px; } /* ---- Callouts ---- */ .dw-prose .dw-callout { display: flex; gap: 10px; padding: 12px 16px 12px 12px; border-radius: var(--radius-md); background: var(--dw-bg, var(--dw-bg-blue)); } .dw-callout__side { display: flex; flex-direction: column; align-items: center; gap: 4px; user-select: none; } .dw-callout__emoji { display: grid; place-items: center; width: 28px; height: 28px; border: none; border-radius: var(--radius-sm); background: none; font-size: 20px; line-height: 1; cursor: pointer; } .dw-callout__emoji:hover { background: color-mix(in srgb, var(--dw-c) 14%, transparent); } .dw-callout__color { width: 12px; height: 12px; border: 2px solid var(--color-surface); border-radius: 50%; background: var(--dw-c); cursor: pointer; opacity: 0; } .dw-callout:hover .dw-callout__color, .dw-callout__color:focus-visible { opacity: 1; } .dw-prose[contenteditable="false"] .dw-callout__color { display: none; } .dw-prose[contenteditable="false"] .dw-callout__emoji { cursor: default; } .dw-callout__body { flex: 1; min-width: 0; padding-top: 2px; } .dw-callout__body > * + * { margin-top: 8px; } /* ---- To-do lists ---- */ .dw-prose ul[data-type="taskList"] { list-style: none; padding-left: 2px; } .dw-prose ul[data-type="taskList"] li { display: flex; align-items: flex-start; gap: 8px; } .dw-prose ul[data-type="taskList"] li > label { flex-shrink: 0; margin-top: 0.3em; user-select: none; } .dw-prose ul[data-type="taskList"] li > label input { width: 16px; height: 16px; accent-color: var(--color-primary); cursor: pointer; } .dw-prose ul[data-type="taskList"] li > div { flex: 1; min-width: 0; } .dw-prose ul[data-type="taskList"] li[data-checked="true"] > div > p { color: var(--color-ink-muted); text-decoration: line-through; } .dw-prose ul[data-type="taskList"] ul[data-type="taskList"] { margin-top: 4px; } /* ---- Tables ---- */ .dw-prose .tableWrapper { overflow-x: auto; margin: 12px 0; } .dw-prose table { border-collapse: collapse; table-layout: fixed; width: 100%; overflow: hidden; } .dw-prose :is(td, th) { position: relative; min-width: 60px; padding: 6px 10px; border: 1px solid var(--color-line-strong); vertical-align: top; box-sizing: border-box; } .dw-prose :is(td, th) > * + * { margin-top: 6px; } .dw-prose th { background: var(--color-surface-sunken); font-weight: 600; text-align: left; } .dw-prose .selectedCell::after { content: ""; position: absolute; inset: 0; background: var(--color-selection); pointer-events: none; } .dw-prose .column-resize-handle { position: absolute; top: 0; right: -2px; bottom: -2px; width: 4px; background: var(--color-focus-ring); pointer-events: none; } .dw-prose.resize-cursor { cursor: col-resize; } /* ---- Code line numbers ---- */ .dw-prose pre.dw-code { display: flex; gap: 12px; } .dw-prose pre.dw-code > code { flex: 1; min-width: 0; } .dw-prose pre .dw-code__gutter { display: none; flex-shrink: 0; min-width: 1.5em; padding-right: 10px; border-right: 1px solid var(--color-line); color: var(--color-ink-faint); text-align: right; /* ProseMirror resets white-space on parts that are not editable. */ white-space: pre; user-select: none; } .dw-prose pre.dw-code--numbered .dw-code__gutter { display: block; } /* ---- PDFs shown inline ---- */ .dw-prose .dw-file-block > * + * { margin-top: 6px; } .dw-pdf { display: flex; flex-direction: column; gap: 8px; max-height: 560px; padding: 8px; overflow-y: auto; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface-sunken); } .dw-pdf:focus-visible { outline: 2px solid var(--color-focus-ring); } .dw-pdf__page { width: 100%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); } .dw-pdf__page canvas { display: block; width: 100%; height: auto; } .dw-pdf__status { padding: 24px; text-align: center; font-family: var(--font-sans); font-size: var(--text-ui-sm); color: var(--color-ink-muted); } /* ---- The block grip and its menu ---- */ .dw-block-grip { cursor: grab; } .dw-block-grip[aria-expanded="true"] { background: var(--color-surface-hover); color: var(--color-ink); } .dw-block-menu { width: 15rem; } .dw-block-menu .dw-suggest__item { width: 100%; border: none; background: none; font: inherit; text-align: left; cursor: pointer; } .dw-block-menu .dw-suggest__item.is-active { background: var(--color-surface-hover); } .dw-block-menu .dw-suggest__item:focus { outline: none; } .dw-block-menu .dw-suggest__item.is-danger :is(.dw-suggest__label, .dw-suggest__icon) { color: var(--color-danger); } .dw-suggest__more, .dw-block-menu__more { margin-left: auto; color: var(--color-ink-faint); } /* ---- Moving table rows and columns (tablemove.ts) ---- */ .dw-table-grip { position: absolute; z-index: 5; display: grid; place-items: center; width: 14px; height: 22px; padding: 0; border: 1px solid var(--color-line-strong); border-radius: var(--radius-xs); background: var(--color-surface-raised); color: var(--color-ink-faint); cursor: grab; touch-action: none; } .dw-table-grip--column { width: 22px; height: 14px; } .dw-table-grip::before { content: ""; width: 4px; height: 10px; background: radial-gradient(circle, currentColor 1px, transparent 1.5px) 0 0 / 4px 4px; } .dw-table-grip--column::before { width: 10px; height: 4px; } .dw-table-grip:hover, .dw-table-grip:active { color: var(--color-ink); border-color: var(--color-focus-ring); } .dw-table-grip:active { cursor: grabbing; } .dw-table-grip[hidden], .dw-table-drop[hidden] { display: none; } .dw-table-drop { position: absolute; z-index: 5; background: var(--color-focus-ring); pointer-events: none; } .dw-prose .dw-table-dragging { opacity: 0.45; } @media (max-width: 640px), (hover: none) { .dw-table-grip { display: none; } } /* ---- Synced pages (syncedpage.ts) ---- */ .dw-prose .dw-synced { margin: 0.75em 0; border: 1px solid var(--color-line); border-left: 3px solid var(--color-accent); border-radius: var(--radius-sm); background: var(--color-surface); } .dw-prose .dw-synced__head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--color-line); font-family: var(--font-sans); font-size: 13px; color: var(--color-ink-muted); } .dw-prose .dw-synced.is-folded .dw-synced__head { border-bottom: 0; } .dw-prose .dw-synced__badge { flex: none; color: var(--color-accent); } .dw-prose .dw-synced__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--color-ink); text-decoration: none; } .dw-prose .dw-synced__title:hover { text-decoration: underline; } .dw-prose .dw-synced__btn { flex: none; border: 0; border-radius: var(--radius-xs); background: none; padding: 2px 6px; font: inherit; color: inherit; cursor: pointer; } .dw-prose .dw-synced__btn:hover { background: var(--color-surface-hover); color: var(--color-ink); } .dw-prose .dw-synced__body { padding: 4px 14px; } .dw-prose .dw-synced__body:empty { display: none; } .dw-prose .dw-synced__body .dw-prose > :first-child { margin-top: 0.5em; } .dw-prose .dw-synced__note { margin: 0.5em 0; font-family: var(--font-sans); font-size: 13px; color: var(--color-ink-muted); } /* The reader's text size (account settings, kept per device). */ .dw-size-sm { --text-doc-body: 14px; --text-doc-body--line-height: 24px; } .dw-size-lg { --text-doc-body: 18px; --text-doc-body--line-height: 30px; } .dw-prose .dw-synced__body .dw-prose { min-height: 0; } /* ---- Databases (database/): table, kanban and calendar views ---- */ .dw-db-node { margin: 1em 0; } .dw-db { font-family: var(--font-sans); font-size: 14px; color: var(--color-ink); } .dw-db__head { margin-bottom: 4px; } .dw-db__title, .dw-db__title-input { font-size: 1.25rem; font-weight: 650; line-height: 1.3; } .dw-db__title .is-empty { color: var(--color-ink-faint); } .dw-db__title-input { width: 100%; padding: 2px 0; border: none; background: none; color: inherit; font-family: inherit; } .dw-db__title-input:focus { outline: none; } .dw-db__title-input::placeholder { color: var(--color-ink-faint); } .dw-db__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding-bottom: 4px; border-bottom: 1px solid var(--color-line); } .dw-db__tabs, .dw-db__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; } .dw-db__tab, .dw-db__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 8px; border: none; border-radius: var(--radius-sm); background: none; color: var(--color-ink-muted); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; } .dw-db__tab:hover, .dw-db__btn:hover:not(:disabled) { background: var(--color-surface-hover); color: var(--color-ink); } .dw-db__tab.is-active { color: var(--color-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--color-accent); border-radius: var(--radius-sm) var(--radius-sm) 0 0; } .dw-db__btn--icon { width: 28px; padding: 0; justify-content: center; } .dw-db__btn.is-on { color: var(--color-accent); } .dw-db__btn:disabled { opacity: 0.4; cursor: default; } .dw-db__btn[hidden] { display: none; } .dw-db__btn--primary { background: var(--color-primary); color: var(--color-on-primary); } .dw-db__btn--primary:hover:not(:disabled) { background: var(--color-primary-hover); color: var(--color-on-primary); } .dw-db__tab:focus-visible, .dw-db__btn:focus-visible, .dw-db-t__head:focus-visible, .dw-db-t__wrap:focus-visible, .dw-db-k__card:focus-visible, .dw-db-peek__value:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 1px; } .dw-db__search { width: 12rem; max-width: 50vw; } .dw-db__search[hidden] { display: none; } .dw-db__bulk { display: flex; align-items: center; gap: 8px; padding: 4px 8px; margin-top: 4px; border-radius: var(--radius-sm); background: var(--color-accent-soft); font-size: 13px; } .dw-db__bulk[hidden] { display: none; } .dw-db__empty { margin: 12px 0; color: var(--color-ink-faint); font-size: 13px; } .dw-db__more { margin-top: 4px; } .dw-db-input { width: 100%; min-height: 30px; padding: 4px 8px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-ink); font: inherit; font-size: 13px; } .dw-db-input--small { width: 9rem; } .dw-db-input:focus, .dw-db-select:focus { outline: 2px solid var(--color-focus-ring); outline-offset: -1px; } .dw-db-select { min-height: 30px; max-width: 12rem; padding: 2px 6px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-ink); font: inherit; font-size: 13px; } /* Tags (select choices), people and files inside cells. */ .dw-db-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; min-width: 0; } .dw-db-tag { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 0 6px; border-radius: var(--radius-xs); background: var(--dw-bg, var(--dw-bg-gray)); color: var(--color-ink); font-size: 12.5px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dw-db-tag__x { padding: 0 2px; border: none; background: none; color: var(--color-ink-muted); font: inherit; cursor: pointer; } .dw-db-person, .dw-db-file { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--color-ink); text-decoration: none; white-space: nowrap; } .dw-db-person__dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--color-accent-soft); color: var(--color-accent); font-size: 10px; font-weight: 700; } .dw-db-check { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1.5px solid var(--color-line-strong); border-radius: 4px; vertical-align: middle; } .dw-db-check.is-on { border-color: var(--color-accent); background: var(--color-accent); color: var(--color-on-primary); } .dw-db-progress { display: inline-flex; align-items: center; gap: 8px; width: 100%; } .dw-db-progress__bar { flex: 1; height: 6px; border-radius: 3px; background: var(--color-surface-sunken); overflow: hidden; } .dw-db-progress__fill { display: block; height: 100%; background: var(--color-accent); } .dw-db-progress__num { min-width: 3ch; color: var(--color-ink-muted); font-size: 12px; font-variant-numeric: tabular-nums; } .dw-db-cell__title { font-weight: 550; } .dw-db-cell__title.is-empty { color: var(--color-ink-faint); font-weight: 400; } .dw-db-cell__number { display: block; text-align: right; font-variant-numeric: tabular-nums; } .dw-db-cell__link { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; } /* ---- Table view ---- */ .dw-db-t__wrap { overflow-x: auto; outline: none; } .dw-prose .dw-db-t, .dw-db-t { width: max-content; min-width: 100%; margin: 0; border-collapse: collapse; table-layout: fixed; } .dw-prose .dw-db-t th, .dw-prose .dw-db-t td, .dw-db-t th, .dw-db-t td { position: relative; min-width: 0; padding: 0; border: none; border-bottom: 1px solid var(--color-line); background: none; text-align: left; vertical-align: middle; } .dw-prose .dw-db-t th + th, .dw-prose .dw-db-t td.dw-db-t__cell + td.dw-db-t__cell, .dw-db-t th + th, .dw-db-t td.dw-db-t__cell + td.dw-db-t__cell { border-left: 1px solid var(--color-line); } .dw-db-t__gutter-col { width: 48px; } .dw-db-t__add-col { width: 40px; } .dw-db-t__gutter { white-space: nowrap; } .dw-db-t__pick, .dw-db-t__grip { opacity: 0; vertical-align: middle; } .dw-db-t__grip { display: inline-grid; color: var(--color-ink-faint); cursor: grab; } .dw-db-t tr:hover .dw-db-t__pick, .dw-db-t tr:hover .dw-db-t__grip, .dw-db-t tr.is-picked .dw-db-t__pick, .dw-db-t__pick:focus-visible { opacity: 1; } .dw-db-t tr.is-picked td { background: var(--color-accent-soft); } .dw-db-t__head { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 34px; padding: 0 8px; border: none; background: none; color: var(--color-ink-muted); font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; } .dw-db-t__head:hover { background: var(--color-surface-hover); } .dw-db-t__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dw-db-t__name-input { width: 100%; min-height: 34px; padding: 0 8px; border: none; background: var(--color-surface); color: var(--color-ink); font: inherit; font-size: 13px; outline: 2px solid var(--color-focus-ring); outline-offset: -2px; } .dw-db-t__resize { position: absolute; top: 0; right: -3px; z-index: 1; width: 6px; height: 100%; cursor: col-resize; } .dw-db-t__resize:hover { background: var(--color-accent); } .dw-db-t th.is-drop { box-shadow: inset 3px 0 0 var(--color-accent); } .dw-prose .dw-db-t td.dw-db-t__cell, .dw-db-t__cell { height: 34px; padding: 4px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: default; } .dw-db-t__cell.is-in-range { background: var(--color-selection); } .dw-db-t__cell.is-selected { box-shadow: inset 0 0 0 2px var(--color-focus-ring); } .dw-prose .dw-db-t td.dw-db-t__cell.is-editing { padding: 0; } .dw-db-cell__input { width: 100%; height: 34px; padding: 0 8px; border: none; background: var(--color-surface); color: var(--color-ink); font: inherit; outline: 2px solid var(--color-focus-ring); outline-offset: -2px; } .dw-db-t__open { position: absolute; top: 50%; right: 6px; display: none; align-items: center; gap: 4px; padding: 2px 6px; border: 1px solid var(--color-line); border-radius: var(--radius-xs); background: var(--color-surface-raised); color: var(--color-ink-muted); font: inherit; font-size: 12px; transform: translateY(-50%); cursor: pointer; } .dw-db-t tr:hover .dw-db-t__open, .dw-db-t__open:focus-visible { display: inline-flex; } .dw-db-t tr.is-drop-above td { box-shadow: inset 0 2px 0 var(--color-accent); } .dw-db-t tr.is-drop-below td { box-shadow: inset 0 -2px 0 var(--color-accent); } .dw-db-t__new, .dw-db-t__group { display: inline-flex; align-items: center; gap: 6px; width: 100%; min-height: 32px; padding: 0 8px; border: none; background: none; color: var(--color-ink-faint); font: inherit; font-size: 13px; text-align: left; cursor: pointer; } .dw-db-t__new:hover { background: var(--color-surface-hover); color: var(--color-ink); } .dw-db-t__group { color: var(--color-ink); font-weight: 600; padding-top: 8px; } .dw-db-t__count { color: var(--color-ink-faint); font-size: 12px; font-weight: 400; } .dw-prose .dw-db-t .dw-db-t__group-row td, .dw-prose .dw-db-t .dw-db-t__new-row td { border-bottom-color: transparent; } /* ---- List and gallery views ---- */ .dw-db-i { display: flex; flex-direction: column; gap: 12px; padding: 8px 0 4px; } .dw-db-i__group { display: flex; flex-direction: column; gap: 6px; } .dw-db-i__item { cursor: pointer; min-width: 0; } .dw-db-i__item:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; } .dw-db-i__title { font-weight: 600; min-width: 0; overflow-wrap: anywhere; } .dw-db-i__props { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; font-size: 13px; color: var(--color-ink-muted); } .dw-db-i__prop { min-width: 0; max-width: 100%; } .dw-db-i__new { justify-self: start; } /* List: one line per record, its properties on the right. */ .dw-db-i--list .dw-db-i__items { display: flex; flex-direction: column; } .dw-db-i--list .dw-db-i__item { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-bottom: 1px solid var(--color-line); border-radius: var(--radius-sm); } .dw-db-i--list .dw-db-i__item:hover { background: var(--color-surface-sunken); } .dw-db-i--list .dw-db-i__title { flex: 1 1 auto; } .dw-db-i--list .dw-db-i__props { flex: 0 1 auto; justify-content: flex-end; } /* Gallery: cards in a grid, with a cover image when the view has one. */ .dw-db-i--gallery .dw-db-i__items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; } .dw-db-i--gallery .dw-db-i__item { display: flex; flex-direction: column; gap: 4px; overflow: hidden; padding-bottom: 10px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface-raised); box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); } .dw-db-i--gallery .dw-db-i__item:hover { border-color: var(--color-line-strong); } .dw-db-i--gallery .dw-db-i__title, .dw-db-i--gallery .dw-db-i__props { padding: 0 10px; } .dw-db-i__cover { aspect-ratio: 16 / 9; margin-bottom: 6px; background: var(--color-surface-sunken); } .dw-db-i__cover.is-empty { aspect-ratio: auto; height: 6px; } .dw-db-i__cover img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; } .dw-db-i--gallery .dw-db-i__new { min-height: 80px; justify-content: center; border: 1px dashed var(--color-line); border-radius: var(--radius-md); } @media (max-width: 640px) { .dw-db-i--gallery .dw-db-i__items { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .dw-db-i--list .dw-db-i__item { flex-wrap: wrap; gap: 4px 12px; } .dw-db-i--list .dw-db-i__props { justify-content: flex-start; } } /* ---- Chart view ---- */ .dw-db-ch { padding: 12px 0 4px; } .dw-db-ch__scroll { overflow-x: auto; } .dw-db-ch__svg { display: block; max-width: none; overflow: visible; font-family: inherit; } .dw-db-ch__grid { stroke: var(--color-line); stroke-width: 1; } .dw-db-ch__tick, .dw-db-ch__label { fill: var(--color-ink-muted); font-size: 11px; } .dw-db-ch__value { fill: var(--color-ink); font-size: 11px; font-weight: 600; } .dw-db-ch__bar { fill: var(--dw-c, var(--color-accent)); opacity: 0.85; } .dw-db-ch__bar:hover { opacity: 1; } .dw-db-ch__line { fill: none; stroke: var(--color-accent); stroke-width: 2; stroke-linejoin: round; } .dw-db-ch__dot { fill: var(--color-surface); stroke: var(--color-accent); stroke-width: 2; } .dw-db-ch__pie { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; } .dw-db-ch__slice { fill: none; stroke: var(--dw-c, var(--color-accent)); stroke-width: 28; } .dw-db-ch__slice:hover { stroke-width: 32; } .dw-db-ch__total { fill: var(--color-ink); font-size: 22px; font-weight: 600; } .dw-db-ch__legend { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: 13px; } .dw-db-ch__legend li { display: flex; align-items: center; gap: 8px; min-width: 0; } .dw-db-ch__swatch { flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--dw-c, var(--color-accent)); } .dw-db-ch__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dw-db-ch__num { margin-left: auto; padding-left: 12px; color: var(--color-ink-muted); font-variant-numeric: tabular-nums; } /* ---- Timeline view ---- */ .dw-db-tl { padding-top: 8px; } .dw-db-tl__zoom { display: inline-flex; margin-left: 8px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); overflow: hidden; } .dw-db-tl__zoom .dw-db__btn { border-radius: 0; } .dw-db-tl__zoom .dw-db__btn.is-on { background: var(--color-accent-soft); color: var(--color-ink); } .dw-db-tl__scroll { overflow-x: auto; border: 1px solid var(--color-line); border-radius: var(--radius-md); } .dw-db-tl__grid { --dw-tl-label: 180px; width: calc(var(--dw-tl-label) + var(--dw-tl-width)); } .dw-db-tl__row { display: flex; height: 34px; border-bottom: 1px solid var(--color-line); } .dw-db-tl__row:last-child { border-bottom: none; } .dw-db-tl__row--head { height: 30px; background: var(--color-surface-sunken); } .dw-db-tl__row--new { height: auto; } .dw-db-tl__row--new .dw-db-t__new { position: sticky; left: 0; width: var(--dw-tl-label); } .dw-db-tl__label { position: sticky; left: 0; z-index: 2; flex: 0 0 var(--dw-tl-label); overflow: hidden; padding: 0 10px; border: none; border-right: 1px solid var(--color-line); background: var(--color-surface); color: var(--color-ink); font: inherit; font-size: 13px; line-height: 34px; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; } .dw-db-tl__row--head .dw-db-tl__label { background: var(--color-surface-sunken); cursor: default; } .dw-db-tl__track { position: relative; flex: 0 0 var(--dw-tl-width); /* A faint line between days at the larger scales. */ background-image: linear-gradient(to right, var(--color-line) 1px, transparent 1px); background-size: calc(var(--dw-tl-day) * 7) 100%; } .dw-db-tl__ticks { position: relative; height: 100%; } .dw-db-tl__tick { position: absolute; top: 0; bottom: 0; overflow: visible; padding: 0 4px; color: var(--color-ink-muted); font-size: 11px; line-height: 30px; white-space: nowrap; text-transform: capitalize; } .dw-db-tl__tick.is-weekend { background: rgb(0 0 0 / 0.04); } .dw-db-tl__today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--color-accent); opacity: 0.6; pointer-events: none; } .dw-db-tl__bar { position: absolute; top: 6px; height: 22px; display: flex; align-items: center; overflow: hidden; border-radius: var(--radius-sm); background: var(--color-accent-soft); box-shadow: inset 0 0 0 1px var(--color-accent); color: var(--color-ink); font-size: 12px; cursor: pointer; touch-action: pan-y; user-select: none; } .dw-db-tl__bar.is-cut-start { border-top-left-radius: 0; border-bottom-left-radius: 0; } .dw-db-tl__bar.is-cut-end { border-top-right-radius: 0; border-bottom-right-radius: 0; } .dw-db-tl__bar.is-movable { cursor: grab; } .dw-db-tl__bar.is-dragging { z-index: 3; cursor: grabbing; box-shadow: inset 0 0 0 2px var(--color-accent), 0 2px 6px rgb(0 0 0 / 0.15); } .dw-db-tl__bar:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 1px; } .dw-db-tl__bar-text { overflow: hidden; padding: 0 6px; text-overflow: ellipsis; white-space: nowrap; } .dw-db-tl__handle { position: absolute; top: 0; right: 0; bottom: 0; width: 8px; cursor: ew-resize; } .dw-db-tl__handle::after { content: ""; position: absolute; top: 5px; bottom: 5px; right: 3px; width: 2px; border-radius: 1px; background: var(--color-accent); opacity: 0; } .dw-db-tl__bar:hover .dw-db-tl__handle::after { opacity: 1; } @media (max-width: 640px) { .dw-db-tl__grid { --dw-tl-label: 110px; } .dw-db-tl__zoom { margin-left: 0; } .dw-db-tl .dw-db-c__nav { flex-wrap: wrap; } } @media (hover: none) { /* A wider grip for a finger, always visible. */ .dw-db-tl__handle { width: 16px; } .dw-db-tl__handle::after { opacity: 1; } } /* ---- Kanban view ---- */ .dw-db-k { display: flex; gap: 12px; padding: 12px 0 4px; overflow-x: auto; } .dw-db-k__col { flex: 0 0 260px; display: flex; flex-direction: column; gap: 8px; } .dw-db-k__head { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: 13px; } .dw-db-k__label { font-weight: 600; } .dw-db-k__cards { display: flex; flex-direction: column; gap: 6px; min-height: 48px; padding: 4px; border-radius: var(--radius-md); background: var(--color-surface-sunken); } .dw-db-k__cards.is-drop { outline: 2px dashed var(--color-accent); outline-offset: -2px; } .dw-db-k__card { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface-raised); box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); cursor: pointer; } .dw-db-k__card:hover { border-color: var(--color-line-strong); } .dw-db-k__card.is-dragging { opacity: 0.4; } /* Dragging with a finger (touchdrag.ts): from a handle, with a copy following the finger. */ .dw-db-touch-handle { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } .dw-db-k__card { position: relative; } .dw-db-k__grip { display: none; } @media (hover: none) { /* No hover to reveal the grips: always shown, big enough for a finger. */ .dw-db-t__grip { opacity: 1; padding: 8px 4px; } .dw-db-k__grip { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 36px; height: 36px; color: var(--color-ink-faint); } .dw-db-k__card { padding-right: 36px; } } .dw-db-t tr.is-held td, .dw-db-k__card.is-held, .dw-db-c__chip.is-held { background: var(--color-accent-soft); } .dw-db-t tr.is-dragging td, .dw-db-c__chip.is-dragging { opacity: 0.4; } .dw-db-ghost { box-shadow: var(--shadow-menu, 0 8px 24px rgba(0, 0, 0, 0.2)); opacity: 0.95; } .dw-db-ghost--row { padding: 8px 12px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-sm); background: var(--color-surface-raised); color: var(--color-ink); font-weight: 600; } .dw-db-k__prop .dw-db-cell__number { text-align: left; } .dw-db-k__prop { min-width: 0; overflow: hidden; color: var(--color-ink-muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; } /* ---- Calendar view ---- */ .dw-db-c { padding-top: 8px; } .dw-db-c__nav { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; } .dw-db-c__month { margin-right: auto; font-size: 15px; text-transform: capitalize; } .dw-db-c__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--color-line); border-left: 1px solid var(--color-line); } .dw-db-c__wd { padding: 4px 6px; border-right: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); color: var(--color-ink-muted); font-size: 12px; text-transform: capitalize; } .dw-db-c__day { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 88px; padding: 4px; border-right: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); } .dw-db-c__day.is-out { background: var(--color-surface-sunken); } .dw-db-c__day.is-out .dw-db-c__num { color: var(--color-ink-faint); } .dw-db-c__day.is-drop { background: var(--color-accent-soft); } .dw-db-c__num { align-self: flex-start; min-width: 22px; padding: 0 4px; border-radius: 11px; font-size: 12px; line-height: 22px; text-align: center; } .dw-db-c__day.is-today .dw-db-c__num { background: var(--color-accent); color: var(--color-on-primary); font-weight: 700; } .dw-db-c__chip { display: block; width: 100%; padding: 1px 6px; border: none; border-radius: var(--radius-xs); background: var(--color-accent-soft); color: var(--color-ink); font: inherit; font-size: 12px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; } .dw-db-c__add { position: absolute; top: 4px; right: 4px; display: none; place-items: center; width: 20px; height: 20px; border: none; border-radius: var(--radius-xs); background: var(--color-surface-hover); color: var(--color-ink-muted); cursor: pointer; } .dw-db-c__day:hover .dw-db-c__add, .dw-db-c__add:focus-visible { display: grid; } .dw-db-c__undated { margin-top: 8px; font-size: 13px; color: var(--color-ink-muted); } .dw-db-c__chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; } .dw-db-c__chips .dw-db-c__chip { width: auto; max-width: 16rem; } @media (max-width: 640px) { .dw-db-c__day { min-height: 56px; } .dw-db-c__chip { padding: 0 3px; font-size: 11px; } .dw-db__tools .dw-db__btn span { display: none; } } /* ---- Panels and pickers (outside the page, in body) ---- */ .dw-db-pop { position: fixed; z-index: 70; left: 0; top: 0; display: flex; flex-direction: column; gap: 6px; min-width: 14rem; max-width: calc(100vw - 16px); max-height: 24rem; overflow-y: auto; padding: 8px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface-raised); box-shadow: var(--shadow-menu); color: var(--color-ink); font-family: var(--font-sans); font-size: 13px; } .dw-db-pop--panel { min-width: 20rem; } /* The formula editor (formulaui.ts). */ .dw-db-formula { width: min(28rem, calc(100vw - 32px)); } .dw-db-formula__input { width: 100%; min-height: 4.5em; resize: vertical; font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; } .dw-db-formula__check { min-height: 1.4em; color: var(--color-ink-muted); font-size: 12px; overflow-wrap: anywhere; } .dw-db-formula__check.is-error, .dw-db-cell__error { color: var(--color-danger, #c0392b); } .dw-db-formula__props { display: flex; flex-wrap: wrap; gap: 4px; max-height: 7rem; overflow-y: auto; } .dw-db-formula__props .dw-db-tag { border: none; font: inherit; font-size: 12px; cursor: pointer; } .dw-db-formula__help { margin: 0; color: var(--color-ink-muted); font-size: 12px; line-height: 1.45; } /* Parts of a panel that redraw themselves keep the panel's column layout. */ .dw-db-pop__chart, .dw-db-pop__props { display: flex; flex-direction: column; gap: 6px; } .dw-db-pop--choices { width: 18rem; } .dw-db-pop__row { display: flex; align-items: center; gap: 6px; } .dw-db-pop__row--end { justify-content: flex-end; } .dw-db-pop__line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; } .dw-db-pop__label { color: var(--color-ink-muted); font-size: 12px; } .dw-db-pop__list { display: flex; flex-direction: column; gap: 1px; } .dw-db-pop__item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 2px 6px; border: none; border-radius: var(--radius-sm); background: none; color: var(--color-ink); font: inherit; text-align: left; cursor: pointer; } .dw-db-pop__item:hover:not(:disabled), .dw-db-pop__item.is-active { background: var(--color-surface-hover); } .dw-db-pop__item:disabled { cursor: default; opacity: 0.7; } .dw-db-pop__check { display: inline-grid; place-items: center; width: 16px; color: var(--color-ink-muted); } .dw-db-pop__grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dw-db-pop__more { margin-left: auto; } .dw-db-pop__chosen:empty { display: none; } .dw-db-pop__empty { margin: 4px 2px; color: var(--color-ink-faint); } /* Relations and rollups. */ .dw-db-pop__title { margin: 2px 2px 4px; font-weight: 600; } .dw-db-pop__heading { margin: 6px 2px 2px; color: var(--color-ink-muted); font-size: 12px; font-weight: 600; } .dw-db-pop__sub { margin-left: auto; color: var(--color-ink-faint); } .dw-db-pop__check { width: 14px; color: var(--color-accent); } .dw-db-pop__field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; font-size: 12px; color: var(--color-ink-muted); } .dw-db-rel { border: 0; cursor: pointer; font: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; } .dw-db-rel:hover { text-decoration-color: currentColor; } .dw-db-pop__add { align-self: flex-start; } .dw-db-switch { position: relative; flex-shrink: 0; width: 28px; height: 16px; border-radius: 8px; background: var(--color-line-strong); } .dw-db-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--color-surface); transition: transform 0.12s; } .dw-db-switch.is-on { background: var(--color-accent); } .dw-db-switch.is-on::after { transform: translateX(12px); } .dw-db-range { flex: 1; accent-color: var(--color-accent); } /* ---- A row opened as a page ---- */ .dw-db-peek { position: fixed; inset: 0; z-index: 65; display: flex; justify-content: flex-end; background: rgb(0 0 0 / 0.25); } .dw-db-peek__panel { display: flex; flex-direction: column; width: min(720px, 100vw); height: 100%; overflow-y: auto; background: var(--color-surface); box-shadow: var(--shadow-dialog); outline: none; font-family: var(--font-sans); color: var(--color-ink); } .dw-db-peek__panel.is-wide { width: 100vw; } /* A record opened as a full page: in the page's place, not over it. */ .dw-db-peek--page { position: static; z-index: auto; display: block; background: none; } .dw-db-peek--page .dw-db-peek__panel { width: 100%; height: auto; min-height: 100%; overflow: visible; box-shadow: none; background: transparent; } .dw-db-peek__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 4px; padding: 8px 16px; border-bottom: 1px solid var(--color-line); background: var(--color-surface); } .dw-db-peek__db { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--color-ink-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dw-db-peek__grow { flex: 1; } .dw-db-peek__props { display: flex; flex-direction: column; gap: 2px; padding: 24px 48px 12px; border-bottom: 1px solid var(--color-line); } .dw-db-peek__panel.is-wide .dw-db-peek__props, .dw-db-peek__panel.is-wide .dw-db-peek__body { box-sizing: border-box; width: min(900px, 100%); margin: 0 auto; } .dw-db-peek__title { width: 100%; margin: 0 0 12px; padding: 0; border: none; background: none; color: var(--color-ink); font: inherit; font-size: 1.75rem; font-weight: 700; line-height: 1.25; } .dw-db-peek__title:focus { outline: none; } .dw-db-peek__prop { display: grid; grid-template-columns: 11rem minmax(0, 1fr); align-items: center; min-height: 34px; } .dw-db-peek__label { display: flex; align-items: center; gap: 6px; overflow: hidden; color: var(--color-ink-muted); font-size: 13px; white-space: nowrap; } .dw-db-peek__value { display: flex; align-items: center; min-width: 0; min-height: 30px; padding: 2px 8px; border-radius: var(--radius-sm); cursor: pointer; } .dw-db-peek__value:hover { background: var(--color-surface-hover); } .dw-db-peek__value.is-editing { padding: 0; } .dw-db-peek__add { align-self: flex-start; margin-top: 4px; } .dw-db-peek__body { padding: 16px 48px 64px; } .dw-db-peek__note { color: var(--color-ink-faint); font-size: 14px; } @media (max-width: 640px) { .dw-db-peek__props, .dw-db-peek__body { padding-left: 16px; padding-right: 16px; } .dw-db-peek__prop { grid-template-columns: 8rem minmax(0, 1fr); } } /* ---- Columns (columns.ts): blocks side by side, stacked on phones ---- */ .dw-prose .dw-columns { display: flex; gap: 24px; margin: 8px 0; } .dw-prose .dw-column { position: relative; flex: 1 1 0; min-width: 0; } .dw-column__body > :first-child { margin-top: 0; } .dw-column__body > :last-child { margin-bottom: 0; } /* The line between two columns, in the middle of the gap. */ .dw-column__resize { position: absolute; top: 0; right: -14px; bottom: 0; width: 8px; cursor: col-resize; touch-action: none; user-select: none; } .dw-column__resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; border-radius: 1px; background: var(--color-line); opacity: 0; transition: opacity 0.12s; } .dw-columns:hover .dw-column__resize::after { opacity: 0.6; } .dw-column__resize:hover::after, .dw-column.is-resizing .dw-column__resize::after { opacity: 1; background: var(--color-accent); } .dw-column__add { position: absolute; top: 0; right: -22px; width: 20px; height: 20px; display: none; place-items: center; border: none; border-radius: var(--radius-sm); background: none; color: var(--color-ink-muted); font-size: 16px; line-height: 1; cursor: pointer; } .dw-column:last-child:hover > .dw-column__add:not([hidden]), .dw-column:last-child:focus-within > .dw-column__add:not([hidden]) { display: grid; } .dw-column__add:hover { background: var(--color-surface-hover); } .dw-prose[contenteditable="false"] .dw-column__resize, .dw-prose[contenteditable="false"] .dw-column__add { display: none; } @media (max-width: 640px) { .dw-prose .dw-columns { flex-direction: column; gap: 8px; } .dw-prose .dw-column { flex-grow: 1 !important; } .dw-column__resize, .dw-column__add { display: none !important; } } /* ---- Suggestions (suggest.ts): insertions underlined, deletions struck ---- */ .dw-suggest-ins { color: var(--dw-suggest-ins, #0e7a5c); text-decoration: underline 2px color-mix(in srgb, currentColor 55%, transparent); text-underline-offset: 3px; background: color-mix(in srgb, currentColor 8%, transparent); cursor: pointer; } .dw-suggest-del { color: var(--dw-suggest-del, #b42318); text-decoration: line-through 1.5px; background: color-mix(in srgb, currentColor 7%, transparent); cursor: pointer; } .dw-suggest-ins.dw-suggest-del { color: var(--dw-suggest-del, #b42318); } .dark .dw-suggest-ins { --dw-suggest-ins: #5fd8b1; } .dark .dw-suggest-del { --dw-suggest-del: #ff8a7a; }