diff options
| author | Filip Wandzio <contact@philw.dev> | 2025-09-08 19:20:16 +0200 |
|---|---|---|
| committer | Filip Wandzio <contact@philw.dev> | 2025-09-08 19:20:16 +0200 |
| commit | fcc7a9157c2c63e86bb6e93558a3a228ff8faa3f (patch) | |
| tree | 0c0fd22a4b8d1fb2c85e9815510f806c73fc839e /src/app.css | |
| parent | 74eea9c13a4bd9846fd82bbaae841322cf5650fc (diff) | |
| download | philw.dev-fcc7a9157c2c63e86bb6e93558a3a228ff8faa3f.tar.gz philw.dev-fcc7a9157c2c63e86bb6e93558a3a228ff8faa3f.zip | |
Rewrite whole project in svelte for better accessibility
Signed-off-by: Filip Wandzio <contact@philw.dev>
Diffstat (limited to 'src/app.css')
| -rw-r--r-- | src/app.css | 188 |
1 files changed, 188 insertions, 0 deletions
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 @@ | |||
| 1 | * { | ||
| 2 | box-sizing: border-box; | ||
| 3 | } | ||
| 4 | |||
| 5 | :root { | ||
| 6 | --bg-color: #fcfdfe; | ||
| 7 | --text-color: #000c18; | ||
| 8 | --accent-color: #22aa44; | ||
| 9 | --accent-hover: #9966b8; | ||
| 10 | } | ||
| 11 | |||
| 12 | @media (prefers-color-scheme: dark) { | ||
| 13 | :root { | ||
| 14 | --bg-color: #000c18; | ||
| 15 | --text-color: #b7b8b9; | ||
| 16 | } | ||
| 17 | } | ||
| 18 | |||
| 19 | body { | ||
| 20 | margin: 0; | ||
| 21 | font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, | ||
| 22 | Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | ||
| 23 | font-size: 1.125rem; | ||
| 24 | line-height: 1.8; | ||
| 25 | background: var(--bg-color); | ||
| 26 | color: var(--text-color); | ||
| 27 | display: flex; | ||
| 28 | flex-direction: column; | ||
| 29 | min-height: 100vh; | ||
| 30 | overflow-x: hidden; | ||
| 31 | } | ||
| 32 | |||
| 33 | h1 { | ||
| 34 | font-size: 1.75rem; | ||
| 35 | } | ||
| 36 | |||
| 37 | h2 { | ||
| 38 | margin: 0 0 0.75em; | ||
| 39 | font-weight: 700; | ||
| 40 | line-height: 1.3; | ||
| 41 | font-size: 2rem; | ||
| 42 | } | ||
| 43 | |||
| 44 | @media (max-width: 768px) { | ||
| 45 | h1 { | ||
| 46 | font-size: 1.75rem; | ||
| 47 | } | ||
| 48 | |||
| 49 | h2 { | ||
| 50 | font-size: 1.75rem; | ||
| 51 | } | ||
| 52 | } | ||
| 53 | |||
| 54 | header, | ||
| 55 | footer { | ||
| 56 | padding: 0.5em; | ||
| 57 | text-align: center; | ||
| 58 | background: var(--bg-color); | ||
| 59 | } | ||
| 60 | |||
| 61 | header h1 { | ||
| 62 | font-size: 1.75rem; | ||
| 63 | padding-left: 1rem; | ||
| 64 | } | ||
| 65 | |||
| 66 | main { | ||
| 67 | flex-grow: 1; | ||
| 68 | max-width: 900px; | ||
| 69 | margin: 0 auto; | ||
| 70 | padding: 2em; | ||
| 71 | } | ||
| 72 | |||
| 73 | @media (max-width: 768px) { | ||
| 74 | main { | ||
| 75 | padding: 1.5em; | ||
| 76 | } | ||
| 77 | } | ||
| 78 | |||
| 79 | footer { | ||
| 80 | text-align: center; | ||
| 81 | font-size: 1.05rem; | ||
| 82 | color: var(--text-color); | ||
| 83 | } | ||
| 84 | |||
| 85 | section { | ||
| 86 | margin-bottom: 3em; | ||
| 87 | padding: 0 2%; | ||
| 88 | } | ||
| 89 | |||
| 90 | .header-top { | ||
| 91 | display: flex; | ||
| 92 | justify-content: center; | ||
| 93 | align-items: center; | ||
| 94 | gap: 2rem; | ||
| 95 | } | ||
| 96 | |||
| 97 | @media (max-width: 768px) { | ||
| 98 | .header-top { | ||
| 99 | justify-content: space-between; | ||
| 100 | text-align: left; | ||
| 101 | } | ||
| 102 | } | ||
| 103 | |||
| 104 | nav ul { | ||
| 105 | list-style: none; | ||
| 106 | margin: 0; | ||
| 107 | padding: 0; | ||
| 108 | display: flex; | ||
| 109 | gap: 2rem; | ||
| 110 | justify-content: center; | ||
| 111 | flex-wrap: wrap; | ||
| 112 | } | ||
| 113 | |||
| 114 | nav a { | ||
| 115 | font-weight: 600; | ||
| 116 | font-size: 1.125rem; | ||
| 117 | } | ||
| 118 | |||
| 119 | .menu-toggle { | ||
| 120 | display: none; | ||
| 121 | background: none; | ||
| 122 | border: 0; | ||
| 123 | font-size: 1.75rem; | ||
| 124 | cursor: pointer; | ||
| 125 | color: var(--text-color); | ||
| 126 | } | ||
| 127 | |||
| 128 | @media (max-width: 768px) { | ||
| 129 | .menu-toggle { | ||
| 130 | display: block; | ||
| 131 | } | ||
| 132 | |||
| 133 | nav ul { | ||
| 134 | flex-direction: column; | ||
| 135 | align-items: center; | ||
| 136 | gap: 1.25rem; | ||
| 137 | display: none; | ||
| 138 | } | ||
| 139 | |||
| 140 | nav ul.open { | ||
| 141 | display: flex; | ||
| 142 | } | ||
| 143 | |||
| 144 | header { | ||
| 145 | position: sticky; | ||
| 146 | top: 0; | ||
| 147 | z-index: 1000; | ||
| 148 | background: var(--bg-color); | ||
| 149 | } | ||
| 150 | } | ||
| 151 | |||
| 152 | .sr-only { | ||
| 153 | position: absolute; | ||
| 154 | width: 1px; | ||
| 155 | height: 1px; | ||
| 156 | margin: -1px; | ||
| 157 | padding: 0; | ||
| 158 | overflow: hidden; | ||
| 159 | clip: rect(0 0 0 0); | ||
| 160 | border: 0; | ||
| 161 | } | ||
| 162 | |||
| 163 | a { | ||
| 164 | color: var(--accent-color); | ||
| 165 | font-weight: 700; | ||
| 166 | text-decoration: underline; | ||
| 167 | text-decoration-color: transparent; | ||
| 168 | text-underline-offset: 4px; | ||
| 169 | text-decoration-thickness: 2px; | ||
| 170 | transition: color 0.3s, text-decoration-color 0.3s; | ||
| 171 | } | ||
| 172 | |||
| 173 | a:hover, | ||
| 174 | a:focus { | ||
| 175 | color: var(--accent-hover); | ||
| 176 | text-decoration-color: currentColor; | ||
| 177 | } | ||
| 178 | |||
| 179 | a:focus-visible { | ||
| 180 | outline: 3px solid var(--accent-color); | ||
| 181 | outline-offset: 4px; | ||
| 182 | border-radius: 3px; | ||
| 183 | } | ||
| 184 | |||
| 185 | .highlight { | ||
| 186 | background: var(--accent-hover); | ||
| 187 | color: #fcfdfe; | ||
| 188 | } | ||
