From fcc7a9157c2c63e86bb6e93558a3a228ff8faa3f Mon Sep 17 00:00:00 2001 From: Filip Wandzio Date: Mon, 8 Sep 2025 19:20:16 +0200 Subject: Rewrite whole project in svelte for better accessibility Signed-off-by: Filip Wandzio --- src/app.css | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 src/app.css (limited to 'src/app.css') diff --git a/src/app.css b/src/app.css new file mode 100644 index 0000000..829967c --- /dev/null +++ b/src/app.css @@ -0,0 +1,188 @@ +* { + box-sizing: border-box; +} + +:root { + --bg-color: #fcfdfe; + --text-color: #000c18; + --accent-color: #22aa44; + --accent-hover: #9966b8; +} + +@media (prefers-color-scheme: dark) { + :root { + --bg-color: #000c18; + --text-color: #b7b8b9; + } +} + +body { + margin: 0; + font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, + Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; + font-size: 1.125rem; + line-height: 1.8; + background: var(--bg-color); + color: var(--text-color); + display: flex; + flex-direction: column; + min-height: 100vh; + overflow-x: hidden; +} + +h1 { + font-size: 1.75rem; +} + +h2 { + margin: 0 0 0.75em; + font-weight: 700; + line-height: 1.3; + font-size: 2rem; +} + +@media (max-width: 768px) { + h1 { + font-size: 1.75rem; + } + + h2 { + font-size: 1.75rem; + } +} + +header, +footer { + padding: 0.5em; + text-align: center; + background: var(--bg-color); +} + +header h1 { + font-size: 1.75rem; + padding-left: 1rem; +} + +main { + flex-grow: 1; + max-width: 900px; + margin: 0 auto; + padding: 2em; +} + +@media (max-width: 768px) { + main { + padding: 1.5em; + } +} + +footer { + text-align: center; + font-size: 1.05rem; + color: var(--text-color); +} + +section { + margin-bottom: 3em; + padding: 0 2%; +} + +.header-top { + display: flex; + justify-content: center; + align-items: center; + gap: 2rem; +} + +@media (max-width: 768px) { + .header-top { + justify-content: space-between; + text-align: left; + } +} + +nav ul { + list-style: none; + margin: 0; + padding: 0; + display: flex; + gap: 2rem; + justify-content: center; + flex-wrap: wrap; +} + +nav a { + font-weight: 600; + font-size: 1.125rem; +} + +.menu-toggle { + display: none; + background: none; + border: 0; + font-size: 1.75rem; + cursor: pointer; + color: var(--text-color); +} + +@media (max-width: 768px) { + .menu-toggle { + display: block; + } + + nav ul { + flex-direction: column; + align-items: center; + gap: 1.25rem; + display: none; + } + + nav ul.open { + display: flex; + } + + header { + position: sticky; + top: 0; + z-index: 1000; + background: var(--bg-color); + } +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + margin: -1px; + padding: 0; + overflow: hidden; + clip: rect(0 0 0 0); + border: 0; +} + +a { + color: var(--accent-color); + font-weight: 700; + text-decoration: underline; + text-decoration-color: transparent; + text-underline-offset: 4px; + text-decoration-thickness: 2px; + transition: color 0.3s, text-decoration-color 0.3s; +} + +a:hover, +a:focus { + color: var(--accent-hover); + text-decoration-color: currentColor; +} + +a:focus-visible { + outline: 3px solid var(--accent-color); + outline-offset: 4px; + border-radius: 3px; +} + +.highlight { + background: var(--accent-hover); + color: #fcfdfe; +} -- cgit v1.2.3