Skip to content

Commit aa5edd9

Browse files
author
LinuxJava7
committed
make website better on bigger screens, make less use of margins, and use gaps instead, and simplify small width design
1 parent b47367c commit aa5edd9

File tree

1 file changed

+29
-35
lines changed

1 file changed

+29
-35
lines changed

style.css

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/* Root Variables - Light Mode (Default) */
55
:root {
66
/* Layout Variables */
7-
--content-width: 50rem;
7+
--content-width: 60rem;
88
--spacing: 3rem;
99
--content-max-width: var(--content-width);
1010
--narrow-width: 60%;
@@ -53,11 +53,14 @@ html, body {
5353
}
5454

5555
body {
56+
margin: 0;
57+
padding: 0;
5658
background: var(--window-bg-color);
5759
color: var(--window-fg-color);
5860
display: flex;
5961
flex-direction: column;
6062
min-height: 100vh;
63+
gap: 1rem;
6164
}
6265

6366
/* Typography */
@@ -85,19 +88,18 @@ h2:first-child {
8588
}
8689

8790
h2 {
88-
font-size: 1.75em;
91+
font-size: 1.6em;
8992
}
9093

9194
h3 {
92-
font-size: 1.45em;
95+
font-size: 1.4em;
9396
}
9497

9598
h4 {
96-
font-size: 1.20em;
99+
font-size: 1.2em;
97100
}
98101

99102
.note {
100-
margin: 1.5rem 0;
101103
padding: 1rem 1.5rem;
102104
background-color: var(--card-bg-color);
103105
border-radius: var(--rounded-corner);
@@ -140,31 +142,30 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
140142

141143
/* Layout */
142144
.container {
143-
margin: 2rem 0 0;
144-
flex: 1;
145145
display: flex;
146146
flex-direction: column;
147147
align-items: center;
148-
max-width: var(--max-width);
149-
margin-left: auto;
150-
margin-right: auto;
148+
width: 100%;
149+
max-width: var(--content-width);
151150
padding: 0 var(--spacing);
151+
box-sizing: border-box;
152+
margin: 0 auto;
153+
gap: 0.5rem;
152154
}
153155

154156
.container > * {
155157
width: 100%;
156-
max-width: var(--content-width);
157158
}
158159

159160
/* Cards */
160161
.cards {
161162
display: flex;
162163
flex-wrap: wrap;
163164
gap: var(--spacing);
164-
padding: var(--spacing);
165165
justify-content: center;
166-
align-content: center;
167-
transition: all 300ms var(--slickease);
166+
align-content: flex-start;
167+
width: 100%;
168+
box-sizing: border-box;
168169
}
169170

170171
.cards:has(> :only-child) {
@@ -305,7 +306,7 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
305306
display: none;
306307
justify-content: center;
307308
align-items: center;
308-
height: 3.3rem;
309+
height: 3.75rem;
309310
width: 100%;
310311
position: fixed;
311312
bottom: 0;
@@ -333,8 +334,9 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
333334
list-style: none;
334335
margin: 0;
335336
padding: 0;
336-
gap: 0.25rem;
337+
gap: 0.5rem;
337338
width: 100%;
339+
height: 100%;
338340
justify-content: center;
339341
align-items: center;
340342
align-content: center;
@@ -343,7 +345,8 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
343345
.view-switcher-narrow li {
344346
display: inline-block;
345347
width: 100%;
346-
max-width: 6.8rem;
348+
height: 100%;
349+
max-width: 5rem;
347350
}
348351

349352
.view-switcher-narrow a {
@@ -358,8 +361,9 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
358361
text-decoration: none;
359362
border-radius: 0.6rem;
360363
transition: background-color 0.2s ease, color 0.2s ease;
361-
gap: 0px;
362-
font-size: 0.8rem;
364+
gap: 0.1rem;
365+
font-size: 0.9rem;
366+
padding: 0.125rem;
363367
}
364368

365369
.view-switcher-narrow a:hover,
@@ -377,8 +381,6 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
377381
}
378382

379383
.view-switcher-narrow svg {
380-
width: 1.25em;
381-
height: auto;
382384
margin-top: 4px;
383385
}
384386

@@ -428,7 +430,7 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
428430
text-decoration: none;
429431
border-radius: 0.65rem;
430432
transition: background-color 0.2s ease, color 0.2s ease;
431-
gap: 6px;
433+
gap: 0.4rem;
432434
}
433435

434436
.view-switcher a:hover,
@@ -499,19 +501,6 @@ footer {
499501
padding-bottom: 5.5rem;
500502
}
501503

502-
.container {
503-
padding: 0 var(--spacing);
504-
}
505-
506-
.cards {
507-
padding: var(--spacing);
508-
gap: var(--spacing);
509-
}
510-
511-
.card {
512-
min-width: 100%;
513-
}
514-
515504
.card .description {
516505
padding: 1rem;
517506
}
@@ -539,4 +528,9 @@ footer {
539528
.social li {
540529
margin: 0;
541530
}
531+
532+
body {
533+
margin-top: 2rem;
534+
}
535+
542536
}

0 commit comments

Comments
 (0)