From e133c03409e3ce112e98edf3216fe469c9b25397 Mon Sep 17 00:00:00 2001 From: johannes-hernehult Date: Wed, 10 Jun 2026 19:56:05 +0200 Subject: [PATCH] refactor: reorganizing the App.css styles --- src/styles/App.css | 59 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/src/styles/App.css b/src/styles/App.css index aec3698..d762487 100644 --- a/src/styles/App.css +++ b/src/styles/App.css @@ -1,17 +1,36 @@ -html { - font-family: Arial, sans-serif; +/* ─── Design Tokens ─────────────────────────────────── */ +:root { + --color-border: #ccc; + --color-bg-sidebar: #eee; + --sidebar-width: 250px; + --gap-nav: 1rem; } +/* ─── Base ───────────────────────────────────────────── */ +html, +body { + font-family: system-ui, Arial, sans-serif; +} + +/* ─── Layout ─────────────────────────────────────────── */ #root { - min-height: 100vh; display: flex; + min-height: 100vh; +} + +.app-body { + display: flex; + flex: 1; } header { - flex-basis: 250px; + flex: 0 0 var(--sidebar-width); padding: 1rem; - border-right: 3px solid #ccc; - background-color: #eee; + display: flex; + flex-direction: column; + gap: var(--gap-nav); + border-right: 3px solid var(--color-border); + background-color: var(--color-bg-sidebar); } main { @@ -20,16 +39,31 @@ main { } footer { - padding-block: 0.5rem; position: absolute; bottom: 0; left: 0; right: 0; - - display: flex; - justify-content: center; + margin: 0 auto; + padding-block: 0.5rem; + text-align: center; } +/* ─── Navigation ─────────────────────────────────────── */ +nav { + display: flex; + flex-direction: column; + gap: var(--gap-nav); +} + +ul { + padding: 0; + display: flex; + flex-direction: column; + gap: 0.125rem; + list-style: none; +} + +/* ─── Form & Interactive Elements ────────────────────── */ a, input, button, @@ -39,8 +73,3 @@ textarea { font-size: inherit; color: inherit; } - -ul { - list-style: none; - padding: 0; -}