ministryofjustice / mkdocs-tech-docs-template

Build flexible technical documentation with a GOV.UK style using MkDocs
https://ministryofjustice.github.io/mkdocs-tech-docs-template/
8 stars 4 forks source link

Spacing around active items if using sections, but not tabs #12

Closed michalc closed 1 year ago

michalc commented 1 year ago

There seems to be a slightly strange (to my eye) spacing, around the active items in the left hand navigation menu. This can be seen here next to the "Getting started" item, where the vertical blue bar is very close to the text:

image

Adding this CSS seems to sort it:

.md-nav__item--section > .md-nav > .md-nav__list > .md-nav__item--active {
    margin-left:  0;
    padding-left: 3px;
}

I've done this at https://github.com/uktrade/stream-zip/blob/e09ac51c3f21938d2d9b18478892d4f8caaac47e/docs/assets/dit-extra.css, where its effect can currently be seen at https://stream-zip.docs.data.trade.gov.uk/getting-started/ and in the below screenshot

image

After a bit of trial and error, I think it's due to using navigation.sections, but not navigation.tabs as features in mkdocs.yml, as is done in https://github.com/uktrade/stream-zip/blob/5cf1edec090f8abb912f05df610bef0aaecae534/mkdocs.yml

SoumayaMauthoorMOJ commented 1 year ago

Fixed with v0.0.24 :-)