mirror of
https://github.com/callumalpass/tasknotes.git
synced 2026-07-22 12:50:26 +00:00
408 lines
13 KiB
CSS
408 lines
13 KiB
CSS
/* ================================================
|
|
TASK LIST VIEW - BEM STRUCTURE
|
|
================================================ */
|
|
|
|
/* Task List View Container - Root Block */
|
|
.tasknotes-plugin .task-list-view {
|
|
padding: var(--tn-spacing-sm);
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
gap: var(--tn-spacing-sm);
|
|
max-width: 100%;
|
|
}
|
|
|
|
/* Task List View Header */
|
|
.tasknotes-plugin .task-list-view__header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--tn-spacing-sm) 0;
|
|
border-bottom: 1px solid var(--tn-border-color);
|
|
margin-bottom: var(--tn-spacing-sm);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__title {
|
|
font-size: var(--tn-font-size-xl);
|
|
font-weight: var(--tn-font-weight-semibold);
|
|
color: var(--tn-text-normal);
|
|
margin: 0;
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--tn-spacing-sm);
|
|
}
|
|
|
|
/* Use consistent button system with primary accent background preserved */
|
|
.tasknotes-plugin .task-list-view__add-button {
|
|
background: var(--tn-interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__add-button:hover {
|
|
background: var(--tn-interactive-accent-hover);
|
|
box-shadow: none;
|
|
}
|
|
|
|
/* Filter Bar Container */
|
|
.tasknotes-plugin .task-list-view__filter-container {
|
|
margin-bottom: var(--tn-spacing-md);
|
|
}
|
|
|
|
/* Task List Container */
|
|
.tasknotes-plugin .task-list-view__tasks {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--tn-spacing-xs);
|
|
flex: 1;
|
|
min-height: 0;
|
|
}
|
|
|
|
.tasknotes-plugin .task-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--tn-spacing-xs);
|
|
flex: 1;
|
|
min-height: 0;
|
|
}
|
|
|
|
|
|
/* Loading Indicator */
|
|
.tasknotes-plugin .task-list-view__loading {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--tn-spacing-sm);
|
|
padding: var(--tn-spacing-lg);
|
|
color: var(--tn-text-muted);
|
|
font-size: var(--tn-font-size-md);
|
|
font-style: italic;
|
|
font-weight: 400;
|
|
background: var(--tn-bg-secondary);
|
|
border: 1px solid var(--tn-border-color);
|
|
border-radius: var(--tn-radius-md);
|
|
margin-bottom: var(--tn-spacing-md);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__loading.is-hidden {
|
|
display: none;
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__loading::before {
|
|
content: '';
|
|
width: 16px;
|
|
height: 16px;
|
|
border: 2px solid color-mix(in srgb, var(--tn-text-muted) 0.3, transparent);
|
|
border-top: 2px solid var(--tn-text-muted);
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Task Group Section */
|
|
.tasknotes-plugin .task-list-view__group {
|
|
margin-bottom: var(--tn-spacing-md);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__group-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--tn-spacing-sm);
|
|
justify-content: flex-start;
|
|
padding: var(--tn-spacing-md) 0 var(--tn-spacing-sm);
|
|
margin-bottom: var(--tn-spacing-sm);
|
|
border-bottom: 1px solid var(--tn-border-color);
|
|
position: relative;
|
|
font-size: var(--tn-font-size-lg);
|
|
font-weight: var(--tn-font-weight-medium);
|
|
color: var(--tn-text-normal);
|
|
letter-spacing: 0.01em;
|
|
line-height: 1.4;
|
|
cursor: var(--cursor-link, pointer);
|
|
}
|
|
|
|
/* Count element within task list group headers */
|
|
.tasknotes-plugin .task-list-view__group-header .agenda-view__item-count {
|
|
margin-left: auto;
|
|
margin-right: 0;
|
|
}
|
|
|
|
|
|
.tasknotes-plugin .task-group-right { margin-left:auto; display:flex; align-items:center; gap: var(--tn-spacing-xs); }
|
|
|
|
/* Override count margin when inside right-side container */
|
|
.tasknotes-plugin .task-group-right .agenda-view__item-count { margin-left: 0; margin-right: 0; }
|
|
|
|
/* Chevron/toggle styles (match preview-all) */
|
|
.tasknotes-plugin .task-group-header { cursor: var(--cursor-link, pointer); }
|
|
.task-group-header { display: flex; align-items: center; justify-content: flex-start; gap: var(--tn-spacing-xs); }
|
|
.tasknotes-plugin .task-group-toggle svg, .task-group-toggle .chevron, .task-group-toggle .chevron path { color: currentColor; }
|
|
.tasknotes-plugin .task-group-toggle svg, .task-group-toggle .chevron path { stroke: currentColor; }
|
|
.tasknotes-plugin .task-group.is-collapsed .task-group-toggle svg,
|
|
.tasknotes-plugin .task-group.is-collapsed .task-group-toggle .chevron { transform: rotate(0deg); }
|
|
.tasknotes-plugin .task-group-toggle {
|
|
appearance: none;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 20px;
|
|
height: 20px;
|
|
min-width: 20px;
|
|
min-height: 20px;
|
|
margin: 0 var(--tn-spacing-xs) 0 0;
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: var(--tn-radius-sm);
|
|
box-shadow: none;
|
|
background: transparent;
|
|
color: var(--tn-text-muted);
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
cursor: var(--cursor-link, pointer);
|
|
}
|
|
.tasknotes-plugin .task-group-toggle:hover,
|
|
.tasknotes-plugin .task-group-toggle:focus-visible {
|
|
background: var(--background-modifier-hover);
|
|
color: var(--tn-text-normal);
|
|
}
|
|
.tasknotes-plugin .task-group-toggle .chevron { transition: transform var(--tn-transition-fast); }
|
|
.tasknotes-plugin .task-group .task-group-toggle .chevron,
|
|
.tasknotes-plugin .task-group .task-group-toggle svg { transform: rotate(90deg); }
|
|
.tasknotes-plugin .task-group.is-collapsed .task-cards { display: none; }
|
|
|
|
/* Subgroup styles and chevron behavior */
|
|
.tasknotes-plugin .task-subgroups-container { margin-left: var(--tn-spacing-lg); }
|
|
.tasknotes-plugin .task-subgroup-header { display:flex; align-items:center; gap: var(--tn-spacing-xs); cursor: pointer; padding: 2px 0; font-size: var(--tn-font-size-lg); font-weight: var(--tn-font-weight-medium); }
|
|
.tasknotes-plugin .task-subgroup-header .agenda-view__item-count { margin-left: auto; }
|
|
.tasknotes-plugin .task-subgroup-toggle { display: inline-flex; align-items:center; justify-content:center; width:16px; height:16px; border:none; background:transparent; color: var(--tn-text-normal); font-size: 12px; line-height: 1; }
|
|
.tasknotes-plugin .task-subgroup-toggle .chevron { transition: transform var(--tn-transition-fast); }
|
|
.tasknotes-plugin .task-subgroup .task-subgroup-toggle .chevron,
|
|
.tasknotes-plugin .task-subgroup .task-subgroup-toggle svg { transform: rotate(90deg); }
|
|
.tasknotes-plugin .task-subgroup.is-collapsed .task-subgroup-toggle .chevron,
|
|
.tasknotes-plugin .task-subgroup.is-collapsed .task-subgroup-toggle svg { transform: rotate(0deg); }
|
|
.tasknotes-plugin .task-subgroup.is-collapsed .task-cards { display: none; }
|
|
.tasknotes-plugin .task-group.is-collapsed .task-subgroups-container { display: none; }
|
|
|
|
/* Sub-header indentation for data-level attribute */
|
|
.tasknotes-plugin .task-group[data-level="sub"] {
|
|
padding-left: 16px;
|
|
margin-bottom: var(--tn-spacing-sm);
|
|
}
|
|
|
|
.tasknotes-plugin .task-group[data-level="sub"] .task-group-header {
|
|
font-size: 0.95em;
|
|
font-weight: 500;
|
|
color: var(--tn-text-muted);
|
|
padding: var(--tn-spacing-xs) var(--tn-spacing-sm);
|
|
}
|
|
|
|
.tasknotes-plugin .task-group[data-level="sub"] .task-group-toggle {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.tasknotes-plugin .task-group[data-level="sub"] .task-group-toggle svg {
|
|
width: 14px;
|
|
height: 14px;
|
|
}
|
|
|
|
/* Per-group subgroup actions */
|
|
.tasknotes-plugin .task-subgroup-actions { display:flex; align-items:center; gap: 4px; margin-left: 0; }
|
|
.tasknotes-plugin .task-subgroup-action { border:none; background:transparent; color: var(--tn-text-muted); cursor: var(--cursor-link, pointer); padding: 0; }
|
|
.tasknotes-plugin .task-subgroup-action:hover { color: var(--tn-text-normal); }
|
|
|
|
|
|
.tasknotes-plugin .task-list-view__project-link {
|
|
color: var(--tn-text-normal);
|
|
text-decoration: none;
|
|
cursor: var(--cursor-link, pointer);
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__project-link:hover {
|
|
color: var(--tn-interactive-accent);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__group-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--tn-spacing-xs);
|
|
}
|
|
|
|
/* Empty State */
|
|
.tasknotes-plugin .task-list-view__empty {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--tn-spacing-xl);
|
|
text-align: center;
|
|
color: var(--tn-text-muted);
|
|
background: var(--tn-bg-secondary);
|
|
border: 1px solid var(--tn-border-color);
|
|
border-radius: var(--tn-radius-md);
|
|
margin: var(--tn-spacing-lg) 0;
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__empty-title {
|
|
font-size: var(--tn-font-size-lg);
|
|
font-weight: var(--tn-font-weight-medium);
|
|
margin-bottom: var(--tn-spacing-sm);
|
|
color: var(--tn-text-normal);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__empty-description {
|
|
font-size: var(--tn-font-size-lg);
|
|
line-height: 1.6;
|
|
max-width: 400px;
|
|
}
|
|
|
|
/* Task Item Container (wraps task cards) */
|
|
.tasknotes-plugin .task-list-view__task-item {
|
|
position: relative;
|
|
background: var(--tn-bg-primary);
|
|
border: 1px solid var(--tn-border-color);
|
|
border-radius: var(--tn-radius-sm);
|
|
transition: background-color var(--tn-transition-fast), border-color var(--tn-transition-fast), box-shadow var(--tn-transition-fast), transform var(--tn-transition-fast);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__task-item:hover {
|
|
background: var(--tn-interactive-hover);
|
|
border-color: var(--tn-border-color-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: var(--tn-shadow-medium);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__task-item:focus-within {
|
|
border-color: var(--tn-interactive-accent);
|
|
box-shadow: none;
|
|
}
|
|
|
|
/* Task Item States */
|
|
.tasknotes-plugin .task-list-view__task-item--completed {
|
|
opacity: 0.7;
|
|
background: var(--tn-bg-secondary);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__task-item--overdue {
|
|
border-inline-start: 1px solid var(--tn-color-error);
|
|
background: color-mix(in srgb, var(--tn-color-error) 0.05, var(--tn-bg-primary));
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__task-item--due-today {
|
|
border-inline-start: 1px solid var(--tn-interactive-accent);
|
|
background: color-mix(in srgb, var(--tn-interactive-accent) 0.05, var(--tn-bg-primary));
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__task-item--archived {
|
|
opacity: 0.5;
|
|
background: transparent;
|
|
}
|
|
|
|
/* Task Item Priority Indicators */
|
|
.tasknotes-plugin .task-list-view__task-item--priority-high {
|
|
border-inline-start: 1px solid var(--tn-color-error);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__task-item--priority-normal {
|
|
border-inline-start: 1px solid var(--tn-interactive-accent);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__task-item--priority-low {
|
|
border-inline-start: 1px solid var(--tn-text-muted);
|
|
}
|
|
|
|
/* Task Update Animation */
|
|
.tasknotes-plugin .task-list-view__task-item--updating {
|
|
animation: task-update 1.5s ease;
|
|
}
|
|
|
|
@keyframes task-update {
|
|
0% {
|
|
background-color: var(--tn-bg-primary);
|
|
transform: scale(1);
|
|
}
|
|
20% {
|
|
background-color: var(--tn-interactive-accent-hover);
|
|
transform: scale(1.02);
|
|
}
|
|
100% {
|
|
background-color: var(--tn-bg-primary);
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
|
|
/* Responsive Design */
|
|
@media (max-width: 768px) {
|
|
.tasknotes-plugin .task-list-view {
|
|
padding: var(--tn-spacing-xs);
|
|
gap: var(--tn-spacing-xs);
|
|
}
|
|
|
|
body.is-mobile .tasknotes-plugin .task-list-view {
|
|
padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
|
|
scroll-padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__header {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: var(--tn-spacing-sm);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__actions {
|
|
justify-content: center;
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__add-button {
|
|
width: 100%;
|
|
max-width: 200px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.tasknotes-plugin .task-list-view__group-header {
|
|
font-size: var(--tn-font-size-md);
|
|
padding: var(--tn-spacing-sm) 0 var(--tn-spacing-xs);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__empty {
|
|
padding: var(--tn-spacing-lg);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__empty-title {
|
|
font-size: var(--tn-font-size-md);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__empty-description {
|
|
font-size: var(--tn-font-size-sm);
|
|
}
|
|
}
|
|
|
|
/* Gap/slot drag-to-reorder: open real layout space at the insertion boundary */
|
|
.tasknotes-plugin .task-list-view__drop-slot-before,
|
|
.tasknotes-plugin .task-list-view__drop-slot-after {
|
|
transition: margin 200ms cubic-bezier(0.2, 0, 0, 1);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__drop-slot-before {
|
|
margin-top: var(--tn-drag-gap, 60px);
|
|
}
|
|
|
|
.tasknotes-plugin .task-list-view__drop-slot-after {
|
|
margin-bottom: var(--tn-drag-gap, 60px);
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.tasknotes-plugin .task-list-view__drop-slot-before,
|
|
.tasknotes-plugin .task-list-view__drop-slot-after {
|
|
transition: none;
|
|
}
|
|
}
|