From 21e5b31471c85ffdd1db8aa95e5818aea65fd68f Mon Sep 17 00:00:00 2001 From: Nik Afiq Date: Wed, 5 Nov 2025 15:48:12 +0900 Subject: [PATCH] Centered burger menu --- frontend/src/App.tsx | 8 ++++++-- frontend/src/index.css | 36 ++++++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 0f75c08..e243be1 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -22,8 +22,12 @@ export default function App() {
{/* Top-left header (outside the card) */}
- Watch Party
diff --git a/frontend/src/index.css b/frontend/src/index.css index 0530a0e..fba08e6 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -28,11 +28,29 @@ html, body, #root { display:flex; align-items:center; justify-content:space-between; margin-bottom: 12px; } -.burger { - font-size:20px; line-height:1; padding:6px 10px; border-radius:8px; - background: rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.15); - color: var(--text); cursor:pointer; +/* Button container */ +.burger{ + display:grid; /* centers SVG */ + place-items:center; + width:40px; height:40px; /* good touch target */ + padding:0; line-height:0; /* no baseline artifacts */ + border-radius:12px; + color:var(--text); + background:rgba(255,255,255,.08); + border:1px solid rgba(255,255,255,.15); + cursor:pointer; } + +/* SVG itself */ +.burger-icon{ + display:block; + shape-rendering:geometricPrecision; +} + +/* polish */ +.burger:hover{ background:rgba(255,255,255,.12); } +.burger:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; } + .brand { color: var(--text); text-decoration:none; font-weight:800; } .drawer { position:absolute; left:16px; top:56px; display:flex; flex-direction:column; @@ -159,16 +177,6 @@ kbd { height: var(--header-h); } -.burger { - font-size: 20px; - line-height: 1; - padding: 8px 10px; - border-radius: 10px; - color: var(--text); - background: rgba(255,255,255,0.08); - border: 1px solid rgba(255,255,255,0.15); - cursor: pointer; -} .brand { font-weight: 900; color: var(--text);