From 34211fdc90e9e647208ff59cea2fb83f158087db Mon Sep 17 00:00:00 2001 From: Server <10.9.8.250@reg.snw.su> Date: Sun, 9 Aug 2026 23:58:36 +0000 Subject: [PATCH] Align mobile active state and widen sidebar --- docslib/templates/client.css | 6 +++--- tests/test_server.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docslib/templates/client.css b/docslib/templates/client.css index 7251188..6fcfc13 100644 --- a/docslib/templates/client.css +++ b/docslib/templates/client.css @@ -39,7 +39,7 @@ button { color: inherit; } .glyph-button, .refresh-glyph { font-family: Arial, sans-serif; } .nav-arrow { font-family: system-ui; } -.app-shell { --desktop-sidebar-width: clamp(230px, 18vw, 310px); display: flex; width: 100%; height: 100%; flex-direction: column; overflow: hidden; background: var(--shell); } +.app-shell { --desktop-sidebar-width: clamp(270px, 25vw, 400px); display: flex; width: 100%; height: 100%; flex-direction: column; overflow: hidden; background: var(--shell); } .desktop-header { position: relative; z-index: 20; display: grid; min-height: 76px; flex: 0 0 76px; grid-template-columns: minmax(260px, 1fr) auto; align-items: center; gap: 18px; padding: 12px 20px; background: var(--shell); } .desktop-title { overflow: hidden; margin: 0; font-size: 1.55rem; font-weight: 450; line-height: 1.1; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; } .header-link { display: block; width: 100%; padding: 6px 12px; border: 1px solid transparent; border-radius: 20px; color: var(--text); background: transparent; text-decoration: none; line-height: 1.2; transition: background .16s ease, border-color .16s ease; } @@ -58,8 +58,8 @@ button { color: inherit; } .tree-link { display: flex; width: 100%; min-height: 32px; align-items: baseline; gap: 5px; padding: 4px 10px; border: 0; border-radius: 18px; color: var(--text); background: transparent; cursor: pointer; text-align: left; transition: background .15s ease, color .15s ease; } .tree-link:hover { background: var(--control); } .tree-link.active { background: var(--active); } -.sidebar-header-buttons .header-link.active, .desktop-sidebar .tree-link.active { color: #050505; background: #f0f0f0; } -.desktop-sidebar .tree-link.active .tree-number { color: #555; } +.sidebar-header-buttons .header-link.active, .desktop-sidebar .tree-link.active, .mobile-menu-view .header-link.active, .mobile-menu-view .tree-link.active { color: #050505; background: #f0f0f0; } +.desktop-sidebar .tree-link.active .tree-number, .mobile-menu-view .tree-link.active .tree-number { color: #555; } .tree-number { flex: 0 0 auto; color: var(--muted); } .tree-title { min-width: 0; overflow-wrap: anywhere; } diff --git a/tests/test_server.py b/tests/test_server.py index 5bb56c0..0674592 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -77,6 +77,8 @@ def test_all_endpoints_and_self_contained_build(tmp_path): assert "overflow-y: auto" in html assert "flex: 1 1 auto; flex-direction: column" in html assert "padding: 0 18px 22px" in html + assert "--desktop-sidebar-width: clamp(270px, 25vw, 400px)" in html + assert ".mobile-menu-view .tree-link.active { color: #050505; background: #f0f0f0; }" in html assert "elements.pageSurface.scrollTo" in html assert "font-family: system-ui; font-size: 16px" in html assert ".glyph-button, .refresh-glyph { font-family: Arial" in html