Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

feat(services): update toggle button design and improve accessibility

Tonho05fb09974f94
diff --git a/src/components/services/SupportedServices.svelte b/src/components/services/SupportedServices.svelte
index 6f5205fa..5deb857f 100644
--- a/src/components/services/SupportedServices.svelte
+++ b/src/components/services/SupportedServices.svelte
@@ -30,12 +30,10 @@
aria-expanded={expanded}
aria-label={expanded ? $t('services.title_hide') : $t('services.title_show')}
>
- <span class="icon-circle" class:expanded>
- <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
- <path d="M12 5v14M5 12h14" />
- </svg>
- </span>
<span class="toggle-label">{$t('services.title')}</span>
+ <svg class="toggle-chevron" class:expanded viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M6 9l6 6 6-6" />
+ </svg>
</button>
{#if expanded}
@@ -71,30 +69,24 @@
.toggle-btn {
display: flex;
align-items: center;
- gap: 9px;
- padding: 7px 13px 7px 10px;
- border-radius: 18px;
+ gap: 4px;
+ padding: 4px 8px;
+ border-radius: 8px;
background: none;
border: none;
color: var(--gray);
cursor: pointer;
- font-size: 12.5px;
- font-weight: 500;
+ font-size: 12px;
+ font-weight: 400;
user-select: none;
+ opacity: 0.7;
}
@media (hover: hover) {
.toggle-btn:hover {
+ opacity: 1;
color: var(--secondary);
}
-
- .toggle-btn:hover .icon-circle {
- background: var(--button-elevated-hover);
- }
- }
-
- .toggle-btn:active .icon-circle {
- background: var(--button-elevated-press);
}
.toggle-btn:focus-visible {
@@ -102,28 +94,17 @@
outline-offset: var(--focus-ring-offset);
}
- .icon-circle {
- width: 22px;
- height: 22px;
- display: flex;
- align-items: center;
- justify-content: center;
- background: var(--button-elevated);
- border-radius: 18px;
- flex-shrink: 0;
- transition: transform 0.2s cubic-bezier(0.53, 0.05, 0.02, 1.2);
- }
-
- .icon-circle.expanded {
- transform: rotate(45deg);
+ .toggle-label {
+ pointer-events: none;
}
- .icon-circle svg {
+ .toggle-chevron {
pointer-events: none;
+ transition: transform 0.15s ease;
}
- .toggle-label {
- pointer-events: none;
+ .toggle-chevron.expanded {
+ transform: rotate(180deg);
}
.popover {
@@ -206,7 +187,7 @@
animation: none;
}
- .icon-circle {
+ .toggle-chevron {
transition: none;
}
}