mirror of
https://github.com/mudler/LocalAI.git
synced 2026-06-18 13:49:09 -04:00
feat(ui): un-overload accent — nav rail, stronger focus ring, neutral hover
Assisted-by: Claude:claude-opus-4-8 [Claude Code] Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
@@ -8,4 +8,13 @@ test.describe('Editorial design system', () => {
|
||||
const family = await title.evaluate(el => getComputedStyle(el).fontFamily)
|
||||
expect(family.toLowerCase()).toContain('fraunces')
|
||||
})
|
||||
|
||||
test('active nav item shows a left accent rail (box-shadow), not just a tint', async ({ page }) => {
|
||||
await page.goto('/app/settings')
|
||||
await expect(page.locator('.page-title').first()).toBeVisible({ timeout: 15_000 })
|
||||
const active = page.locator('.sidebar-nav .nav-item.active').first()
|
||||
await expect(active).toBeVisible()
|
||||
const shadow = await active.evaluate(el => getComputedStyle(el).boxShadow)
|
||||
expect(shadow).not.toBe('none')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -352,9 +352,10 @@
|
||||
border-radius: var(--radius-lg);
|
||||
}
|
||||
.sidebar-nav .nav-item.active {
|
||||
background: var(--color-primary-light);
|
||||
color: var(--color-primary);
|
||||
box-shadow: none;
|
||||
background: var(--color-surface-hover);
|
||||
color: var(--color-text-primary);
|
||||
font-weight: var(--font-weight-medium);
|
||||
box-shadow: inset 3px 0 0 var(--color-nav-rail);
|
||||
}
|
||||
.sidebar-nav .nav-item.active .nav-icon { color: var(--color-primary); }
|
||||
/* Align tier labels with the inset item text (item margin + icon padding). */
|
||||
@@ -1624,6 +1625,13 @@
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
/* Solid outline fallback so the focus ring stays AA-visible (>=3:1) on every
|
||||
interactive element, including those that clip or override box-shadow. */
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--color-focus-ring);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--color-primary);
|
||||
color: var(--color-primary-text);
|
||||
@@ -2390,7 +2398,7 @@ select.input {
|
||||
}
|
||||
|
||||
.table tr:hover td {
|
||||
background: var(--color-primary-light);
|
||||
background: var(--color-surface-hover);
|
||||
}
|
||||
|
||||
/* Toggle switch */
|
||||
|
||||
@@ -64,7 +64,9 @@
|
||||
|
||||
--color-modal-backdrop: rgba(8, 11, 17, 0.68);
|
||||
|
||||
--color-focus-ring: rgba(136, 192, 208, 0.34);
|
||||
--color-focus-ring: rgba(136, 192, 208, 0.7); /* was 0.34 - AA-visible */
|
||||
--color-nav-rail: var(--color-primary);
|
||||
--color-eyebrow: #d8b48c; /* muted Nord-aurora brass for editorial eyebrows */
|
||||
|
||||
/* Data viz — full aurora + frost palette */
|
||||
--color-data-1: #88c0d0; /* frost cyan */
|
||||
@@ -219,7 +221,9 @@
|
||||
|
||||
--color-modal-backdrop: rgba(46, 52, 64, 0.38);
|
||||
|
||||
--color-focus-ring: rgba(94, 129, 172, 0.34);
|
||||
--color-focus-ring: rgba(94, 129, 172, 0.6); /* was 0.34 */
|
||||
--color-nav-rail: var(--color-primary);
|
||||
--color-eyebrow: #9a6b3f; /* darker brass for contrast on snow storm */
|
||||
|
||||
/* Data viz — muted aurora for light mode */
|
||||
--color-data-1: #5e81ac;
|
||||
|
||||
Reference in New Issue
Block a user