Metadata-Version: 2.4
Name: mkdocs-nested-tabs
Version: 0.1.0
Summary: Display two levels of navigation.tabs instead of Material's hover-only dropdown.
Author-email: Luka Sherman <lukawritecode@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/luka-sherman/mkdocs-nested-tabs
Project-URL: Repository, https://github.com/luka-sherman/mkdocs-nested-tabs
Project-URL: Issues, https://github.com/luka-sherman/mkdocs-nested-tabs/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: MkDocs
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Documentation
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mkdocs>=1.5
Requires-Dist: mkdocs-material>=9.0
Dynamic: license-file

# mkdocs-nested-tabs

Shows two hierarchy levels of `navigation.tabs` - one parent level, with it's children 
displayed below it. An alternative to Material for MkDocs' native hover-triggered 
tab dropdown (one category's children at a time). 

## Status

Early scaffold, ported and generalized from a working implementation. Not yet published.

## Install

```bash
pip install mkdocs-nested-tabs   # not yet published
```

```yaml
# mkdocs.yml
theme:
  name: material
  features:
    - navigation.tabs

plugins:
  - nested-tabs
```

Requires `navigation.tabs` to be enabled — this plugin replaces that
feature's tab bar on desktop widths (≥76.234375em, matching Material's own
breakpoint), it doesn't work alongside a site with tabs disabled.

## How it works

Reads Material's own primary sidebar nav at runtime (which already contains
the full site tree — every category, not just the active one) and builds a
second row inserted directly into `.md-header`, right after `.md-tabs`, so
it inherits the header's own sticky positioning and background for free. A
category with a third nesting level (a sub-category with its own children,
rather than a flat list of pages) doesn't fit the "category + pages" shape
this renders, so it falls back to a single link using the first leaf page
found inside it.

## Config

```yaml
plugins:
  - nested-tabs:
      enabled: true   # default
```

A configurable breakpoint and an option to keep Material's native tabs 
alongside this row instead of hiding them. Both need the static JS/CSS to 
be templated per-build rather than shipped as fixed package assets.

## Theming

Falls back to Material's own `--md-default-fg-color`/`--md-accent-fg-color`
so it looks reasonable on any palette out of the box. Override via:

```css
:root {
  --md-nested-tabs-label-color: ...;
  --md-nested-tabs-link-color: ...;
}
```

## Development

```bash
python3 -m venv .venv && source .venv/bin/activate
pip install -e . mkdocs-material pytest
python -m pytest tests/
```

Manual check: `cd tests/fixture_site && mkdocs serve`, then open the site
and confirm the nested-tabs row renders at desktop width.
