Phase 5-7. - A changed tab asks Save, Don't save, or Cancel through the native dialog, instead of OK and Cancel to discard. - The conflict banner uses --rs-warn with a warning icon. Keep my edits is the primary choice and comes first. Use disk version comes last, in the error color. The banner wraps in a narrow pane. - The status bar shows the save state, the line and column, the word count, the line endings, and the view. It shows the watch mode only when it polls a network folder. - The outline and the document facts follow the active tab. A tab without a document has no outline and no document facts. - Tables: only formula cells have a hover hint, so no hint covers the next cell. The table adds no gap above its control area. The add controls show while a cell has focus. - The plugin review marks Install and enable as the primary action. The other choice is Install, keep disabled. - Read follows CommonMark soft breaks. Settings, General, Keep line breaks shows each source line break. The table preview and cell editors of Write keep their line breaks, because their editing depends on them. - Catalog rows in French, Japanese, and Simplified Chinese. - Docs: UI-053, the user guide, and plugins.md. Tests: the new layout/plainFixes, the keepLineBreaks cases in the settings unit tests, and the new install button name.
168 lines
8.0 KiB
CSS
168 lines
8.0 KiB
CSS
/* Rendered Markdown. Read, the Write previews, and table widgets use these rules. */
|
|
.md-edit-block { display: contents; cursor: text; }
|
|
.md-edit-block:focus-visible > :first-child { outline: 1px solid var(--rs-accent-deep); outline-offset: 4px; }
|
|
.md-edit-block:empty { display: block; min-height: 3em; }
|
|
.md-mermaid { margin: 1.4em 0; }
|
|
.md-diagram { overflow: auto; text-align: center; }
|
|
.md-diagram svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
|
|
.md-diagram-source { margin-top: 10px; color: var(--rs-text-dim); font: 12px/1.5 var(--rs-font-ui); }
|
|
.md-diagram-source summary { cursor: pointer; }
|
|
.md-diagram-source pre { text-align: left; }
|
|
.reading {
|
|
max-width: 740px;
|
|
min-width: 0;
|
|
margin: 0 auto;
|
|
color: var(--rs-text);
|
|
font: var(--rs-font-weight) var(--rs-prose-size)/var(--rs-prose-line) var(--rs-font-prose);
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.reading h1, .reading h2, .reading h3,
|
|
.reading h4, .reading h5, .reading h6, .live-writer .writer-heading {
|
|
color: var(--rs-text-strong);
|
|
font-family: var(--rs-font-heading);
|
|
font-weight: var(--rs-heading-weight);
|
|
line-height: 1.4;
|
|
letter-spacing: -0.02em;
|
|
margin: 1.6em 0 .55em;
|
|
scroll-margin-top: 24px;
|
|
}
|
|
.reading h1, .live-writer .writer-h1 { font-size: 1.6em; }
|
|
.reading h2, .live-writer .writer-h2 { font-size: 1.35em; }
|
|
.reading h3, .live-writer .writer-h3 { font-size: 1.15em; }
|
|
.reading h4, .live-writer .writer-h4 { font-size: 1.05em; }
|
|
.reading h5, .reading h6, .live-writer .writer-h5, .live-writer .writer-h6 { font-size: 1em; color: var(--rs-text-dim); }
|
|
.live-writer .writer-heading { margin: 0; padding-top: .7em; padding-bottom: .3em; }
|
|
.document-title, .reading .document-title { margin: 0 0 .85em; color: var(--rs-text-strong); font: var(--rs-heading-weight) 1.8em/1.3 var(--rs-font-heading); overflow-wrap: anywhere; }
|
|
.reading > :first-child { margin-top: 0; }
|
|
.reading p { margin: 0 0 .75em; white-space: pre-line; }
|
|
/* Read follows CommonMark soft breaks by default. The Keep line breaks setting shows each source line break.
|
|
The table preview and cell editors of Write keep their line breaks: their editing depends on them. */
|
|
.reading:not(.writer-preview) p { white-space: normal; }
|
|
:root[data-keep-line-breaks] .reading:not(.writer-preview) p { white-space: pre-line; }
|
|
.reading strong { font-weight: 600; color: var(--rs-text-strong); }
|
|
.reading a { color: var(--rs-link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
|
|
.reading a:hover { color: var(--rs-accent-2); }
|
|
.reading hr { border: 0; border-top: 1px solid var(--rs-border); margin: 2em 0; }
|
|
|
|
.reading ul, .reading ol { padding-left: 1.6em; margin: 0 0 .75em; }
|
|
.reading li { padding-left: 0.25em; margin: .1em 0; }
|
|
.reading li::marker { color: var(--rs-text-dim); }
|
|
.reading li > p { margin-bottom: 0.6em; }
|
|
.reading li > ul, .reading li > ol { margin: 0.35em 0 0.5em; }
|
|
/* Nested ordered lists use letters, then Roman numerals. Write labels its markers the same way. */
|
|
.reading ol ol { list-style-type: lower-alpha; }
|
|
.reading ol ol ol { list-style-type: lower-roman; }
|
|
.reading ol ol ol ol { list-style-type: decimal; }
|
|
.reading ol ol ol ol ol { list-style-type: lower-alpha; }
|
|
.reading ol ol ol ol ol ol { list-style-type: lower-roman; }
|
|
.reading .task-list-item { list-style: none; position: relative; }
|
|
.reading .task-list-item > input,
|
|
.reading .task-list-item > p > input {
|
|
position: absolute;
|
|
left: -1.3em;
|
|
top: 0.4em;
|
|
margin: 0;
|
|
width: 15px;
|
|
height: 15px;
|
|
accent-color: var(--rs-accent);
|
|
pointer-events: none;
|
|
}
|
|
.reading .is-checked { color: var(--rs-text-dim); text-decoration: line-through; }
|
|
.reading s, .reading del { color: var(--rs-text-dim); }
|
|
|
|
.reading blockquote {
|
|
margin: 1.4em 0;
|
|
padding: 0.75em 1.2em;
|
|
border-left: 3px solid var(--rs-accent-deep);
|
|
background: var(--rs-line-highlight);
|
|
border-radius: 0 6px 6px 0;
|
|
color: var(--rs-text-dim);
|
|
}
|
|
.reading blockquote > :last-child { margin-bottom: 0; }
|
|
.reading .md-callout { --callout-color: var(--rs-accent); color: var(--rs-text); border-color: var(--callout-color); }
|
|
.reading .md-callout[data-callout="warning"],
|
|
.reading .md-callout[data-callout="important"] { --callout-color: var(--rs-warn); }
|
|
.reading .md-callout[data-callout="danger"] { --callout-color: var(--rs-error); }
|
|
.reading .md-callout[data-callout="success"],
|
|
.reading .md-callout[data-callout="tip"] { --callout-color: var(--rs-ok); }
|
|
.reading .md-callout-title { display: block; color: var(--callout-color); margin-bottom: 0.3em; }
|
|
|
|
.reading code {
|
|
font-family: var(--rs-font-mono);
|
|
font-size: 0.85em;
|
|
color: var(--rs-accent-2);
|
|
background: var(--rs-bg-active);
|
|
padding: 0.15em 0.35em;
|
|
border-radius: 4px;
|
|
}
|
|
.reading pre {
|
|
position: relative;
|
|
background: var(--rs-code-block-bg);
|
|
border: 1px solid var(--rs-border);
|
|
border-radius: 8px;
|
|
padding: 18px 20px;
|
|
overflow: auto;
|
|
margin: 1.4em 0;
|
|
font: 13px/1.65 var(--rs-font-mono);
|
|
tab-size: 4;
|
|
}
|
|
.reading pre.md-code { padding-top: 44px; }
|
|
|
|
.reading pre code {
|
|
background: transparent;
|
|
padding: 0;
|
|
font-size: inherit;
|
|
color: var(--rs-text);
|
|
display: block;
|
|
white-space: pre;
|
|
overflow-wrap: normal;
|
|
}
|
|
.reading pre[data-lang]::before {
|
|
content: attr(data-lang);
|
|
position: absolute;
|
|
top: 10px;
|
|
left: 20px;
|
|
color: var(--rs-text-dim);
|
|
font: 11px/1.6 var(--rs-font-ui);
|
|
}
|
|
.rs-fence-copy {
|
|
position: absolute;
|
|
top: 6px;
|
|
right: 8px;
|
|
display: grid;
|
|
place-items: center;
|
|
width: 28px;
|
|
height: 28px;
|
|
padding: 5px;
|
|
border: 0;
|
|
border-radius: 5px;
|
|
background: transparent;
|
|
color: var(--rs-text-dim);
|
|
}
|
|
.rs-fence-copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
|
|
.rs-fence-copy:hover { color: var(--rs-text-strong); background: var(--rs-bg-active); }
|
|
.rs-fence-copy[data-copied] { color: var(--rs-ok); }
|
|
|
|
.reading .md-table-scroll { width: fit-content; max-width: 100%; overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--rs-border); border-radius: 0; }
|
|
.reading table { border-collapse: collapse; width: auto; max-width: 100%; font-size: 0.95em; line-height: var(--rs-table-line-height); overflow-wrap: normal; word-break: normal; }
|
|
.reading th, .reading td { padding: var(--rs-table-cell-padding); text-align: left; vertical-align: top; border-bottom: 1px solid var(--rs-border); min-width: 3rem; max-width: 26rem; white-space: normal; overflow-wrap: break-word; }
|
|
.reading :is(th, td):empty::before,
|
|
.reading :is(th, td) > p:empty::before { content: "\200b"; }
|
|
.reading :is(th, td) > p { margin: 0; }
|
|
.reading th { background: var(--rs-bg-active); font-weight: 600; color: var(--rs-text-strong); }
|
|
.reading tbody tr:nth-child(even) { background: var(--rs-line-highlight); }
|
|
.reading tbody tr:last-child td { border-bottom: 0; }
|
|
.reading th + th, .reading td + td { border-left: 1px solid var(--rs-border); }
|
|
.reading img { max-width: 100%; height: auto; display: block; margin: 1.4em 0; border-radius: 6px; }
|
|
.reading .missing-image { display: inline-block; padding: 8px 12px; border: 1px dashed var(--rs-border); border-radius: 6px; color: var(--rs-text-dim); font-size: 13px; }
|
|
.reading .md-properties { margin: 0 0 2em; border: 1px solid var(--rs-border); border-radius: 6px; font: 12px/1.5 var(--rs-font-ui); color: var(--rs-text-dim); }
|
|
.reading .md-properties summary { padding: 9px 12px; cursor: pointer; }
|
|
.reading .md-properties summary:hover { color: var(--rs-text-strong); }
|
|
.reading .md-properties pre { margin: 0; padding: 12px; border: 0; border-top: 1px solid var(--rs-border); border-radius: 0 0 6px 6px; white-space: pre-wrap; }
|
|
.reading mark { background: color-mix(in srgb, var(--rs-highlight) 30%, transparent); color: inherit; border-radius: 2px; }
|
|
.reading .md-inline-math { font-family: var(--rs-font-mono); font-style: italic; }
|
|
.reading .md-inline-comment { display: none; }
|
|
.reading:not(.cm-content) :is(p, h1, h2, h3, h4, h5, h6):not(td *, th *) { position: relative; }
|
|
.reading:not(.cm-content) :is(p, h1, h2, h3, h4, h5, h6):not(td *, th *):hover::before { content: ""; position: absolute; left: -14px; top: 2px; bottom: 2px; width: 3px; border-radius: var(--rs-control-radius); background: var(--rs-text-dim); opacity: .5; pointer-events: none; }
|