Files
RuneStone/src/lib/editor/tableControls.css
T
Knotty Wyvern 9fc1490988 Make menus and hover fills translucent over a background image
With a background image, menus use the surface transparency of Appearance
(82% by default) instead of at least 92%, and they keep the blur.
Hovered rows and controls in the work area, hovered menu rows, and the
workspace button use the new --rs-hover-bg token. With an image, it is a
6% veil of the strong text color. The image stays visible, and the hover
shows over light and dark image areas. Without an image, nothing changes.

Silver Serpent dim text is now #c2c6cc. It keeps 4.5:1 contrast on a
hovered row over a white image.

UI-061 replaces the image rule of UI-043. Card 05b9bfa1.
2026-10-30 13:38:47 -07:00

53 lines
4.0 KiB
CSS

/* Table editing in Write: cell editors, cell selection, and row and column drag. */
.table-edit-help { font: inherit; color: var(--rs-text-dim); }
.reading .ProseMirror {
outline: none;
min-height: 100%;
}
.reading .ProseMirror:focus,
.reading .ProseMirror:focus-visible {
outline: none;
}
.writer-table :is(th, td):is(.is-editing, .is-cell-selected) {
background: var(--rs-item-selection-bg);
box-shadow:
inset 0 var(--cell-selection-top, 0px) 0 var(--rs-item-selection-border),
inset 0 calc(-1 * var(--cell-selection-bottom, 0px)) 0 var(--rs-item-selection-border),
inset var(--cell-selection-left, 0px) 0 0 var(--rs-item-selection-border),
inset calc(-1 * var(--cell-selection-right, 0px)) 0 0 var(--rs-item-selection-border);
outline: none;
}
.writer-table .is-editing {
--cell-selection-top: var(--rs-item-selection-width);
--cell-selection-bottom: var(--rs-item-selection-width);
--cell-selection-left: var(--rs-item-selection-width);
--cell-selection-right: var(--rs-item-selection-width);
}
.writer-table [data-selection-edges~="top"] { --cell-selection-top: var(--rs-item-selection-width); }
.writer-table [data-selection-edges~="bottom"] { --cell-selection-bottom: var(--rs-item-selection-width); }
.writer-table [data-selection-edges~="left"] { --cell-selection-left: var(--rs-item-selection-width); }
.writer-table [data-selection-edges~="right"] { --cell-selection-right: var(--rs-item-selection-width); }
.writer-table.has-cell-selection { outline: none; }
.writer-table.has-cell-selection .md-table-scroll { user-select: none; }
.table-drag-layer { position: absolute; inset: 0; overflow: clip; pointer-events: none; }
.table-drag-handle { position: absolute; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 4px; color: var(--rs-text-dim); background: transparent; cursor: grab; touch-action: none; opacity: 0; pointer-events: auto; transition: opacity 100ms; }
.table-drag-handle[hidden], .table-drop-indicator[hidden] { display: none; }
.table-drag-handle .action-icon { width: 18px; height: 18px; pointer-events: none; }
.table-drag-column .action-icon { transform: rotate(90deg); }
.table-drag-handle:hover, .table-drag-handle:focus-visible:not([data-pointer-focus]) { opacity: 1; color: var(--rs-text); background: var(--rs-hover-bg); outline: 2px solid var(--rs-accent); outline-offset: -2px; z-index: 2; }
.writer-table.is-table-dragging, .writer-table.is-table-dragging * { cursor: grabbing !important; user-select: none; }
.writer-table.is-table-dragging .table-drag-handle::after { display: none; }
.table-drop-indicator { position: absolute; z-index: 3; border-radius: 2px; background: var(--rs-accent); pointer-events: none; }
.table-drag-preview { position: fixed; top: 0; left: 0; z-index: 1100; margin: 0; padding: 0; max-width: calc(100vw - 24px); border: 1px solid var(--rs-accent); border-radius: 6px; background: var(--rs-bg-elevated); color: var(--rs-text); box-shadow: 0 8px 28px #0006; opacity: .92; pointer-events: none; user-select: none; will-change: transform; animation: table-drag-lift 100ms ease-out; }
.table-drag-preview.is-invalid-drop { opacity: .6; }
.table-drag-preview-label { padding: 5px 10px; border-bottom: 1px solid var(--rs-border); color: var(--rs-accent); font: 12px/1.4 var(--rs-font-ui); }
.table-drag-preview-content { max-height: min(260px, 35vh); overflow: hidden; border-radius: 0 0 6px 6px; }
.table-drag-preview table { width: 100%; table-layout: fixed; margin: 0; }
.table-drag-preview :is(th, td) { min-width: 0; max-width: none; padding: 7px 10px; overflow-wrap: anywhere; }
.table-drag-preview p { margin: 0; }
@keyframes table-drag-lift { from { opacity: 0; } to { opacity: .92; } }
@media (prefers-reduced-motion: reduce) { .table-drag-handle { transition: none; } .table-drag-preview { animation: none; } }
.table-add .action-icon { width: 20px; height: 20px; margin: 2px; }
.writer-table .md-inline-comment { display: inline; color: var(--rs-text-dim); background: var(--rs-bg-active); }