From 2f2760dc5118fc3272bf416f5729fbdb74ebe31f Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 13 Oct 2026 18:57:55 +0800 Subject: [PATCH] gui: a side model's Thinking chip gives way by a class, not :has(), which Safari 15.0 can't parse dc2f0da82 laid out Image recognition's and the searcher's model chip beside their Thinking chip with `.prefs .val:has(> .side-effort)`. Safari before 15.4 drops the whole rule, and old-webkit.test.cjs's "the styles hold up in Safari 15.0" has been red on main since (seen on 71f796069 and a75de4c21). sideEffortChip now marks its row's value `with-effort`, and the rules key on that, as usage-cost's no-sum does. Run: old-webkit.test.cjs (6/6) and side-effort.test.cjs (Chromium and WebKit, every language, 10/10). With the with-effort rule removed by hand side-effort goes red in all 10. --- internal/gui/assets/app.css | 8 +++++--- internal/gui/assets/app.js | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/gui/assets/app.css b/internal/gui/assets/app.css index cf7b211e5..9bb1dc3a7 100644 --- a/internal/gui/assets/app.css +++ b/internal/gui/assets/app.css @@ -3087,9 +3087,11 @@ input.words.search-key, input.words.search-url { flex: 1 1 120px; width: auto; m .prefs .val { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; min-width: 0; max-width: 60%; flex: none; } .prefs .val code { font-size: 12px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text; -webkit-user-select: text; padding: 0 6px; } .prefs .val .text { padding: 3px 6px; } -/* how hard a side model thinks, beside it: the model's chip gives way first (MOMO on Discord) */ -.prefs .val:has(> .side-effort) { gap: 6px; } -.prefs .val:has(> .side-effort) > .rt-cond:not(.side-effort) { min-width: 0; flex: 0 1 auto; } +/* how hard a side model thinks, beside it: the model's chip gives way first + (MOMO on Discord); with-effort is a class sideEffortChip sets, not :has(), + which Safari before 15.4 can't parse */ +.prefs .val.with-effort { gap: 6px; } +.prefs .val.with-effort > .rt-cond:not(.side-effort) { min-width: 0; flex: 0 1 auto; } .prefs .val > .side-effort { flex: none; } .side-effort .effort-ic svg { width: 100%; height: 100%; } .row.pref.lan-address-row { position: relative; height: 50px; transition: height .28s var(--ease); } diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js index 9e9ae1b66..71e020a74 100644 --- a/internal/gui/assets/app.js +++ b/internal/gui/assets/app.js @@ -22372,6 +22372,7 @@ function sideEffortChip(val, levels, saved, now, cls, dflt, save) { openProtoMenu(b, [{ v: "", name: "Default", note: dflt }, ...levels.map((l) => ({ v: l, name: l, note: "" }))], shown, (e) => { if (e !== saved) save(e); }, "Thinking", "side-effort-menu", "right"); }; + val.classList.add("with-effort"); val.append(b); }