From 663a69341aa9660031265bc2cf7d3b303327816d Mon Sep 17 00:00:00 2001 From: bboysoul Date: Tue, 8 Sep 2026 09:58:43 +0800 Subject: [PATCH] fix: strike through completed habits --- frontend/src/style.css | 2 +- frontend/src/style.test.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/style.css b/frontend/src/style.css index 9bc833e..59fce3e 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -19,7 +19,7 @@ main{min-width:0;padding:27px 34px 50px;overflow:auto;background:linear-gradient .habit-main{flex:1;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:10px;border:0;background:transparent;padding:13px 4px;text-align:left;border-radius:10px} .habit-name{font-size:15px;font-weight:700;color:#3c372f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .habit-main>span:first-child{display:grid;gap:3px}.habit-main small{font-size:11px;color:var(--muted)} -.habit-row.done .habit-name{color:var(--accent)} +.habit-row.done .habit-name{color:var(--accent);text-decoration:line-through;text-decoration-thickness:1.5px;text-decoration-color:#b99a89} .habit-row .icon.ghost{color:#b3a795;margin-left:4px} .habit-row .icon.ghost:hover{color:var(--danger)} .numeric-habit>span:first-child{display:grid;gap:3px}.numeric-habit small{font-size:11px;color:var(--muted)} diff --git a/frontend/src/style.test.ts b/frontend/src/style.test.ts index 2292ab2..486d6c4 100644 --- a/frontend/src/style.test.ts +++ b/frontend/src/style.test.ts @@ -159,6 +159,10 @@ describe('task and habit row decoration', () => { expect(css).toContain('.password-form{width:100%;display:grid;gap:10px}') }) + it('strikes through completed habit names', () => { + expect(css).toContain('.habit-row.done .habit-name{color:var(--accent);text-decoration:line-through') + }) + it('keeps habit cards borderless so the rounded left edge has no visual gap', () => { expect(css).toMatch(/\.habit-row\{border:0;/) expect(css).not.toMatch(/\.habit-row\{[^}]*border-top:/)