Skip to content

Commit 374e9f6

Browse files
committed
fix: action buttons pushed to right via flex-grow centering
1 parent 5e56d03 commit 374e9f6

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

custom.css

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ html.dark .myst-top-nav {
111111

112112
nav.myst-top-nav-bar {
113113
background: transparent !important;
114-
position: relative !important;
115114
}
116115

117116
/* HOME / BRANDING */
@@ -215,25 +214,16 @@ nav[aria-label="Table of Contents"] a::after,
215214

216215
/* ============================================================
217216
NAV — CENTER the chicagojoe.dev + icons group
218-
The nav links live in a div.flex-grow.hidden.lg:block container
219-
inside the right-side flex group. We position it absolutely
220-
centered relative to the nav bar.
217+
flex-grow: 1 expands the links container to fill remaining
218+
space, centering its contents and naturally pushing the
219+
action buttons to the far right.
221220
============================================================ */
222-
nav.myst-top-nav-bar > div:nth-child(2) {
223-
/* The right-side flex group — needs relative positioning
224-
so the inner centered group can be absolute inside it */
225-
position: static !important;
226-
}
227-
228221
nav.myst-top-nav-bar > div:nth-child(2) > div.flex-grow {
229-
/* The container holding [chicagojoe.dev, LinkedIn, GitHub] */
230-
position: absolute !important;
231-
left: 50% !important;
232-
transform: translateX(-50%) !important;
233-
/* Don't flex-grow since we're taking it out of flow */
234-
flex-grow: 0 !important;
235-
/* Ensure it doesn't interfere with pointer events on siblings */
236-
pointer-events: auto;
222+
flex-grow: 1 !important;
223+
position: static !important;
224+
display: flex !important;
225+
justify-content: center !important;
226+
align-items: center !important;
237227
}
238228

239229
/* ============================================================

0 commit comments

Comments
 (0)