From 9499b870033a1c2c3b32f7f9b8cd0dfc64faf920 Mon Sep 17 00:00:00 2001 From: SameDesu123 <47582414+SameDesu123@users.noreply.github.com> Date: Fri, 2 Oct 2026 15:57:06 +0900 Subject: [PATCH] fix: keep select text from clipping in Safari WebKit renders native diff --git a/src/lib/Others/PopupEditor.svelte b/src/lib/Others/PopupEditor.svelte index 3625e24439..7de4c49e6e 100644 --- a/src/lib/Others/PopupEditor.svelte +++ b/src/lib/Others/PopupEditor.svelte @@ -64,7 +64,7 @@ {#if !previewing} DBState.db.translatorPresetId, (value) => { DBState.db.translatorPresetId = Number(value); syncCurrentTranslatorPreset(); diff --git a/src/lib/Setting/Pages/OtherBotSettings.svelte b/src/lib/Setting/Pages/OtherBotSettings.svelte index f7964390ba..7accda11e0 100644 --- a/src/lib/Setting/Pages/OtherBotSettings.svelte +++ b/src/lib/Setting/Pages/OtherBotSettings.svelte @@ -1056,7 +1056,7 @@ {:else if DBState.db.hypaV3} {language.hypaV3Settings.descriptionLabel} Preset - with a fixed-height + menulist that ignores our padding, so the selected text gets clipped. + Drop the native appearance and draw the chevron ourselves in currentColor + so it follows the active color scheme. +*/ +.risu-select { + -webkit-appearance: none; + appearance: none; + padding-right: 2.25rem; + background-image: + linear-gradient(45deg, transparent 50%, currentColor 50%), + linear-gradient(135deg, currentColor 50%, transparent 50%); + background-position: + calc(100% - 1.125rem) 50%, + calc(100% - 0.8125rem) 50%; + background-size: 0.3125rem 0.3125rem; + background-repeat: no-repeat; +} + +/* Forced-colors mode strips background images, which would leave no arrow. */ +@media (forced-colors: active) { + .risu-select { + -webkit-appearance: auto; + appearance: auto; + background-image: none; + } +}