Skip to content

Commit ec712e8

Browse files
authored
Fix forum back button layout (#12)
1 parent 0d0105d commit ec712e8

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ function Forums({
349349
if (selectedForum) {
350350
return (
351351
<div className="view-stack">
352-
<div className="section-title">
353-
<div>
352+
<div className="forum-detail-header">
353+
<div className="forum-title-block">
354354
<button className="back-button" type="button" onClick={onBack}>
355355
<ArrowLeft aria-hidden="true" />
356356
Back to forums

src/styles.css

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,16 @@ svg {
337337
margin: 0;
338338
}
339339

340+
.forum-detail-header {
341+
margin-bottom: 12px;
342+
}
343+
344+
.forum-title-block {
345+
display: grid;
346+
gap: 12px;
347+
justify-items: start;
348+
}
349+
340350
.thread-list,
341351
.suggestion-list {
342352
display: grid;
@@ -457,17 +467,21 @@ meter {
457467
.back-button {
458468
display: inline-flex;
459469
align-items: center;
470+
justify-content: center;
460471
gap: 8px;
461-
width: fit-content;
472+
width: auto;
473+
max-width: 100%;
462474
min-height: 48px;
463-
padding: 0 16px;
475+
padding: 10px 18px;
464476
border: 1px solid var(--color-line-strong);
465477
border-radius: 8px;
466478
background: var(--color-surface);
467479
color: var(--color-accent);
468480
cursor: pointer;
469481
font-size: 1rem;
470482
font-weight: 800;
483+
line-height: 1;
484+
white-space: nowrap;
471485
}
472486

473487
.forum-meta,

0 commit comments

Comments
 (0)