mirror of
https://github.com/callumalpass/tasknotes.git
synced 2026-07-22 12:50:26 +00:00
• Remove legacy CSS class names and fallbacks from NoteCard and TaskCard creation and update functions. Legacy selectors (e.g. “tasknotes-card”, “note-title”, “note-item”, “task-checkbox”, “status-dot”, “task-completed”) have been removed so that only the new BEM class names are applied and queried. • Update the updateTaskProperty function in helpers.ts to use “default field names” instead of legacy field naming comments and mappings. • Modify TaskListView.ts import statement to now include the Setting module from Obsidian. • Update styles/README.md to reflect the new file hierarchy and structure that separates core system files, BEM component files, view-specific files, and legacy files. • Remove multiple legacy CSS files – agenda.css, calendar.css, filters.css, kanban.css, modals.css, and tasks.css – that are now deprecated. Legacy styles in base.css have also been reduced, ensuring that only modern (BEM-based) styles remain in use. This commit cleans up our codebase by removing deprecated legacy code and CSS, enforcing a consistent BEM methodology for UI elements, and updates documentation for better future maintainability.
908 lines
23 KiB
CSS
908 lines
23 KiB
CSS
/* Reduced motion support - scope to TaskNotes components only */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.tasknotes-container *,
|
|
.tasknotes-card *,
|
|
.tasknotes-button * {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
}
|
|
|
|
/* Button click feedback - scope to TaskNotes buttons only */
|
|
.tasknotes-container button:active:not(:disabled),
|
|
.tasknotes-button:active:not(:disabled) {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
/* Performance optimization animations */
|
|
@keyframes task-flash {
|
|
0% {
|
|
background-color: var(--interactive-accent-hover);
|
|
transform: scale(1.02);
|
|
}
|
|
100% {
|
|
background-color: transparent;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
@keyframes task-pulse {
|
|
0%, 100% {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
50% {
|
|
opacity: 0.8;
|
|
transform: scale(1.01);
|
|
}
|
|
}
|
|
|
|
@keyframes task-fade-in {
|
|
0% {
|
|
opacity: 0;
|
|
transform: translateY(-4px);
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes tracking-pulse {
|
|
0%, 100% {
|
|
opacity: 0.3;
|
|
transform: scale(1);
|
|
}
|
|
50% {
|
|
opacity: 0.6;
|
|
transform: scale(1.01);
|
|
}
|
|
}
|
|
|
|
/* Task update animations */
|
|
.task-flash {
|
|
animation: task-flash 1500ms ease-out;
|
|
}
|
|
|
|
.task-pulse {
|
|
animation: task-pulse 1000ms ease-in-out;
|
|
}
|
|
|
|
.task-fade-in {
|
|
animation: task-fade-in 300ms ease-out;
|
|
}
|
|
|
|
/* ================================================
|
|
MATERIAL DESIGN 3 UTILITY CLASSES
|
|
================================================ */
|
|
|
|
/* Layout Utilities */
|
|
.cs-flex { display: flex; }
|
|
.cs-flex--column { flex-direction: column; }
|
|
.cs-flex--row { flex-direction: row; }
|
|
.cs-flex--center { align-items: center; justify-content: center; }
|
|
.cs-flex--between { justify-content: space-between; }
|
|
.cs-flex--around { justify-content: space-around; }
|
|
.cs-flex--evenly { justify-content: space-evenly; }
|
|
.cs-flex--start { justify-content: flex-start; }
|
|
.cs-flex--end { justify-content: flex-end; }
|
|
.cs-flex--wrap { flex-wrap: wrap; }
|
|
.cs-flex--nowrap { flex-wrap: nowrap; }
|
|
.cs-flex--align-center { align-items: center; }
|
|
.cs-flex--align-start { align-items: flex-start; }
|
|
.cs-flex--align-end { align-items: flex-end; }
|
|
.cs-flex--align-stretch { align-items: stretch; }
|
|
|
|
/* Gap Utilities */
|
|
.cs-gap--xs { gap: var(--cs-spacing-xs); }
|
|
.cs-gap--sm { gap: var(--cs-spacing-sm); }
|
|
.cs-gap--md { gap: var(--cs-spacing-md); }
|
|
.cs-gap--lg { gap: var(--cs-spacing-lg); }
|
|
.cs-gap--xl { gap: var(--cs-spacing-xl); }
|
|
|
|
/* Padding Utilities */
|
|
.cs-p--0 { padding: 0; }
|
|
.cs-p--xs { padding: var(--cs-spacing-xs); }
|
|
.cs-p--sm { padding: var(--cs-spacing-sm); }
|
|
.cs-p--md { padding: var(--cs-spacing-md); }
|
|
.cs-p--lg { padding: var(--cs-spacing-lg); }
|
|
.cs-p--xl { padding: var(--cs-spacing-xl); }
|
|
|
|
/* Padding directional */
|
|
.cs-px--xs { padding-left: var(--cs-spacing-xs); padding-right: var(--cs-spacing-xs); }
|
|
.cs-px--sm { padding-left: var(--cs-spacing-sm); padding-right: var(--cs-spacing-sm); }
|
|
.cs-px--md { padding-left: var(--cs-spacing-md); padding-right: var(--cs-spacing-md); }
|
|
.cs-py--xs { padding-top: var(--cs-spacing-xs); padding-bottom: var(--cs-spacing-xs); }
|
|
.cs-py--sm { padding-top: var(--cs-spacing-sm); padding-bottom: var(--cs-spacing-sm); }
|
|
.cs-py--md { padding-top: var(--cs-spacing-md); padding-bottom: var(--cs-spacing-md); }
|
|
|
|
/* Margin Utilities */
|
|
.cs-m--0 { margin: 0; }
|
|
.cs-m--xs { margin: var(--cs-spacing-xs); }
|
|
.cs-m--sm { margin: var(--cs-spacing-sm); }
|
|
.cs-m--md { margin: var(--cs-spacing-md); }
|
|
.cs-mb--xs { margin-bottom: var(--cs-spacing-xs); }
|
|
.cs-mb--sm { margin-bottom: var(--cs-spacing-sm); }
|
|
.cs-mb--md { margin-bottom: var(--cs-spacing-md); }
|
|
.cs-mt--xs { margin-top: var(--cs-spacing-xs); }
|
|
.cs-mt--sm { margin-top: var(--cs-spacing-sm); }
|
|
.cs-mt--md { margin-top: var(--cs-spacing-md); }
|
|
|
|
/* Display Utilities */
|
|
.cs-hidden { display: none; }
|
|
.cs-visible { display: block; }
|
|
.cs-inline { display: inline; }
|
|
.cs-inline-block { display: inline-block; }
|
|
|
|
/* Position Utilities */
|
|
.cs-relative { position: relative; }
|
|
.cs-absolute { position: absolute; }
|
|
.cs-fixed { position: fixed; }
|
|
.cs-sticky { position: sticky; }
|
|
|
|
/* Typography Utilities */
|
|
.cs-text--center { text-align: center; }
|
|
.cs-text--left { text-align: left; }
|
|
.cs-text--right { text-align: right; }
|
|
.cs-text--uppercase { text-transform: uppercase; }
|
|
.cs-text--lowercase { text-transform: lowercase; }
|
|
.cs-text--capitalize { text-transform: capitalize; }
|
|
.cs-text--normal { font-weight: normal; }
|
|
.cs-text--medium { font-weight: 500; }
|
|
.cs-text--semibold { font-weight: 600; }
|
|
.cs-text--bold { font-weight: bold; }
|
|
|
|
/* Color Utilities */
|
|
.cs-text--primary { color: var(--text-normal); }
|
|
.cs-text--secondary { color: var(--text-muted); }
|
|
.cs-text--accent { color: var(--interactive-accent); }
|
|
.cs-text--error { color: var(--text-error); }
|
|
.cs-text--success { color: var(--text-success); }
|
|
.cs-text--warning { color: var(--text-warning); }
|
|
|
|
/* ================================================
|
|
MATERIAL 3 EXPRESSIVE BUTTON SYSTEM
|
|
================================================ */
|
|
|
|
/* Base Button - Enhanced with expressive motion and personality */
|
|
.cs-btn {
|
|
position: relative;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--cs-spacing-sm);
|
|
border: none;
|
|
border-radius: var(--cs-radius-lg);
|
|
font-family: inherit;
|
|
font-size: var(--cs-text-label-large);
|
|
font-weight: 500;
|
|
line-height: 1.25;
|
|
text-decoration: none;
|
|
white-space: nowrap;
|
|
user-select: none;
|
|
cursor: pointer;
|
|
transition: all var(--cs-transition-normal);
|
|
overflow: hidden;
|
|
outline: none;
|
|
min-height: var(--cs-button-height-md);
|
|
padding: 0 var(--cs-spacing-lg);
|
|
transform-origin: center;
|
|
will-change: transform, box-shadow;
|
|
}
|
|
|
|
.cs-btn:disabled {
|
|
opacity: var(--cs-state-disabled);
|
|
cursor: not-allowed;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.cs-btn:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Filled Button - Primary actions */
|
|
.cs-btn--filled {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
box-shadow: var(--cs-elevation-1);
|
|
}
|
|
|
|
.cs-btn--filled:hover {
|
|
background: var(--interactive-accent-hover);
|
|
box-shadow: var(--cs-elevation-2);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.cs-btn--filled:active {
|
|
background: var(--interactive-accent);
|
|
box-shadow: var(--cs-elevation-1);
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Outlined Button - Secondary actions */
|
|
.cs-btn--outlined {
|
|
background: transparent;
|
|
color: var(--interactive-accent);
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.cs-btn--outlined:hover {
|
|
background: color-mix(in srgb, var(--interactive-accent) var(--cs-state-hover), transparent);
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.cs-btn--outlined:active {
|
|
background: color-mix(in srgb, var(--interactive-accent) var(--cs-state-pressed), transparent);
|
|
}
|
|
|
|
/* Text Button - Tertiary actions */
|
|
.cs-btn--text {
|
|
background: transparent;
|
|
color: var(--interactive-accent);
|
|
padding: 0 var(--cs-spacing-md);
|
|
}
|
|
|
|
.cs-btn--text:hover {
|
|
background: color-mix(in srgb, var(--interactive-accent) var(--cs-state-hover), transparent);
|
|
}
|
|
|
|
.cs-btn--text:active {
|
|
background: color-mix(in srgb, var(--interactive-accent) var(--cs-state-pressed), transparent);
|
|
}
|
|
|
|
/* Elevated Button - Subtle elevation */
|
|
.cs-btn--elevated {
|
|
background: var(--cs-surface-container-low);
|
|
color: var(--interactive-accent);
|
|
box-shadow: var(--cs-elevation-1);
|
|
}
|
|
|
|
.cs-btn--elevated:hover {
|
|
background: color-mix(in srgb, var(--interactive-accent) var(--cs-state-hover), var(--cs-surface-container-low));
|
|
box-shadow: var(--cs-elevation-2);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.cs-btn--elevated:active {
|
|
background: color-mix(in srgb, var(--interactive-accent) var(--cs-state-pressed), var(--cs-surface-container-low));
|
|
box-shadow: var(--cs-elevation-1);
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Tonal Button - Surface with tint */
|
|
.cs-btn--tonal {
|
|
background: var(--cs-surface-container-highest);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.cs-btn--tonal:hover {
|
|
background: color-mix(in srgb, var(--text-normal) var(--cs-state-hover), var(--cs-surface-container-highest));
|
|
box-shadow: var(--cs-elevation-1);
|
|
}
|
|
|
|
.cs-btn--tonal:active {
|
|
background: color-mix(in srgb, var(--text-normal) var(--cs-state-pressed), var(--cs-surface-container-highest));
|
|
}
|
|
|
|
/* FAB - Floating Action Button */
|
|
.cs-btn--fab {
|
|
border-radius: var(--cs-radius-lg);
|
|
width: 56px;
|
|
height: 56px;
|
|
padding: 0;
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
box-shadow: var(--cs-elevation-3);
|
|
}
|
|
|
|
.cs-btn--fab:hover {
|
|
box-shadow: var(--cs-elevation-3);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.cs-btn--fab:active {
|
|
box-shadow: var(--cs-elevation-2);
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Small FAB */
|
|
.cs-btn--fab-small {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: var(--cs-radius-md);
|
|
}
|
|
|
|
/* Extended FAB */
|
|
.cs-btn--fab-extended {
|
|
width: auto;
|
|
padding: 0 var(--cs-spacing-md);
|
|
border-radius: var(--cs-radius-lg);
|
|
}
|
|
|
|
/* Icon Button - For icon-only actions */
|
|
.cs-btn--icon {
|
|
width: var(--cs-button-height-md);
|
|
height: var(--cs-button-height-md);
|
|
padding: 0;
|
|
border-radius: 50%;
|
|
background: transparent;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.cs-btn--icon:hover {
|
|
background: color-mix(in srgb, var(--text-normal) var(--cs-state-hover), transparent);
|
|
}
|
|
|
|
.cs-btn--icon:active {
|
|
background: color-mix(in srgb, var(--text-normal) var(--cs-state-pressed), transparent);
|
|
}
|
|
|
|
/* Icon Button with accent */
|
|
.cs-btn--icon-accent {
|
|
color: var(--interactive-accent);
|
|
}
|
|
|
|
.cs-btn--icon-accent:hover {
|
|
background: color-mix(in srgb, var(--interactive-accent) var(--cs-state-hover), transparent);
|
|
}
|
|
|
|
/* Button Size Variants */
|
|
.cs-btn--small {
|
|
min-height: var(--cs-button-height-sm);
|
|
padding: 0 var(--cs-spacing-md);
|
|
font-size: var(--cs-text-label-medium);
|
|
}
|
|
|
|
.cs-btn--large {
|
|
min-height: var(--cs-button-height-lg);
|
|
padding: 0 var(--cs-spacing-xl);
|
|
font-size: var(--cs-text-label-large);
|
|
}
|
|
|
|
/* Button with leading/trailing icons */
|
|
.cs-btn--leading-icon {
|
|
padding-left: var(--cs-spacing-md);
|
|
}
|
|
|
|
.cs-btn--trailing-icon {
|
|
padding-right: var(--cs-spacing-md);
|
|
}
|
|
|
|
/* Full width button */
|
|
.cs-btn--full {
|
|
width: 100%;
|
|
}
|
|
|
|
/* Loading state */
|
|
.cs-btn--loading {
|
|
pointer-events: none;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.cs-btn--loading::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 16px;
|
|
height: 16px;
|
|
border: 2px solid transparent;
|
|
border-top: 2px solid currentColor;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* ================================================
|
|
MATERIAL DESIGN 3 FORM CONTROL SYSTEM
|
|
================================================ */
|
|
|
|
/* Base Form Field */
|
|
.cs-form-field {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--cs-spacing-xs);
|
|
}
|
|
|
|
/* Input Fields */
|
|
.cs-input {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: var(--cs-spacing-sm) var(--cs-spacing-md);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: var(--cs-radius-sm);
|
|
background: var(--cs-surface-container-highest);
|
|
color: var(--text-normal);
|
|
font-family: inherit;
|
|
font-size: var(--cs-text-body-large);
|
|
font-weight: 400;
|
|
line-height: 1.5;
|
|
transition: all var(--cs-motion-duration-short2) var(--cs-motion-easing-standard);
|
|
min-height: var(--cs-input-height-md);
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
outline: none;
|
|
}
|
|
|
|
.cs-input::placeholder {
|
|
color: var(--text-muted);
|
|
opacity: 1;
|
|
}
|
|
|
|
.cs-input:hover {
|
|
border-color: var(--text-normal);
|
|
background: color-mix(in srgb, var(--text-normal) var(--cs-state-hover), var(--cs-surface-container-highest));
|
|
}
|
|
|
|
.cs-input:focus {
|
|
border-color: var(--interactive-accent);
|
|
background: color-mix(in srgb, var(--interactive-accent) var(--cs-state-focus), var(--cs-surface-container-highest));
|
|
caret-color: var(--interactive-accent);
|
|
}
|
|
|
|
.cs-input:disabled {
|
|
opacity: var(--cs-state-disabled);
|
|
cursor: not-allowed;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Filled Input Variant */
|
|
.cs-input--filled {
|
|
background: var(--cs-surface-container-highest);
|
|
border: none;
|
|
border-bottom: 1px solid var(--text-muted);
|
|
border-radius: var(--cs-radius-xs) var(--cs-radius-xs) 0 0;
|
|
padding-bottom: var(--cs-spacing-xs);
|
|
}
|
|
|
|
.cs-input--filled:hover {
|
|
border-bottom-color: var(--text-normal);
|
|
background: color-mix(in srgb, var(--text-normal) var(--cs-state-hover), var(--cs-surface-container-highest));
|
|
}
|
|
|
|
.cs-input--filled:focus {
|
|
border-bottom: 2px solid var(--interactive-accent);
|
|
padding-bottom: calc(var(--cs-spacing-xs) - 1px);
|
|
}
|
|
|
|
/* Outlined Input Variant */
|
|
.cs-input--outlined {
|
|
background: transparent;
|
|
border: 1px solid var(--text-muted);
|
|
}
|
|
|
|
.cs-input--outlined:hover {
|
|
border-color: var(--text-normal);
|
|
background: color-mix(in srgb, var(--text-normal) var(--cs-state-hover), transparent);
|
|
}
|
|
|
|
.cs-input--outlined:focus {
|
|
border: 2px solid var(--interactive-accent);
|
|
padding: calc(var(--cs-spacing-sm) - 1px) calc(var(--cs-spacing-md) - 1px);
|
|
}
|
|
|
|
/* Input Size Variants */
|
|
.cs-input--small {
|
|
min-height: var(--cs-input-height-sm);
|
|
padding: var(--cs-spacing-xs) var(--cs-spacing-sm);
|
|
font-size: var(--cs-text-label-medium);
|
|
}
|
|
|
|
.cs-input--large {
|
|
min-height: var(--cs-input-height-lg);
|
|
padding: var(--cs-spacing-md) var(--cs-spacing-lg);
|
|
font-size: var(--cs-text-body-large);
|
|
}
|
|
|
|
/* Textarea */
|
|
.cs-textarea {
|
|
resize: vertical;
|
|
min-height: 80px;
|
|
padding: var(--cs-spacing-sm);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* Select Field */
|
|
.cs-select {
|
|
appearance: none;
|
|
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
|
|
background-position: right var(--cs-spacing-sm) center;
|
|
background-repeat: no-repeat;
|
|
background-size: 16px;
|
|
padding-right: var(--cs-spacing-xl);
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Form Labels */
|
|
.cs-label {
|
|
display: block;
|
|
font-size: var(--cs-text-label-large);
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
margin-bottom: var(--cs-spacing-xs);
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.cs-label--required::after {
|
|
content: ' *';
|
|
color: var(--text-error);
|
|
}
|
|
|
|
/* Helper Text */
|
|
.cs-helper-text {
|
|
font-size: var(--cs-text-label-medium);
|
|
color: var(--text-muted);
|
|
margin-top: var(--cs-spacing-xs);
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.cs-helper-text--error {
|
|
color: var(--text-error);
|
|
}
|
|
|
|
/* Form Field Error State */
|
|
.cs-form-field--error .cs-input {
|
|
border-color: var(--text-error);
|
|
}
|
|
|
|
.cs-form-field--error .cs-input:focus {
|
|
border-color: var(--text-error);
|
|
background: color-mix(in srgb, var(--text-error) var(--cs-state-focus), var(--cs-surface-container-highest));
|
|
}
|
|
|
|
/* Removed all custom checkbox styling - let browser/theme handle checkboxes naturally */
|
|
|
|
/* ================================================
|
|
MATERIAL DESIGN 3 BADGE SYSTEM
|
|
================================================ */
|
|
|
|
/* Base Badge */
|
|
.cs-badge {
|
|
position: relative;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--cs-spacing-xs) var(--cs-spacing-sm);
|
|
border-radius: var(--cs-radius-lg);
|
|
font-family: inherit;
|
|
font-size: var(--cs-text-label-small);
|
|
font-weight: 500;
|
|
line-height: 1.2;
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
min-height: 24px;
|
|
box-sizing: border-box;
|
|
transition: all var(--cs-motion-duration-short2) var(--cs-motion-easing-standard);
|
|
}
|
|
|
|
/* Badge Variants */
|
|
.cs-badge--primary {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.cs-badge--secondary {
|
|
background: var(--cs-surface-container-high);
|
|
color: var(--text-normal);
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.cs-badge--success {
|
|
background: var(--text-success);
|
|
color: var(--background-primary);
|
|
}
|
|
|
|
.cs-badge--warning {
|
|
background: var(--text-warning);
|
|
color: var(--background-primary);
|
|
}
|
|
|
|
.cs-badge--error {
|
|
background: var(--text-error);
|
|
color: var(--background-primary);
|
|
}
|
|
|
|
.cs-badge--muted {
|
|
background: var(--cs-surface-container-highest);
|
|
color: var(--text-muted);
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
/* Badge Sizes */
|
|
.cs-badge--small {
|
|
padding: 2px var(--cs-spacing-xs);
|
|
font-size: var(--cs-text-label-small);
|
|
min-height: 20px;
|
|
border-radius: var(--cs-radius-sm);
|
|
}
|
|
|
|
.cs-badge--large {
|
|
padding: var(--cs-spacing-sm) var(--cs-spacing-md);
|
|
font-size: var(--cs-text-label-medium);
|
|
min-height: 32px;
|
|
border-radius: var(--cs-radius-lg);
|
|
}
|
|
|
|
/* Dot Badge - Notification style */
|
|
.cs-badge--dot {
|
|
padding: 0;
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
min-height: auto;
|
|
}
|
|
|
|
/* Badge with icon */
|
|
.cs-badge--icon {
|
|
gap: var(--cs-spacing-xs);
|
|
padding-left: var(--cs-spacing-xs);
|
|
}
|
|
|
|
/* Removable badge */
|
|
.cs-badge--removable {
|
|
padding-right: var(--cs-spacing-xs);
|
|
gap: var(--cs-spacing-xs);
|
|
}
|
|
|
|
.cs-badge__remove {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 16px;
|
|
height: 16px;
|
|
border-radius: 50%;
|
|
background: transparent;
|
|
border: none;
|
|
color: currentColor;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
line-height: 1;
|
|
transition: background-color var(--cs-motion-duration-short2) var(--cs-motion-easing-standard);
|
|
}
|
|
|
|
.cs-badge__remove:hover {
|
|
background: color-mix(in srgb, currentColor var(--cs-state-hover), transparent);
|
|
}
|
|
|
|
/* Badge positioning helpers */
|
|
.cs-badge--positioned {
|
|
position: absolute;
|
|
top: -8px;
|
|
right: -8px;
|
|
z-index: var(--cs-z-sticky);
|
|
}
|
|
|
|
.cs-badge--inline {
|
|
position: static;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
/* ================================================
|
|
MATERIAL 3 EXPRESSIVE CARD SYSTEM
|
|
================================================ */
|
|
|
|
/* Base Card - Enhanced with expressive motion and personality */
|
|
.cs-card {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--cs-surface-container-low);
|
|
border-radius: var(--cs-radius-md);
|
|
box-shadow: var(--cs-elevation-1);
|
|
transition: all var(--cs-transition-normal);
|
|
overflow: hidden;
|
|
border: 1px solid var(--background-modifier-border);
|
|
transform-origin: center;
|
|
will-change: transform, box-shadow;
|
|
}
|
|
|
|
/* Card Elevation Variants */
|
|
.cs-card--elevated {
|
|
background: var(--cs-surface-container-low);
|
|
box-shadow: var(--cs-elevation-1);
|
|
border: none;
|
|
}
|
|
|
|
.cs-card--elevated:hover {
|
|
box-shadow: var(--cs-elevation-3);
|
|
transform: translateY(-3px) scale(1.01);
|
|
}
|
|
|
|
.cs-card--filled {
|
|
background: var(--cs-surface-container-highest);
|
|
box-shadow: none;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.cs-card--outlined {
|
|
background: var(--cs-surface-container-lowest);
|
|
box-shadow: none;
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
/* Interactive Card States */
|
|
.cs-card--clickable {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.cs-card--clickable:hover {
|
|
background: color-mix(in srgb, var(--text-normal) var(--cs-state-hover), var(--cs-surface-container-low));
|
|
transform: translateY(-1px);
|
|
box-shadow: var(--cs-elevation-2);
|
|
}
|
|
|
|
.cs-card--clickable:active {
|
|
background: color-mix(in srgb, var(--text-normal) var(--cs-state-pressed), var(--cs-surface-container-low));
|
|
transform: translateY(0);
|
|
box-shadow: var(--cs-elevation-1);
|
|
}
|
|
|
|
.cs-card--clickable:focus-visible {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Card Padding Variants */
|
|
.cs-card--compact {
|
|
padding: var(--cs-spacing-sm);
|
|
}
|
|
|
|
.cs-card--comfortable {
|
|
padding: var(--cs-spacing-md);
|
|
}
|
|
|
|
.cs-card--spacious {
|
|
padding: var(--cs-spacing-lg);
|
|
}
|
|
|
|
/* Card Components */
|
|
.cs-card__header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: var(--cs-spacing-sm);
|
|
padding: var(--cs-spacing-md) var(--cs-spacing-md) 0;
|
|
}
|
|
|
|
.cs-card__title {
|
|
font-size: var(--cs-text-title-large);
|
|
font-weight: 500;
|
|
color: var(--text-normal);
|
|
line-height: 1.3;
|
|
margin: 0;
|
|
}
|
|
|
|
.cs-card__subtitle {
|
|
font-size: var(--cs-text-body-medium);
|
|
color: var(--text-muted);
|
|
line-height: 1.4;
|
|
margin: var(--cs-spacing-xs) 0 0;
|
|
}
|
|
|
|
.cs-card__content {
|
|
padding: var(--cs-spacing-md);
|
|
flex: 1;
|
|
}
|
|
|
|
.cs-card__actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--cs-spacing-sm);
|
|
padding: 0 var(--cs-spacing-md) var(--cs-spacing-md);
|
|
margin-top: auto;
|
|
}
|
|
|
|
.cs-card__actions--justify-end {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.cs-card__actions--justify-between {
|
|
justify-content: space-between;
|
|
}
|
|
|
|
/* Card Media */
|
|
.cs-card__media {
|
|
width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
}
|
|
|
|
.cs-card__media--aspect-16-9 {
|
|
aspect-ratio: 16 / 9;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.cs-card__media--aspect-1-1 {
|
|
aspect-ratio: 1 / 1;
|
|
object-fit: cover;
|
|
}
|
|
|
|
/* Card Variants */
|
|
.cs-card--horizontal {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
}
|
|
|
|
.cs-card--horizontal .cs-card__content {
|
|
flex: 1;
|
|
}
|
|
|
|
.cs-card--horizontal .cs-card__media {
|
|
width: 120px;
|
|
height: 80px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Card Status Indicators */
|
|
.cs-card--success {
|
|
border-left: 4px solid var(--text-success);
|
|
}
|
|
|
|
.cs-card--warning {
|
|
border-left: 4px solid var(--text-warning);
|
|
}
|
|
|
|
.cs-card--error {
|
|
border-left: 4px solid var(--text-error);
|
|
}
|
|
|
|
.cs-card--info {
|
|
border-left: 4px solid var(--interactive-accent);
|
|
}
|
|
|
|
/* Card Loading State */
|
|
.cs-card--loading {
|
|
pointer-events: none;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.cs-card--loading::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
|
|
animation: shimmer 1.5s infinite;
|
|
}
|
|
|
|
@keyframes shimmer {
|
|
0% { transform: translateX(-100%); }
|
|
100% { transform: translateX(100%); }
|
|
}
|
|
|
|
/* ================================================
|
|
VIEW CONTAINER SYSTEM
|
|
================================================ */
|
|
|
|
.tasknotes-view-container {
|
|
padding: var(--cs-spacing-sm);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--cs-spacing-sm);
|
|
max-width: 100%;
|
|
}
|
|
|
|
.view-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--cs-spacing-sm) 0;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
margin-bottom: var(--cs-spacing-sm);
|
|
}
|
|
|
|
.view-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--cs-spacing-sm);
|
|
}
|
|
|