Skip to content

Indent the pages of the Command line group in the sidebar - #26

Merged
abashev merged 1 commit into
mainfrom
abashev/nav-indent
Nov 29, 2026
Merged

abashev merged 1 commit into
mainfrom
abashev/nav-indent

Conversation

@abashev

@abashev abashev commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

After #25, the sidebar of Get started shows Command line as a bold heading with its five pages under it, all in the same column as Gradle plugin, Spotless and IntelliJ IDEA. Nothing shows that mise, Homebrew, Scoop, apt and Download belong to the heading.

Why

From 76.25em up, the theme draws a group of the sidebar (navigation.sections) as a bold heading and sets margin-left: 0 on the list under it. Below that width the sidebar is the theme's drawer, where the same pages are indented.

What changes

docs/stylesheets/navigation.css, listed in extra_css, gives that list the indent the theme gives the pages of a group that folds, 0.6rem, from 76.25em up. It is one rule for each text direction, as the theme has.

The selector is the theme's own with one more .md-nav__item--section in front. The active tab, Get started, is a section as well, so without it the whole sidebar would move: Gradle plugin, Spotless and the rest must stay where they are. With the extra section the rule matches only a group inside a group, which today is Command line.

Checked

  • zensical build --clean --strict passes.
  • Measured in the browser at 1440 px: the pages of Get started stay at x = 114 and the five pages of Command line go from 114 to 126. Looked at Maven plugin and Homebrew, where the active page's highlight is indented with its text.
  • At 1000 px the drawer is as before, with the same step of indent.

Left alone: the heading stays bold. I looked at the light palette only; the rule sets a margin and no colour, so the dark palette gets the same indent.

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.
@abashev
abashev merged commit 02aded6 into main Nov 29, 2026
2 checks passed
@abashev
abashev deleted the abashev/nav-indent branch November 29, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant