diff --git a/assets/scss/_sidebar-tree.scss b/assets/scss/_sidebar-tree.scss index d1623c016..50beb4e11 100644 --- a/assets/scss/_sidebar-tree.scss +++ b/assets/scss/_sidebar-tree.scss @@ -15,26 +15,21 @@ } } - // Adjust height and padding when sidebar_search_disable is true + // Adjust height and padding when sidebar_search_disable is true, but only for + // >= `lg` views, because on tablet (`md`) and mobile (<= `sm`), the search + // box is displayed regardless of the value of sidebar_search_disable: &.td-sidebar-nav--search-disabled { - padding-top: 1rem; + @include media-breakpoint-up(lg) { + // There's no search box so add top padding + // and adjust max-height: + padding-top: 1rem; - @include media-breakpoint-up(md) { @supports (position: sticky) { max-height: calc(#{$_max-height} + 4.5rem); } } } - // Handle cases for tablet (`md`) and mobile (<= `sm`) where the search box is - // displayed regardless of the value of sidebar_search_disable: - @include media-breakpoint-down(lg) { - padding-top: 0 !important; - @supports (position: sticky) { - max-height: $_max-height !important; - } - } - @include media-breakpoint-up(md) { display: block !important; }