semanticdata_obsidian-pomodoro/styles.css
2025-12-29 09:17:18 -06:00

165 lines
3.2 KiB
CSS

/* Reference: https://docs.obsidian.md/Reference/CSS+variables/CSS+variables */
/* Base timer container styles */
.pomodoro-timer {
gap: 4px;
cursor: pointer;
transition:
background-color 0.3s ease,
color 0.3s ease;
/* Default state - inherits status bar text color */
color: var(--text-normal);
}
/* Icon container */
.pomodoro-timer .pomodoro-icon {
display: inline-flex;
align-items: center;
line-height: 1;
}
/* Text container */
.pomodoro-timer .pomodoro-text {
font-size: var(--font-ui-smaller);
line-height: 1;
}
/* No icon state - adjust spacing when icon is hidden */
.pomodoro-timer--no-icon {
gap: 0;
}
.pomodoro-timer--no-icon .pomodoro-text {
padding-left: 0;
}
/* Base SVG icon styles */
.pomodoro-timer .pomodoro-icon svg {
width: var(--icon-xs);
height: var(--icon-xs);
fill: none;
stroke-width: 2;
transition:
stroke 0.3s ease,
opacity 0.2s ease,
transform 0.2s ease;
/* Default state - matches text color */
stroke: var(--text-normal);
opacity: 0.8;
}
/* ============================================ */
/* STATE COMBINATIONS - Organized by priority */
/* ============================================ */
/* 1. DEFAULT STATE (no classes) */
.pomodoro-timer {
background-color: transparent;
color: var(--text-muted);
}
.pomodoro-timer .pomodoro-icon svg {
stroke: var(--text-muted);
}
/* 2. DEFAULT HOVER */
.pomodoro-timer:hover {
background-color: var(--interactive-accent-hover);
color: var(--text-on-accent);
}
.pomodoro-timer:hover .pomodoro-icon svg {
stroke: var(--text-on-accent);
opacity: 1;
}
/* 3. ACTIVE STATE */
.pomodoro-timer.active {
background-color: var(--interactive-accent);
color: var(--text-on-accent);
}
.pomodoro-timer.active .pomodoro-icon svg {
stroke: var(--text-on-accent);
opacity: 1;
animation: pulse 2s ease-in-out infinite;
}
/* 4. ACTIVE HOVER */
.pomodoro-timer.active:hover {
background-color: var(--interactive-accent-hover);
color: var(--text-on-accent);
}
.pomodoro-timer.active:hover .pomodoro-icon svg {
stroke: var(--text-on-accent);
opacity: 1;
/* Keep animation running */
}
/* 5. PAUSED STATE */
.pomodoro-timer.paused {
background-color: var(--interactive-normal);
color: var(--text-muted);
}
.pomodoro-timer.paused .pomodoro-icon svg {
stroke: var(--text-muted);
animation: none;
}
/* 6. PAUSED HOVER */
.pomodoro-timer.paused:hover {
background-color: var(--interactive-hover);
color: var(--text-normal);
}
.pomodoro-timer.paused:hover .pomodoro-icon svg {
stroke: var(--text-normal);
}
/* ============================================ */
/* ANIMATIONS */
/* ============================================ */
@keyframes pulse {
0%,
100% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0.8;
transform: scale(0.95);
}
}
/* ============================================ */
/* ACCESSIBILITY & PREFERENCES */
/* ============================================ */
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
.pomodoro-timer.active .pomodoro-icon svg {
animation: none;
}
.pomodoro-timer * {
transition: none;
}
}
/* High contrast mode support */
@media (prefers-contrast: high) {
.pomodoro-timer .pomodoro-icon svg {
stroke-width: 2.5;
opacity: 1;
}
.pomodoro-timer.paused .pomodoro-icon svg {
opacity: 0.8;
}
}