From 858b9067223a94e0b8a7044e5ad5de241f05a558 Mon Sep 17 00:00:00 2001
From: Kevin Veen-Birkenbach <kevin@veen.world>
Date: Mon, 17 Mar 2025 16:23:05 +0100
Subject: [PATCH] Optimized static current

---
 sphinx/templates/structure.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sphinx/templates/structure.html b/sphinx/templates/structure.html
index cf5d7c3a..ba75972f 100644
--- a/sphinx/templates/structure.html
+++ b/sphinx/templates/structure.html
@@ -9,7 +9,7 @@
         <div class="menu-item" style="display: inline-flex; align-items: center; justify-content: space-between; width: 100%; white-space: nowrap;">
           <!-- Link and file open section -->
           <div style="display: inline-flex; align-items: center; white-space: nowrap;">
-            <a class="reference internal{% if item.children %} expandable{% endif %}{% if item.current %} current{% endif %}"
+            <a class="reference internal{% if item.children %} expandable{% endif %}{% if item.current and not item.children %} current{% endif %}"
                href="{{ pathto(item.link).replace('#', '') }}{% if item.anchor %}#{{ item.anchor }}{% endif %}"
                style="text-decoration: none; white-space: nowrap;">
               {{ item.text }}