ngchenghow_obsidian-project.../styles.css
ngchenghow 0cae1d31e4 v1.0.9: Merge with Google Drive on Local; Show Drive versions picker
- Merge with Google Drive on Local: additive 3-way merge for .md/.txt
  files (lines unique to Drive are inserted; conflicting blocks keep both
  copies so the user can resolve by hand).
- Show Drive versions...: lists recent Drive revisions for a file under a
  linked folder; selecting one downloads the bytes and opens a new note
  in the same folder, named "<basename> (YYYY-MM-DD HH-MM-SS).<ext>".
2026-06-07 16:40:41 +08:00

636 lines
12 KiB
CSS

/* Recent View plugin styles */
.recent-view-list .rv-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 4px;
gap: 8px;
}
.recent-view-list .rv-header-title {
font-weight: 600;
font-size: var(--font-ui-medium);
}
.rv-header-title-wrap {
display: flex;
align-items: center;
gap: 4px;
min-width: 0;
}
.rv-header-actions {
display: flex;
align-items: center;
gap: 4px;
flex-shrink: 0;
}
.rv-icon-btn:disabled,
.rv-icon-btn:disabled:hover {
opacity: 0.35;
cursor: default;
}
.rv-header-menu {
flex-shrink: 0;
opacity: 0;
}
.rv-header:hover .rv-header-menu {
opacity: 0.6;
}
.rv-header:hover .rv-header-menu:hover,
.rv-header .rv-header-menu.is-active {
opacity: 1;
}
.rv-new-btn {
cursor: pointer;
}
.rv-project-list {
display: flex;
flex-direction: column;
gap: 6px;
padding: 4px 2px;
}
.rv-project-box {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
height: 50px;
width: 100%;
box-sizing: border-box;
padding: 0 10px;
border: 1px solid var(--background-modifier-border);
border-radius: var(--radius-m);
background: var(--background-secondary);
cursor: pointer;
overflow: hidden;
}
.rv-project-box:hover {
background: var(--background-modifier-hover);
}
.rv-project-box.is-active {
border-color: var(--interactive-accent);
background: var(--background-modifier-active-hover);
}
.rv-project-info {
display: flex;
flex-direction: column;
justify-content: center;
min-width: 0;
flex: 1;
}
.rv-project-name {
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.rv-project-desc {
font-size: var(--font-ui-smaller);
color: var(--text-muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.rv-project-actions {
display: flex;
align-items: center;
gap: 2px;
flex-shrink: 0;
}
.workspace-leaf-content .rv-icon-btn,
.workspace-leaf-content .rv-icon-btn:hover,
.workspace-leaf-content .rv-icon-btn:active,
.workspace-leaf-content .rv-icon-btn:focus,
.workspace-leaf-content .rv-icon-btn.is-active {
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 4px;
background: transparent;
border: none;
box-shadow: none;
border-radius: var(--radius-s);
cursor: pointer;
color: var(--text-muted);
/* Only transparency/colour should change on hover - never size/position. */
transform: none;
transition: opacity 0.1s ease, color 0.1s ease;
}
.workspace-leaf-content .rv-icon-btn:hover,
.workspace-leaf-content .rv-icon-btn.is-active {
color: var(--text-normal);
}
.rv-empty,
.rv-empty-sm {
color: var(--text-muted);
font-size: var(--font-ui-smaller);
padding: 8px;
}
.rv-empty-sm {
padding: 2px 8px 4px 24px;
}
/* Content (right) view */
.recent-view-content .rv-content-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 8px;
}
.recent-view-content .rv-content-headinfo {
flex: 1;
min-width: 0;
}
.recent-view-content .rv-content-title {
margin: 8px 4px 2px;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.recent-view-content .rv-content-menu {
flex-shrink: 0;
margin-top: 8px;
opacity: 0;
}
.recent-view-content .rv-content-header:hover .rv-content-menu {
opacity: 0.6;
}
.recent-view-content .rv-content-header:hover .rv-content-menu:hover,
.recent-view-content .rv-content-header .rv-content-menu.is-active {
opacity: 1;
}
.rv-folder-section {
margin: 8px 0;
padding-left: calc(var(--rv-depth, 0) * 14px);
}
.rv-folder-head {
display: flex;
align-items: center;
gap: 6px;
font-weight: 600;
padding: 4px 6px;
}
.rv-folder-icon {
display: inline-flex;
align-items: center;
}
.rv-file-list {
display: flex;
flex-direction: column;
}
.rv-file-item {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 6px 4px 24px;
border-radius: var(--radius-s);
cursor: pointer;
}
.rv-pane-item.is-active {
background: var(--background-modifier-active-hover);
color: var(--text-accent);
}
.rv-pane-item.is-active .rv-file-icon {
color: var(--text-accent);
}
.rv-file-item:hover,
.rv-file-item.is-open {
background: var(--background-modifier-hover);
}
/* Notes open as tabs in the current pane get a solid (filled) file icon. */
.rv-file-item.is-tab-open .rv-file-icon svg {
fill: currentColor;
}
.rv-file-icon {
display: inline-flex;
align-items: center;
color: var(--text-muted);
}
.rv-file-name {
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.rv-item-menu {
flex-shrink: 0;
opacity: 0;
}
.rv-file-item:hover .rv-item-menu {
opacity: 0.6;
}
.rv-file-item:hover .rv-item-menu:hover,
.rv-file-item .rv-item-menu.is-active {
opacity: 1;
}
/* 3-dot menu on section headers (Pinned / folders), shown on hover */
.rv-head-menu {
margin-left: auto;
flex-shrink: 0;
opacity: 0;
}
.rv-folder-head:hover .rv-head-menu {
opacity: 0.6;
}
.rv-folder-head:hover .rv-head-menu:hover,
.rv-folder-head .rv-head-menu.is-active {
opacity: 1;
}
/* Pinned drag-to-reorder */
/* Keep the menu visible while reordering so "Done" is easy to reach. */
.rv-pinned-section.rv-reordering .rv-head-menu {
opacity: 1;
}
.rv-pinned-section.rv-reordering .rv-file-list {
border: 1px dashed var(--interactive-accent);
border-radius: var(--radius-s);
padding: 2px 0;
}
.rv-pin-draggable {
cursor: grab;
}
/* Generic drag-reorder cues (pinned notes, panes, project boxes). */
.rv-dragging {
opacity: 0.4;
}
.rv-drop-before {
box-shadow: inset 0 2px 0 0 var(--interactive-accent);
}
.rv-drop-after {
box-shadow: inset 0 -2px 0 0 var(--interactive-accent);
}
/* Reorder-mode outline for the project list and panes section. */
.rv-project-list.rv-reordering,
.rv-panes-section.rv-reordering .rv-file-list {
border: 1px dashed var(--interactive-accent);
border-radius: var(--radius-s);
padding: 2px;
}
.rv-panes-section.rv-reordering .rv-head-menu {
opacity: 1;
}
/* Modal */
.recent-view-modal .rv-modal-list {
display: flex;
flex-direction: column;
gap: 4px;
margin: 0 0 12px;
}
.recent-view-modal .rv-modal-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 4px 8px;
background: var(--background-secondary);
border-radius: var(--radius-s);
}
.recent-view-modal .rv-modal-row-path {
font-size: var(--font-ui-smaller);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.recent-view-modal .rv-tree-picker {
display: flex;
flex-direction: column;
gap: 1px;
max-height: min(60vh, 520px);
overflow: auto;
margin-top: 8px;
}
.recent-view-modal .rv-tree-row {
display: flex;
align-items: center;
gap: 6px;
min-height: 28px;
padding-right: 8px;
border-radius: var(--radius-s);
cursor: pointer;
}
.recent-view-modal .rv-tree-row:hover {
background: var(--background-modifier-hover);
}
.recent-view-modal .rv-tree-folder {
font-weight: 600;
}
/* Disclosure triangle for the lazy vault tree; fixed width so rows align even
when a folder has no children (empty twirl). */
.recent-view-modal .rv-tree-twirl {
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 16px;
color: var(--text-muted);
}
.recent-view-modal .rv-tree-twirl:hover {
color: var(--text-normal);
}
/* Explicit "Select" button on folder rows: clicking the row only browses. */
.recent-view-modal .rv-tree-select {
flex-shrink: 0;
margin-left: auto;
padding: 2px 10px;
font-size: var(--font-ui-smaller);
cursor: pointer;
opacity: 0;
}
.recent-view-modal .rv-tree-row:hover .rv-tree-select,
.recent-view-modal .rv-tree-select:focus {
opacity: 1;
}
.recent-view-modal .rv-tree-section {
display: flex;
align-items: center;
margin: 8px 0 2px;
padding: 0 8px;
color: var(--text-muted);
font-size: var(--font-ui-smaller);
font-weight: 600;
}
.rv-modal-footer {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 16px;
}
.recent-view-modal .rv-version-list {
display: flex;
flex-direction: column;
gap: 4px;
margin: 8px 0 4px;
max-height: 360px;
overflow-y: auto;
}
.recent-view-modal .rv-version-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 6px 10px;
background: var(--background-secondary);
border-radius: var(--radius-s);
cursor: pointer;
}
.recent-view-modal .rv-version-row:hover {
background: var(--background-modifier-hover);
}
.recent-view-modal .rv-version-row-left,
.recent-view-modal .rv-version-row-right {
display: flex;
align-items: center;
gap: 8px;
}
.recent-view-modal .rv-version-label {
font-weight: 600;
min-width: 32px;
}
.recent-view-modal .rv-version-time {
font-size: var(--font-ui-smaller);
}
.recent-view-modal .rv-version-size {
font-size: var(--font-ui-smaller);
color: var(--text-muted);
}
.recent-view-modal .rv-version-pin {
font-size: var(--font-ui-smaller);
color: var(--text-accent);
}
/* Recent edits view */
.recent-view-edits .rv-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 4px;
gap: 8px;
}
.rv-edit-list {
display: flex;
flex-direction: column;
gap: 6px;
padding: 4px 2px;
}
.rv-edit-box {
display: flex;
flex-direction: column;
gap: 4px;
width: 100%;
box-sizing: border-box;
padding: 8px 10px;
border: 1px solid var(--background-modifier-border);
border-radius: var(--radius-m);
background: var(--background-secondary);
cursor: pointer;
overflow: hidden;
}
.rv-edit-box:hover {
background: var(--background-modifier-hover);
}
.rv-edit-missing {
opacity: 0.5;
}
.rv-edit-text-row {
font-size: var(--font-ui-small);
line-height: 1.4;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-word;
}
.rv-edit-kind {
display: inline;
margin-right: 5px;
padding: 1px 5px;
border-radius: var(--radius-s);
font-size: var(--font-ui-smaller);
font-weight: 600;
vertical-align: middle;
white-space: nowrap;
}
.rv-edit-kind-add {
color: var(--text-success);
background: rgba(var(--color-green-rgb), 0.15);
}
.rv-edit-kind-delete {
color: var(--text-error);
background: rgba(var(--color-red-rgb), 0.15);
}
.rv-edit-kind-modify {
color: var(--text-accent);
background: rgba(var(--color-accent-rgb), 0.15);
}
.rv-edit-text {
color: var(--text-normal);
}
.rv-edit-deleted {
text-decoration: line-through;
color: var(--text-muted);
}
.rv-edit-name-row {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.rv-edit-icon {
display: inline-flex;
align-items: center;
flex-shrink: 0;
color: var(--text-muted);
}
.rv-edit-name {
font-weight: 600;
font-size: var(--font-ui-smaller);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.rv-edit-meta {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
font-size: var(--font-ui-smaller);
color: var(--text-muted);
}
.rv-edit-folder {
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.rv-edit-time {
flex-shrink: 0;
}
/* Utility classes replacing inline styles. */
/* Disable clicks on a pane while a menu is open over it. */
.rv-pointer-blocked {
pointer-events: none;
}
/* Used to hide the workspace root while panes are being rebuilt. */
.rv-hidden {
visibility: hidden;
}
/* Filled-and-shrinkable pane shown as the active project's group. */
.rv-pane-active {
display: flex;
flex-grow: 1;
flex-shrink: 1;
flex-basis: 0;
min-width: 0;
width: auto;
}
.rv-pane-inactive {
display: none;
}
/* Tree-row padding driven by --rv-depth (set via setCssProps). */
.rv-tree-row {
padding-left: calc(8px + var(--rv-depth, 0) * 14px);
}
/* Collapse a tree-children wrapper. */
.rv-collapsed {
display: none;
}