From 57cd1a82dd8283a234b50c2fdee235ca98d0bc5b Mon Sep 17 00:00:00 2001 From: Ari Kornfeld Date: Tue, 17 Feb 2026 23:08:25 -0800 Subject: [PATCH 1/2] fix: edge case where caret isn't moved to left Also carry over change from companion to support dropdown menus with icons. --- src/css/custom.css | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/css/custom.css b/src/css/custom.css index 88368f6..9cb01b8 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -145,7 +145,8 @@ } /* when the window is narrow, the right-header icons are in the pull-down sidebar */ -.navbar-sidebar__items { +.navbar-sidebar__items, +.theme-layout-navbar-right .dropdown__menu { /* fontawesome-* classes were added in the item definitions in docusaurus.config.ts */ .fontawesome-container { display: flex; @@ -214,8 +215,11 @@ border-radius: 0.5rem; } -/* move the expand/contract caret to the far left for improved visibility/group offsetting */ -.menu__caret { +/* move the expand/contract caret to the far left for improved visibility/group offsetting. + The second class is active if the subdirectory has no linked-page (so clicking on it just opens the sublist w/o changing the main panel. + */ +.menu__caret, +.menu__link--sublist-caret::after { order: -1; padding-left: 0.45em; padding-right: 0; @@ -226,6 +230,11 @@ } } +/* when there's no linked page, the caret is in '::after' itself, not nested within the element. */ +.menu__link--sublist-caret::after { + scale: 0.6; +} + /* split the padding between the caret (previous rule) and the text in the category header */ .menu__link--sublist { padding-left: 0.2em; From 2de728f41574abd81605087de58ab3b48a441cc0 Mon Sep 17 00:00:00 2001 From: Ari Kornfeld Date: Tue, 17 Feb 2026 23:58:57 -0800 Subject: [PATCH 2/2] fix rabbit issues and incorrect indent --- src/css/custom.css | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/css/custom.css b/src/css/custom.css index 9cb01b8..4fe2ca5 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -144,9 +144,11 @@ } } -/* when the window is narrow, the right-header icons are in the pull-down sidebar */ +/* .navbar-sidebar__items: when the window is narrow, the right-header icons are in the pull-down sidebar + .navbar__inner .dropdown__menu: for dropdown menus in the navbar. (note, though, that the current design does not allow dropdowns in the left section.) + */ .navbar-sidebar__items, -.theme-layout-navbar-right .dropdown__menu { +.navbar__inner .dropdown__menu { /* fontawesome-* classes were added in the item definitions in docusaurus.config.ts */ .fontawesome-container { display: flex; @@ -224,15 +226,14 @@ padding-left: 0.45em; padding-right: 0; border-radius: 0.5rem 0 0 0.5rem; /* match the outer box's corner */ - - &::before { - scale: 0.6; - } } -/* when there's no linked page, the caret is in '::after' itself, not nested within the element. */ +/* The caret is placed differently depending on whether the subdirectory has an index page. + The first is when an "index" is present; the second when there's no linked page */ +.menu__caret::before, .menu__link--sublist-caret::after { scale: 0.6; + margin-left: 0; /* this is currently needed for .menu__link--sublist-caret::after, but is correct for both */ } /* split the padding between the caret (previous rule) and the text in the category header */