fix: move clear filter button from muscle diagram to filter pills area
All checks were successful
CI / update (push) Successful in 3m30s

This commit is contained in:
2026-04-06 21:30:22 +02:00
parent dd526ead0f
commit d21162c10c
3 changed files with 16 additions and 23 deletions

View File

@@ -127,10 +127,6 @@
</div>
{#if hoveredLabel && hoveredSide === 'front'}
<div class="hover-label">{hoveredLabel}</div>
{:else if selectedGroups.length > 0}
<button class="clear-btn" onclick={() => selectedGroups = []}>
{isEn ? 'Clear' : 'Zurücksetzen'}
</button>
{/if}
</div>
<div class="split-right">
@@ -161,10 +157,6 @@
{#if hoveredLabel}
<div class="hover-label">{hoveredLabel}</div>
{:else if selectedGroups.length > 0}
<button class="clear-btn" onclick={() => selectedGroups = []}>
{isEn ? 'Clear filter' : 'Filter zurücksetzen'}
</button>
{/if}
</div>
{/if}
@@ -228,20 +220,6 @@
text-align: center;
}
.clear-btn {
background: none;
border: none;
color: var(--color-primary);
font-size: 0.7rem;
font-weight: 600;
cursor: pointer;
padding: 0.2rem 0.5rem;
}
.clear-btn:hover {
text-decoration: underline;
}
/* Split mode: two independent columns for parent to position */
.muscle-filter-split {
display: contents;

View File

@@ -120,6 +120,9 @@
<span class="pill-remove" aria-hidden="true">×</span>
</button>
{/each}
<button class="clear-filters" onclick={() => { muscleGroups = []; equipmentFilters = []; }}>
{isEn ? 'Clear all' : 'Alle löschen'}
</button>
</div>
{/if}
@@ -257,6 +260,18 @@
font-weight: bold;
margin-left: 0.1rem;
}
.clear-filters {
all: unset;
font-size: 0.75rem;
font-weight: 600;
color: var(--color-text-secondary);
cursor: pointer;
padding: 0.25rem 0.4rem;
}
.clear-filters:hover {
color: var(--color-text-primary);
text-decoration: underline;
}
.exercise-list {
list-style: none;