From fa6059df80c8ed344588cd3b30f8ecb4b4ddd82c Mon Sep 17 00:00:00 2001 From: Matthieu Riegler Date: Thu, 22 Feb 2024 01:46:55 +0100 Subject: [PATCH] refactor(shared-docs): Hide TOC if there is only 1 item. fixes #angular/angular#54236 --- .../table-of-contents/table-of-contents.component.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/components/table-of-contents/table-of-contents.component.scss b/docs/components/table-of-contents/table-of-contents.component.scss index 924dd2ed2..46abaf355 100644 --- a/docs/components/table-of-contents/table-of-contents.component.scss +++ b/docs/components/table-of-contents/table-of-contents.component.scss @@ -14,6 +14,11 @@ margin-bottom: 2rem; } + & :has(ul li:only-child) { + // Hide the entire TOC is there's only one item + display: none; + } + @media only screen and (max-width: 1430px) { position: relative; right: 0;