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.
This commit is contained in:
yetone
2026-10-13 20:39:39 +08:00
parent 2dcc51417e
commit 2f2760dc51
2 changed files with 6 additions and 3 deletions
+5 -3
View File
@@ -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); }
+1
View File
@@ -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);
}