style: Implement borderless button design system across all components

- Remove all borders and box-shadows from buttons throughout the plugin
- Apply consistent transparent background with hover states to all interactive elements
- Update FullCalendar buttons in advanced calendar view to use borderless design
- Standardize hover colors using color-mix for consistent interactive feedback
- Enhance focus states with outline-based accessibility patterns
- Unify button styling across calendar view selectors, pomodoro controls, and utility buttons
- Improve visual consistency with Obsidian's minimalist design language

This change completes the migration to a cohesive borderless button system that
provides better visual integration with Obsidian themes while maintaining full
accessibility through proper focus indicators.
This commit is contained in:
Callum Alpass 2025-07-27 09:02:48 +10:00
parent 326bace73c
commit 6b2d58bcc7
5 changed files with 103 additions and 59 deletions

View file

@ -589,10 +589,20 @@
gap: 0.25rem;
}
/* Minimal button styling */
.advanced-calendar-view .fc-button-primary {
/* Remove all borders from FullCalendar buttons */
.advanced-calendar-view .fc-button,
.advanced-calendar-view .fc-button-primary,
.advanced-calendar-view .fc-button-secondary,
.advanced-calendar-view .fc-prev-button,
.advanced-calendar-view .fc-next-button,
.advanced-calendar-view .fc-today-button,
.advanced-calendar-view .fc-dayGridMonth-button,
.advanced-calendar-view .fc-timeGridWeek-button,
.advanced-calendar-view .fc-timeGridDay-button,
.advanced-calendar-view .fc-listWeek-button {
border: none !important;
box-shadow: none !important;
background: transparent;
border: none;
color: var(--text-muted);
font-size: 0.8rem;
font-weight: 400;
@ -601,9 +611,16 @@
transition: all 0.2s ease;
}
.advanced-calendar-view .fc-button-primary:hover:not(:disabled) {
/* Hover states for all FC buttons */
.advanced-calendar-view .fc-button:hover:not(:disabled),
.advanced-calendar-view .fc-button-primary:hover:not(:disabled),
.advanced-calendar-view .fc-button-secondary:hover:not(:disabled),
.advanced-calendar-view .fc-prev-button:hover:not(:disabled),
.advanced-calendar-view .fc-next-button:hover:not(:disabled) {
background: var(--tn-interactive-hover);
color: var(--text-normal);
border: none !important;
box-shadow: none !important;
}
.advanced-calendar-view .fc-button-primary:disabled {
@ -612,7 +629,9 @@
opacity: 0.5;
}
.advanced-calendar-view .fc-button-active {
/* Active state for FC buttons (currently selected view) */
.advanced-calendar-view .fc-button-active,
.advanced-calendar-view .fc-button.fc-button-active {
background: var(--interactive-accent) !important;
border: none !important;
box-shadow: none !important;

View file

@ -38,15 +38,16 @@
gap: var(--tn-spacing-md);
}
/* Calendar View Type Select */
/* Use consistent button system for view selector */
.tasknotes-plugin .calendar-view__view-selector,
.tasknotes-plugin .mini-calendar-view__view-selector {
margin-right: var(--tn-spacing-md);
min-width: 120px;
padding: var(--tn-spacing-xs) var(--tn-spacing-sm);
border: 1px solid var(--tn-border-color);
border: none;
box-shadow: none;
border-radius: var(--tn-radius-sm);
background: var(--tn-bg-primary);
background: transparent;
color: var(--tn-text-normal);
font-size: var(--tn-font-size-sm);
cursor: pointer;
@ -56,13 +57,14 @@
.tasknotes-plugin .calendar-view__view-selector:hover,
.tasknotes-plugin .mini-calendar-view__view-selector:hover {
background: var(--tn-interactive-hover);
border-color: var(--tn-border-color-hover);
box-shadow: none;
}
.tasknotes-plugin .calendar-view__view-selector:focus,
.tasknotes-plugin .mini-calendar-view__view-selector:focus {
border-color: var(--tn-interactive-accent);
outline: none;
outline: 2px solid var(--tn-interactive-accent);
outline-offset: 2px;
box-shadow: none;
}
/* Calendar Navigation Section */
@ -206,11 +208,11 @@
padding: var(--tn-spacing-xs);
color: var(--tn-text-muted);
background: var(--tn-bg-secondary);
border-bottom: 1px solid var(--tn-border-color);
border: none;
role: columnheader;
}
/* Calendar Day Cell */
/* Calendar Day Cell - consistent styling */
.tasknotes-plugin .calendar-view__day,
.tasknotes-plugin .mini-calendar-view__day {
position: relative;
@ -223,7 +225,7 @@
align-items: center;
justify-content: center;
background: var(--tn-bg-primary);
border-bottom: 1px solid var(--tn-border-color);
border: none;
transition: all var(--tn-transition-fast);
font-size: var(--tn-font-size-sm);
font-weight: 500;
@ -233,7 +235,7 @@
.tasknotes-plugin .calendar-view__day:hover,
.tasknotes-plugin .mini-calendar-view__day:hover {
background-color: var(--tn-interactive-hover);
border-color: transparent;
border: none;
transform: none;
box-shadow: none;
}
@ -266,7 +268,7 @@
.tasknotes-plugin .mini-calendar-view__day--selected {
border: 1px solid var(--tn-interactive-accent);
font-weight: 500;
background-color: transparent;
background-color: color-mix(in srgb, var(--tn-interactive-accent) 12%, transparent);
box-shadow: none;
}

View file

@ -233,29 +233,20 @@
width: 100%;
}
/* Task Select Button */
/* Use consistent button system for task select button */
.tasknotes-plugin .pomodoro-view__task-select-button {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: var(--tn-spacing-sm) var(--tn-spacing-lg);
border: none;
border-radius: var(--tn-radius-lg);
background: var(--tn-bg-primary);
background: transparent;
color: var(--tn-text-normal);
cursor: pointer;
font-size: var(--tn-font-size-sm);
font-weight: var(--tn-font-weight-normal);
transition: background-color 0.2s ease;
min-height: var(--tn-button-height-sm);
border: none;
box-shadow: none;
flex: 1;
white-space: nowrap;
box-shadow: none;
}
.tasknotes-plugin .pomodoro-view__task-select-button:hover {
background: var(--tn-bg-secondary);
background: var(--tn-interactive-hover);
border: none;
box-shadow: none;
}
.tasknotes-plugin .pomodoro-view__task-select-button--no-task {
@ -263,29 +254,20 @@
font-style: italic;
}
/* Task Clear Button - Inline secondary button */
/* Use consistent button system for task clear button */
.tasknotes-plugin .pomodoro-view__task-clear-button {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: var(--tn-spacing-sm) var(--tn-spacing-lg);
border: none;
border-radius: var(--tn-radius-lg);
background: var(--tn-bg-primary);
background: transparent;
color: var(--tn-text-normal);
cursor: pointer;
font-size: var(--tn-font-size-sm);
font-weight: var(--tn-font-weight-normal);
transition: background-color 0.2s ease;
min-height: var(--tn-button-height-sm);
border: none;
box-shadow: none;
flex: 1;
white-space: nowrap;
box-shadow: none;
}
.tasknotes-plugin .pomodoro-view__task-clear-button:hover {
background: var(--tn-bg-secondary);
background: var(--tn-interactive-hover);
border: none;
box-shadow: none;
}
.tasknotes-plugin .pomodoro-view__task-clear-button--hidden {
@ -406,25 +388,21 @@
pointer-events: auto; /* Re-enable pointer events for the buttons */
}
/* Use consistent button system for time adjust buttons */
.tasknotes-plugin .pomodoro-view__time-adjust-button {
width: 28px;
height: 28px;
border-radius: 50%;
background: var(--tn-bg-primary);
background: transparent;
color: var(--tn-text-normal);
border: none;
box-shadow: none;
cursor: pointer;
font-size: var(--tn-font-size-md);
font-weight: var(--tn-font-weight-normal);
transition: background-color 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
}
.tasknotes-plugin .pomodoro-view__time-adjust-button:hover {
background: var(--tn-bg-secondary);
background: var(--tn-interactive-hover);
border: none;
box-shadow: none;
}
.tasknotes-plugin .pomodoro-view__time-adjust-button:focus {
@ -488,7 +466,8 @@
.tasknotes-plugin .pomodoro-view__stat--clickable:hover {
background: var(--tn-interactive-hover);
transform: translateY(-1px);
border: none;
box-shadow: none;
}
.tasknotes-plugin .pomodoro-view__stat-value {

View file

@ -2067,6 +2067,42 @@
BUTTON UTILITIES - CONSISTENT BUTTON SYSTEM
================================================ */
/* Global button border removal - high specificity without !important */
.tasknotes-plugin button,
.tasknotes-plugin input[type="button"],
.tasknotes-plugin input[type="submit"],
.tasknotes-plugin input[type="reset"],
.tasknotes-plugin [role="button"],
.tasknotes-plugin .button,
.tasknotes-plugin .btn {
border: none;
box-shadow: none;
}
/* Hover states should also not have borders */
.tasknotes-plugin button:hover,
.tasknotes-plugin input[type="button"]:hover,
.tasknotes-plugin input[type="submit"]:hover,
.tasknotes-plugin input[type="reset"]:hover,
.tasknotes-plugin [role="button"]:hover,
.tasknotes-plugin .button:hover,
.tasknotes-plugin .btn:hover {
border: none;
box-shadow: none;
}
/* Focus states should not have borders either */
.tasknotes-plugin button:focus,
.tasknotes-plugin input[type="button"]:focus,
.tasknotes-plugin input[type="submit"]:focus,
.tasknotes-plugin input[type="reset"]:focus,
.tasknotes-plugin [role="button"]:focus,
.tasknotes-plugin .button:focus,
.tasknotes-plugin .btn:focus {
border: none;
box-shadow: none;
}
/* Base Button - All buttons inherit from this */
.tasknotes-plugin .tn-btn {
display: inline-flex;
@ -2093,21 +2129,29 @@
.tasknotes-plugin .tn-btn:hover {
background: var(--tn-interactive-hover);
border: none;
box-shadow: none;
}
.tasknotes-plugin .tn-btn:active {
opacity: 0.8;
border: none;
box-shadow: none;
}
.tasknotes-plugin .tn-btn:focus-visible {
outline: 2px solid var(--tn-interactive-accent);
outline-offset: 2px;
border: none;
box-shadow: none;
}
.tasknotes-plugin .tn-btn:disabled {
opacity: var(--cs-state-disabled);
cursor: not-allowed;
pointer-events: none;
border: none;
box-shadow: none;
}
/* Button Sizes */

View file

@ -256,7 +256,7 @@
/* Interactive States - Map to Obsidian theme variables */
--tn-interactive-normal: var(--interactive-normal);
--tn-interactive-hover: var(--interactive-hover);
--tn-interactive-hover: color-mix(in srgb, var(--tn-interactive-accent) 8%, transparent);
--tn-interactive-accent: var(--interactive-accent);
--tn-interactive-accent-hover: var(--interactive-accent-hover);
--tn-interactive-success: var(--interactive-success);