From 4eafebb2bf4cca2cfddaa3f35079ed92bedde9d8 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 18 Jun 2026 20:25:49 +0800 Subject: [PATCH] Revert "fix(docs): use rem-based calc for title/empty-state centering, unify both with same technique" This reverts commit d246a7ae0672f119cee62d9385cba964643dc113. --- web/default/src/features/docs/index.tsx | 28 ++++++++++++++----------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/web/default/src/features/docs/index.tsx b/web/default/src/features/docs/index.tsx index e7a073536..96f9af079 100644 --- a/web/default/src/features/docs/index.tsx +++ b/web/default/src/features/docs/index.tsx @@ -357,7 +357,7 @@ export function Docs() { {/* Center content */}
{/* Document title - always reserve space, visually centered with page header */} -
+

{selectedDoc && !docLoading ? selectedDoc.title : '\u00A0'}

@@ -371,17 +371,8 @@ export function Docs() {
) : ( - /* Empty state - centered with page header */ -
-
-
- -
-

- {t('Select a document to start reading')} -

-
-
+ /* Spacer to maintain layout height */ +
) ) : ( <> @@ -451,6 +442,19 @@ export function Docs() { )}
+ {/* Empty state overlay - absolutely positioned, centered in the page container */} + {!selectedDoc && !docLoading && ( +
+
+
+ +
+

+ {t('Select a document to start reading')} +

+
+
+ )}