Skip to content

Commit f073fb2

Browse files
committed
Fixed spacing issues when using toc.integrate in non-nested tabs
1 parent 3c130ee commit f073fb2

File tree

6 files changed

+25
-11
lines changed

6 files changed

+25
-11
lines changed

material/assets/stylesheets/main.5143246d.min.css

Lines changed: 0 additions & 2 deletions
This file was deleted.

material/assets/stylesheets/main.5143246d.min.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

material/assets/stylesheets/main.5d519cf3.min.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/stylesheets/main.5d519cf3.min.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
{% endif %}
4040
{% endblock %}
4141
{% block styles %}
42-
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.5143246d.min.css' | url }}">
42+
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.5d519cf3.min.css' | url }}">
4343
{% if config.theme.palette %}
4444
{% set palette = config.theme.palette %}
4545
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.3f5d1f46.min.css' | url }}">

src/assets/stylesheets/main/layout/_nav.scss

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -654,14 +654,28 @@
654654
}
655655

656656
// Modifier for when table of contents is rendered in primary navigation
657-
&--integrated &__link[for="__toc"] ~ .md-nav {
658-
display: block;
659-
margin-bottom: 1.25em;
660-
border-left: px2rem(1px) solid var(--md-primary-fg-color);
657+
&--integrated > .md-nav__list > .md-nav__item--active {
661658

662-
// Hide navigation title
663-
> .md-nav__title {
664-
display: none;
659+
// Add spacing to container for non-nested navigation items
660+
&:not(.md-nav__item--nested) {
661+
padding: 0 px2rem(12px);
662+
663+
// Remove padding as it's given by container
664+
> .md-nav__link {
665+
padding: 0;
666+
}
667+
}
668+
669+
// Show integrated table of contents
670+
.md-nav--secondary {
671+
display: block;
672+
margin-bottom: 1.25em;
673+
border-left: px2rem(1px) solid var(--md-primary-fg-color);
674+
675+
// Hide table of contents title
676+
> .md-nav__title {
677+
display: none;
678+
}
665679
}
666680
}
667681
}

0 commit comments

Comments
 (0)