From 038f75a57e18338e7ea713c71fc0074ffc0598ad Mon Sep 17 00:00:00 2001 From: bboysoul Date: Wed, 9 Sep 2026 08:38:57 +0800 Subject: [PATCH] test: guard liquid glass styling --- frontend/src/style.test.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frontend/src/style.test.ts b/frontend/src/style.test.ts index 1a94221..d3d9091 100644 --- a/frontend/src/style.test.ts +++ b/frontend/src/style.test.ts @@ -30,6 +30,24 @@ describe('mobile navigation styles', () => { }) }) +describe('warm Liquid Glass styling', () => { + it('uses shared warm glass and radius tokens with Safari support', () => { + expect(css).toContain('--radius-panel:28px') + expect(css).toContain('--glass-surface-strong:rgba(255,253,248,.84)') + expect(css).toContain('backdrop-filter:blur(26px) saturate(1.45) brightness(1.04)') + expect(css).toContain('-webkit-backdrop-filter:blur(26px) saturate(1.45) brightness(1.04)') + }) + + it('keeps list rows solid while floating the mobile navigation', () => { + expect(css).toContain('.bottom{left:12px;right:12px;bottom:max(10px,env(safe-area-inset-bottom));') + expect(css).toContain('.bottom button.active{background:rgba(241,90,41,.1)}') + expect(css).toContain('@media(max-width:930px){.task-row,.habit-row,.countdown-row{min-height:62px;background:#fff;') + expect(css).not.toMatch(/\.task-row\{[^}]*backdrop-filter/) + expect(css).not.toMatch(/\.habit-row\{[^}]*backdrop-filter/) + expect(css).not.toMatch(/\.countdown-row\{[^}]*backdrop-filter/) + }) +}) + describe('mobile sheet contract', () => { it('uses shared roles for details, creation and secondary actions', () => { expect(app).toContain('class="task-compose-mask app-sheet-mask"')