From 9f362683cd9203975f1fbe470d23003415737e86 Mon Sep 17 00:00:00 2001 From: Alex Abashev Date: Sun, 29 Nov 2026 12:27:38 +0300 Subject: [PATCH] Indent the pages of the Command line group in the sidebar From 76.25em up the theme draws a group of the sidebar as a bold heading and takes the indent off the pages under it, so mise, Homebrew, Scoop, apt and Download stood in the same column as the pages above and below the group. They get the indent that the theme gives the pages of a group that folds, 0.6rem. The selector is the theme's own with one more section in front: the active tab, Get started, is a section as well, and its pages must stay where they are. Below 76.25em the sidebar is the theme's drawer, which already indents them. --- docs/stylesheets/navigation.css | 14 ++++++++++++++ zensical.toml | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 docs/stylesheets/navigation.css diff --git a/docs/stylesheets/navigation.css b/docs/stylesheets/navigation.css new file mode 100644 index 0000000..daede90 --- /dev/null +++ b/docs/stylesheets/navigation.css @@ -0,0 +1,14 @@ +/* The sidebar of Get started: the Command line group, a section inside a section. From 76.25em up the theme draws a + group as a bold heading and takes the indent off the pages under it, so mise, Homebrew and the rest line up with the + pages above and below the group. Here they get the indent that the theme gives the pages of a group that folds. + The selector is the theme's own, with one more section in front: the active tab, Get started, is a section as well, + and its pages must stay where they are. */ +@media screen and (min-width: 76.25em) { + [dir="ltr"] .md-nav__item--section .md-nav__item--section > .md-nav > .md-nav__list { + margin-left: 0.6rem; + } + + [dir="rtl"] .md-nav__item--section .md-nav__item--section > .md-nav > .md-nav__list { + margin-right: 0.6rem; + } +} diff --git a/zensical.toml b/zensical.toml index 42fb350..ee8b2c4 100644 --- a/zensical.toml +++ b/zensical.toml @@ -48,7 +48,8 @@ nav = [ # The Playground page's layout and script. The script comes on every page, because the site navigates without # reloading, and does nothing where there is no playground; the formatter itself loads on the Playground only. -extra_css = ["stylesheets/playground.css"] +# navigation.css indents the pages of the Command line group in the sidebar. +extra_css = ["stylesheets/playground.css", "stylesheets/navigation.css"] extra_javascript = ["javascripts/playground.js"] [project.theme]