269 lines
5.4 KiB
CSS
269 lines
5.4 KiB
CSS
/* ── Obsidian GUI Tasks Plugin Styles ─────────────────────────────────────────── */
|
|
|
|
/* View root */
|
|
.yaotp-view {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
}
|
|
|
|
/* ── File Switcher Bar ──────────────────────────────────────────────────── */
|
|
|
|
.yaotp-switcher-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
background: var(--background-primary);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.yaotp-switcher-select-wrap {
|
|
flex: 1;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.yaotp-switcher-select {
|
|
width: 100%;
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
padding: 4px 8px;
|
|
font-size: var(--font-ui-small);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.yaotp-switcher-new-btn {
|
|
flex-shrink: 0;
|
|
font-size: var(--font-ui-small);
|
|
padding: 4px 10px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.yaotp-switcher-create-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.yaotp-switcher-name-input {
|
|
font-size: var(--font-ui-small);
|
|
padding: 3px 6px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
width: 160px;
|
|
}
|
|
|
|
.yaotp-switcher-name-input:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.yaotp-switcher-confirm-btn,
|
|
.yaotp-switcher-cancel-btn {
|
|
flex-shrink: 0;
|
|
font-size: var(--font-ui-small);
|
|
padding: 3px 8px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* ── Task List ──────────────────────────────────────────────────────────── */
|
|
|
|
.yaotp-list-container {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
padding: 8px 0;
|
|
}
|
|
|
|
.yaotp-task-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.yaotp-task-item {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
padding: 8px 12px;
|
|
border-radius: 4px;
|
|
cursor: default;
|
|
gap: 8px;
|
|
transition: background 80ms ease;
|
|
}
|
|
|
|
.yaotp-task-item:hover {
|
|
background: var(--background-secondary);
|
|
}
|
|
|
|
/* Dim completed tasks */
|
|
.yaotp-task-completed .yaotp-task-text {
|
|
opacity: 0.5;
|
|
text-decoration: line-through;
|
|
}
|
|
|
|
/* Drag handle */
|
|
.yaotp-drag-handle {
|
|
flex-shrink: 0;
|
|
color: var(--text-muted);
|
|
cursor: grab;
|
|
padding: 2px 0;
|
|
user-select: none;
|
|
font-size: 16px;
|
|
line-height: 1.4;
|
|
touch-action: none;
|
|
}
|
|
|
|
.yaotp-drag-handle:active {
|
|
cursor: grabbing;
|
|
}
|
|
|
|
/* Checkbox */
|
|
.yaotp-checkbox {
|
|
flex-shrink: 0;
|
|
margin-top: 3px;
|
|
width: 16px;
|
|
height: 16px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Task text */
|
|
.yaotp-task-text {
|
|
flex: 1;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
line-height: 1.5;
|
|
cursor: pointer;
|
|
padding: 1px 0;
|
|
}
|
|
|
|
.yaotp-task-text:hover {
|
|
color: var(--text-accent);
|
|
}
|
|
|
|
/* Note indicator dot */
|
|
.yaotp-task-has-notes::after {
|
|
content: ' ·';
|
|
color: var(--text-muted);
|
|
font-size: 1.2em;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* Add-task row */
|
|
.yaotp-drag-handle-disabled {
|
|
opacity: 0.2;
|
|
cursor: default;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.yaotp-new-task-input {
|
|
flex: 1;
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
color: var(--text-normal);
|
|
font-family: var(--font-text);
|
|
font-size: var(--font-ui-medium);
|
|
padding: 1px 0;
|
|
line-height: 1.5;
|
|
outline: none;
|
|
}
|
|
|
|
.yaotp-new-task-input::placeholder {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.yaotp-new-task-input:focus {
|
|
border-bottom-color: var(--interactive-accent);
|
|
}
|
|
|
|
/* Empty state */
|
|
.yaotp-empty {
|
|
padding: 24px 16px;
|
|
color: var(--text-muted);
|
|
text-align: center;
|
|
font-size: var(--font-ui-small);
|
|
}
|
|
|
|
/* SortableJS ghost + chosen */
|
|
.yaotp-task-item.sortable-ghost {
|
|
opacity: 0.35;
|
|
background: var(--background-secondary);
|
|
}
|
|
|
|
.yaotp-task-item.sortable-chosen {
|
|
background: var(--background-secondary-alt);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
/* ── Task Editor Modal ──────────────────────────────────────────────────── */
|
|
|
|
.yaotp-editor-modal .modal-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.yaotp-editor-textarea {
|
|
width: 100%;
|
|
min-height: 140px;
|
|
resize: vertical;
|
|
font-family: var(--font-text);
|
|
font-size: var(--font-ui-medium);
|
|
padding: 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
line-height: 1.5;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.yaotp-editor-textarea:focus {
|
|
outline: none;
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.yaotp-editor-file-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: var(--font-ui-small);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.yaotp-editor-file-name {
|
|
color: var(--text-normal);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.yaotp-editor-file-btn {
|
|
font-size: var(--font-ui-small);
|
|
padding: 2px 8px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.yaotp-editor-btn-row {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 8px;
|
|
}
|
|
|
|
.yaotp-editor-delete-btn {
|
|
margin-right: auto;
|
|
color: var(--text-error);
|
|
}
|
|
|
|
|
|
/* Settings error state */
|
|
.yaotp-setting-error {
|
|
border-color: var(--color-red) !important;
|
|
}
|