aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFilip Wandzio <contact@philw.dev>2025-10-02 02:30:04 +0200
committerFilip Wandzio <contact@philw.dev>2025-10-02 02:30:04 +0200
commita30232f3ec4ce4531a6eb3dd5f9bc8e6d4667b26 (patch)
tree59b9bc520b7f896f6500993aac53f82326811bf7 /src
parente223117ba126710e2b5c96318dd77329c3220092 (diff)
downloadphilw.dev-a30232f3ec4ce4531a6eb3dd5f9bc8e6d4667b26.tar.gz
philw.dev-a30232f3ec4ce4531a6eb3dd5f9bc8e6d4667b26.zip
Optimize the style, enable webkit overflow rules, reduce margins to fix text placement
Diffstat (limited to 'src')
-rw-r--r--src/app.css92
1 files changed, 51 insertions, 41 deletions
diff --git a/src/app.css b/src/app.css
index f99121b..6334a7a 100644
--- a/src/app.css
+++ b/src/app.css
@@ -16,15 +16,27 @@
16 } 16 }
17} 17}
18 18
19.sr-only { 19body {
20 position: absolute; 20 margin: 0;
21 width: 1px; 21 font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
22 height: 1px; 22 Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
23 margin: -1px; 23 font-size: 1.125rem;
24 padding: 0; 24 line-height: 1.8;
25 overflow: hidden; 25 background: var(--bg-color);
26 clip: rect(0 0 0 0); 26 color: var(--text-color);
27 border: 0; 27 display: flex;
28 flex-direction: column;
29 min-height: 100vh;
30 overflow: auto;
31
32 /* Hide scrollbar, preserve scroll */
33 -ms-overflow-style: none; /* IE/Edge */
34 scrollbar-width: none; /* Firefox */
35}
36
37body::-webkit-scrollbar {
38 width: 0;
39 height: 0;
28} 40}
29 41
30a { 42a {
@@ -32,8 +44,8 @@ a {
32 font-weight: 700; 44 font-weight: 700;
33 text-decoration: underline; 45 text-decoration: underline;
34 text-decoration-color: transparent; 46 text-decoration-color: transparent;
35 text-underline-offset: 4px; 47 text-underline-offset: 0.25em;
36 text-decoration-thickness: 2px; 48 text-decoration-thickness: 0.125em;
37 transition: color 0.3s, text-decoration-color 0.3s; 49 transition: color 0.3s, text-decoration-color 0.3s;
38} 50}
39 51
@@ -44,9 +56,20 @@ a:focus {
44} 56}
45 57
46a:focus-visible { 58a:focus-visible {
47 outline: 3px solid var(--accent-color); 59 outline: 0.2rem solid var(--accent-color);
48 outline-offset: 4px; 60 outline-offset: 0.25rem;
49 border-radius: 3px; 61 border-radius: 0.2rem;
62}
63
64.sr-only {
65 position: absolute;
66 width: 0.0625rem;
67 height: 0.0625rem;
68 margin: -0.0625rem;
69 padding: 0;
70 overflow: hidden;
71 clip: rect(0 0 0 0);
72 border: 0;
50} 73}
51 74
52.highlight { 75.highlight {
@@ -54,20 +77,6 @@ a:focus-visible {
54 color: #fcfdfe; 77 color: #fcfdfe;
55} 78}
56 79
57body {
58 margin: 0;
59 font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
60 Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
61 font-size: 1.125rem;
62 line-height: 1.8;
63 background: var(--bg-color);
64 color: var(--text-color);
65 display: flex;
66 flex-direction: column;
67 min-height: 100vh;
68 overflow-x: hidden;
69}
70
71h1 { 80h1 {
72 font-size: 1.75rem; 81 font-size: 1.75rem;
73} 82}
@@ -79,17 +88,12 @@ h2 {
79 font-size: 2rem; 88 font-size: 2rem;
80} 89}
81 90
82@media (max-width: 768px) { 91@media (max-width: 48em) {
83 h1, h2 { 92 h1, h2 {
84 font-size: 1.75rem; 93 font-size: 1.75rem;
85 } 94 }
86} 95}
87 96
88section {
89 margin-bottom: 3em;
90 padding: 0 2%;
91}
92
93header { 97header {
94 padding: 0.5em; 98 padding: 0.5em;
95 text-align: center; 99 text-align: center;
@@ -108,7 +112,7 @@ header h1 {
108 gap: 2rem; 112 gap: 2rem;
109} 113}
110 114
111@media (max-width: 768px) { 115@media (max-width: 48em) {
112 .header-top { 116 .header-top {
113 justify-content: space-between; 117 justify-content: space-between;
114 text-align: left; 118 text-align: left;
@@ -146,7 +150,7 @@ nav a {
146 color: var(--text-color); 150 color: var(--text-color);
147} 151}
148 152
149@media (max-width: 768px) { 153@media (max-width: 48em) {
150 .menu-toggle { 154 .menu-toggle {
151 display: block; 155 display: block;
152 } 156 }
@@ -165,17 +169,23 @@ nav a {
165 169
166main { 170main {
167 flex-grow: 1; 171 flex-grow: 1;
168 max-width: 900px; 172 width: 100%;
169 margin: 0 auto; 173 max-width: none;
170 padding: 2em; 174 margin: 0;
175 padding: 1em;
171} 176}
172 177
173@media (max-width: 768px) { 178@media (max-width: 48em) {
174 main { 179 main {
175 padding: 1.5em; 180 padding: 1em;
176 } 181 }
177} 182}
178 183
184section {
185 margin-bottom: 2em;
186 padding: 0 2%;
187}
188
179footer { 189footer {
180 padding: 0.5em; 190 padding: 0.5em;
181 text-align: center; 191 text-align: center;