Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio Train: clearer selected tabs, toggles and target modules in dark mode (#14451)
Michael Han2aeeceb07e7f
diff --git a/studio/frontend/src/features/hub/hub.css b/studio/frontend/src/features/hub/hub.cssindex b3b979c05b7..7867a8d5854 100644--- a/studio/frontend/src/features/hub/hub.css+++ b/studio/frontend/src/features/hub/hub.css@@ -834,6 +834,16 @@background-color: var(--accent);}+ /* The Train page's cards sit a step from --accent, so its tabs and toggles take the picker's+ treatment below: the pill lifts toward white and the track sinks below the card. */+ html.dark .elevated-card {+ --hub-tab-track: color-mix(in srgb, var(--background) 55%, transparent);+ }+ html.dark .elevated-card .hub-tab-toggle-pill,+ html.dark .elevated-card .hub-tab-toggle-pill:hover {+ background-color: color-mix(in srgb, var(--accent), white 7.5%);+ }+/* The picker's panel is --sidebar, a step from --accent: its controls lift toward white to stand off it. */html.dark .unsloth-model-selector-menu {--picker-control-lit: color-mix(in srgb, var(--accent), white 7.5%);diff --git a/studio/frontend/src/features/studio/sections/params-section-styles.ts b/studio/frontend/src/features/studio/sections/params-section-styles.tsindex 25e45ea8722..1676562e8bb 100644--- a/studio/frontend/src/features/studio/sections/params-section-styles.ts+++ b/studio/frontend/src/features/studio/sections/params-section-styles.ts@@ -5,6 +5,6 @@* transparent so box size matches across themes. */export function selectableOptionStateClassName(selected: boolean): string {return selected- ? "border-ring-strong/50 bg-primary/5 dark:border-transparent dark:bg-emerald-200/10"+ ? "border-ring-strong/50 bg-primary/5 dark:border-transparent dark:bg-[color-mix(in_srgb,var(--foreground)_16%,transparent)]": "border-border/50 bg-muted/40 hover:border-[color-mix(in_oklab,var(--foreground)_calc(20%*var(--contrast-edge-gain,1)),transparent)] hover:bg-muted/60 dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.05*var(--contrast-wash-gain,1)))] dark:hover:bg-[rgb(255_255_255_/_calc(0.09*var(--contrast-wash-gain,1)))]";}diff --git a/studio/frontend/tests/train-dark-selection-contrast.test.ts b/studio/frontend/tests/train-dark-selection-contrast.test.tsnew file mode 100644index 00000000000..f105fa107ef--- /dev/null+++ b/studio/frontend/tests/train-dark-selection-contrast.test.ts@@ -0,0 +1,33 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++import assert from "node:assert/strict";+import test from "node:test";++import { selectableOptionStateClassName } from "../src/features/studio/sections/params-section-styles.ts";+import { readSrc } from "./helpers/kit.ts";++test("a selected target module or LoRA option is a lighter grey in dark mode, not green", () => {+ const selected = selectableOptionStateClassName(true);+ assert.doesNotMatch(selected, /emerald/);+ assert.match(+ selected,+ /dark:bg-\[color-mix\(in_srgb,var\(--foreground\)_16%,transparent\)\]/,+ );+ assert.match(+ selectableOptionStateClassName(false),+ /dark:bg-\[rgb\(255_255_255_\/_calc\(0\.05/,+ );+});++test("Train cards sink the toggle track and lift the selected pill in dark mode", () => {+ const css = readSrc("features/hub/hub.css");+ assert.match(+ css,+ /html\.dark \.elevated-card \{\s*--hub-tab-track: color-mix\(in srgb, var\(--background\) 55%, transparent\);/,+ );+ assert.match(+ css,+ /html\.dark \.elevated-card \.hub-tab-toggle-pill,\s*html\.dark \.elevated-card \.hub-tab-toggle-pill:hover \{\s*background-color: color-mix\(in srgb, var\(--accent\), white 7\.5%\);/,+ );+});